# apf_rural — how to use (mcp.ai)

Looks up a producer's rural provisional operating authorization (APF) from the CPF, CNPJ, APF number, or CAR. 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_apf_rural?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. `apf_rural_consultar`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/apf_rural`
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/apf_rural/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/apf_rural/consultar` — Consulta a Autorização Provisória de Funcionamento Rural (APF) de um produtor a partir do CPF, CNPJ, número da APF ou CAR. Hospedado pela plataforma, sem credenciais, pague por consulta com crédito pr
  - body: { CNPJ: string, CPF: string, NumeroAPF: string, NumeroCAR: string, completo?: boolean }

## Example prompts
- "Rural APF for CPF 12345678909"
- "Rural operating authorization by CAR"

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