MCP
Add AntAPI as a remote MCP server in your client:
https://api.antapi.dev/mcp
Use Streamable HTTP and OAuth. MCP exposes AntAPI's supported data and tool APIs directly to your agent.
Agent-assisted setup
Give your agent this instruction, or use the setup prompt on the MCP connection page:
Add AntAPI MCP at https://api.antapi.dev/mcp to my current client using Streamable HTTP and OAuth. Ask me to complete browser sign-in and authorization, then verify the connection by listing available tools. Do not execute a paid task as a connection check.
The client discovers the authorization service from the MCP endpoint. Complete sign-in and any required MFA in your browser, review the client and requested permissions, and approve the connection. An agent can edit client configuration, but you complete the authorization yourself.
Choose the project during authorization
The authorization page shows the organization and project that will own the connection and its usage:
- With one available project, it is selected automatically and its name is displayed; no selection is required.
- With multiple projects, the current or default project is preselected and you can change it before approving.
- With no available project, create or restore a project before authorizing.
The connection stays bound to the approved project. Changing the selected project in Console or refreshing the connection's token does not move its usage to another project. To use another project, authorize a new connection for it. Manage and revoke connections from Console's Manage MCP connections entry in Quickstart.
Add the connection yourself
In a client that supports remote MCP and OAuth, add a server named AntAPI, paste the URL above, select Streamable HTTP if requested, and connect. Follow the browser authorization flow. Client-specific buttons and terminal commands depend on your installed client's MCP support; the URL and authorization flow are shared.
For clients that support custom headers, a project API key is also accepted:
Authorization: Bearer <YOUR_AK>
Store the key in the client's secret configuration. Do not put it in the server URL or shared configuration. This option uses the key's existing project; browser authorization is not required. See Authentication for key handling.
Verify and use tools
List the available tools to verify the connection. Discovery does not execute a product operation or incur a charge. Visibility follows the currently published product contract, your project's product access, and granted permissions; paused or unpublished tools are absent.
| Tool | Purpose | Required permission |
|---|---|---|
web_search | Search public webpages | web:search |
web_fetch | Extract public webpage content | web:fetch |
ocr_recognize | Recognize document or image text and layout | ocr:recognize |
asr_transcribe | Transcribe a complete recording | asr:transcribe |
tts_synthesize | Synthesize complete WAV audio | tts:synthesize |
whois_tlds, whois_lookup | WHOIS coverage and single-domain lookup | whois:tlds, whois:lookup |
Start with: List the AntAPI tools available to this connection and summarize their tasks without executing them. Put API parameters inside input, with a paid task's idempotency_key beside input. Before a paid call, review current USD prices, balance, and project budget. Preserve that key and the same input when retrying one logical task; a timeout or disconnect does not establish that execution stopped or was free. See Idempotency and retries.
New products and permissions are not added to an existing connection, including after token refresh. Authorize again with the required permissions, then refresh tool discovery. See the task guides for web search and fetch, OCR, ASR, and TTS.
Files and audio
For OCR and ASR, use input.file shaped as { "filename": "document.pdf", "data_base64": "<Base64 file contents>" }. Encode actual file bytes with standard, canonically padded Base64. filename is a filename, not a path. Do not submit local paths, file URLs, or storage upload URLs. OCR accepts files up to 100 MiB and 1000 pages; ASR accepts up to 8 MiB and 120 seconds. The task guides retain the accepted-format and validation limits.
The complete MCP request limit is 134 MiB, including Base64 and protocol overhead; individual tools retain their smaller input limits. Ordinary JSON operations keep their API limits. A media request can be rejected before execution when capacity is occupied; do not automatically retry with a new idempotency key. The total request deadline is 240 seconds. A client can impose smaller file, audio, or timeout limits.
TTS returns standard MCP AudioContent with MIME audio/wav. Audio is in the audio content block; structuredContent contains delivery metadata only. The complete WAV limit is 86,400,044 bytes, and client support for that size requires separate verification. There is no object storage, persistent download URL, or resumed audio download. If completed audio cannot be replayed, the response preserves the original execution and receipt without synthesizing again. After interrupted delivery, save the Request ID from _meta.antapi and review usage and receipts in Console.
Run a batch
The batch workflow has four tools:
| Tool | Purpose |
|---|---|
whois_batch_create | Submit domains and receive a task ID. |
whois_batch_status | Check the task's progress. |
whois_batch_results | Read a page of results using its returned cursor. |
whois_batch_cancel | Stop scheduling remaining work. |
Use the schemas returned by tool discovery. API fields are inside input; put idempotency_key beside input when submitting a batch. Save that key before submission and reuse it after a timeout or disconnect, then save the returned job_id. HTTP status 202 in the tool metadata means accepted, with final charges still pending.
Check progress explicitly and pass next_cursor unchanged to read subsequent pages. Cancellation leaves completed results available and may allow in-flight work to finish. Successful items are charged and unused reservation is released by the existing settlement process. See WHOIS batch lookups for lifecycle and billing details.
Batch submission, reading, and cancellation require separate permissions. A connection authorized before these tools were added keeps its original permissions, including after token refresh. Authorize a new connection with the required batch permissions to use them.
Connection errors
- 404 at
/mcpor discovery: the endpoint is not deployed at that address, or the deployment's routing is incomplete. Confirm the service deployment; changing credentials will not fix a missing endpoint. - Browser authorization does not open: confirm that the client supports remote Streamable HTTP and OAuth. Use its remote-server flow rather than a local executable configuration.
- 401 after connecting: reconnect to renew authorization, or check whether the connection, project, or key was revoked or disabled.
- A tool is missing: check the granted permissions and current product availability, then refresh tool discovery.
For a local development deployment, use http://127.0.0.1:9004/mcp with its configured Core and Console services. A remote or cloud-hosted client cannot reach your computer through its own loopback address.