Skip to Content

MCP

dat.ai exposes a remote Model Context Protocol (MCP)  server over streamable HTTP. Compatible clients run the same browsing tasks as the HTTP API as MCP tools.

FieldValue
Endpointhttps://llm.dat.ai/mcp
TransportStreamable HTTP (not stdio)
AuthAuthorization: Bearer YOUR_API_KEY

Create a key in the dashboard  under API Keys. The MCP server is a thin proxy: every tool maps to an existing HTTP endpoint.

Setup

Create an API key

In the dashboard  open API Keys, create a key, and copy it. Treat it as a secret — do not commit configs that contain real keys.

Add the server to your client

Use the tab for your client below. Replace YOUR_API_KEY with the key from step 1.

Verify with ping

After the client connects, call the ping tool. A healthy response looks like:

{ "ok": true, "has_api_key": true }

If has_api_key is false, the Authorization header did not reach the server — fix the client config and reconnect.

Client configuration

Cursor MCP settings (mcpServers):

{ "mcpServers": { "llm-dat-ai": { "url": "https://llm.dat.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }

Any other client that supports remote streamable HTTP MCP can use the same endpoint and Bearer header. Stdio-only clients need a bridge such as mcp-remote.

Available tools

Tools mirror the public HTTP API. Your client shows each tool’s input schema; details below match the server implementation.

ToolDescription
pingHealth check; returns ok and has_api_key. Does not start a task.
browsing_runRun a browsing task and wait → POST …/browsing/sync.
browsing_startStart a browsing task → POST …/browsing/async; returns task_id.
browsing_statusPoll a task by task_id → GET …/browsing/status. A finished task carries success and payload; a failed one success: false and error.
browsing_screenshotDownload a task screenshot as MCP image content. The filename comes from the task payload.
browsing_listList recent browsing tasks (page / limit).
serp_googleOpen a Google search URL and return the results page → POST /api/v1/search/serp/google. Returns html plus task_id, final_url, links, ai_overview and, for a udm=50 URL, ai_mode.
search_chatgptPut a prompt to ChatGPT → POST /api/v1/search/ai/chatgpt. Returns the endpoint’s JSON: answer (text, markdown, html), sources, citations, raw_stream, task_id, and with page_html: true the page the reply was drawn on.
search_geminiPut a prompt to Google Gemini → POST /api/v1/search/ai/gemini. Returns the same JSON as search_chatgpt.
account_balanceWhat is left of each quota, whether a task may start, and the warning before a 402 → GET /api/v1/account/balance.
supply_countriesThe countries available right now, biggest first, each as a range (1-10 … 10000+) → GET /api/v1/supply/countries. For choosing filter.country_iso_included.

In browsing_run and browsing_status the payload is handed to the model as the JSON object it holds rather than as the string the HTTP API returns: a custom script’s return value is payload.result. Every tool that starts a task returns balance_warning while a quota is used up or nearly so.

For the full request and response shapes, see the Browsing API Reference.

Tool input example

browsing_run / browsing_start take task (natural language) or script (custom Python, enabled per API key; see Custom Scripts). Everything the HTTP API can do, MCP can do: the tools take the same fields and go to the same endpoints.

{ "task": "Open https://example.com and return the page title.", "timeout_sec": 300, "fanout": 1, "screenshots": { "mode": "final_only", "full_page": true }, "filter": { "country_iso_included": ["US"] } }

What browsing_run returns is the endpoint’s JSON, payload parsed into an object:

{ "task_id": "web:fa8cf4c6-2e74-4e55-aa4b-76b74971043e", "success": true, "payload": { "success": true, "result": "The page title of https://example.com is 'Example Domain'.", "steps": 2, "traffic_in": 473, "traffic_out": 722 }, "step_cnt": 2, "execution_time_ms": 21889, "traffic_in": 473, "traffic_out": 722, "traffic_total": 1195 }

An endpoint that refused the call makes the tool fail, and the tool error carries the endpoint’s status and body:

upstream /api/v1/browsing/sync: status 400: {"error":"task or script is required"} upstream /api/v1/search/ai/chatgpt: status 502: {"error":"no reply: the engine refused this browser"}

timeout_sec is in seconds, at most 1200 (20 minutes); max_steps caps the agent’s steps (1–500). After browsing_start, poll with browsing_status using the returned task_id.

A custom script through the same tool: script is the body of an async function, exactly as in the HTTP API.

{ "script": "await browser.navigate_to(\"https://example.com\")\nreturn {\"title\": await browser.get_current_page_title()}", "timeout_sec": 120 }

serp_google takes the same fields as the SERP endpoint; cookies and headers are one value per name here:

{ "url": "https://www.google.com/search?q=kids+soccer+pants&hl=en&gl=us", "locale": "en-GB", "fanout": 2, "attempts": 3 }

Usage patterns

GoalApproach
Check connectivityping — confirm has_api_key: true
Browser task with immediate resultbrowsing_run
Long browser taskbrowsing_start → poll browsing_status → optional browsing_screenshot
Google results pageserp_google; one call, the HTML in the answer
An answer engine’s reply to a promptsearch_chatgpt or search_gemini; one call, the reply with its sources

A browsing task can run for many minutes. Prefer async tools when the client may time out waiting on a single tool call. The public proxy allows long MCP sessions (on the order of ~12 minutes).

Errors

Failures are returned as MCP tool errors. Common causes:

CauseFix
Missing or invalid API keySet Authorization: Bearer YOUR_API_KEY with an active key from the dashboard
has_api_key: false on pingHeader not forwarded — check client config / mcp-remote bridge
Missing required fieldCheck the tool schema in your client (task/script, task_id, …)
Task timeout / nothing availableRetry, raise timeout_sec, adjust filters, or use async tools
Insufficient creditsTop up in the dashboard  billing