# receita_pj — how to use (mcp.ai)

Looks up a company's registration data at the Federal Revenue from the CNPJ, optionally with the ownership structure. Platform-hosted, no credentials, pay per query with prepaid credit.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_receita_pj?ms=1787191740000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `receita_pj_consultar`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/receita_pj`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/receita_pj/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/receita_pj/consultar` — Consulta os dados cadastrais de uma empresa na Receita Federal a partir do CNPJ, com opção do quadro societário. Hospedado pela plataforma, sem credenciais, pague por consulta com crédito pré-pago. Co
  - body: { Cnpj: string, Qsa: string, completo?: boolean }

## Example prompts
- "Federal Revenue data for CNPJ 12345678000190"
- "Ownership structure of CNPJ 12345678000190"

## More
- Page: https://mcp.ai/receita_pj
- Agent spec (llms.txt): https://mcp.ai/receita_pj/llms.txt
- Postman collection: https://mcp.ai/receita_pj/postman.json
