MCP
dat.ai exposes a remote Model Context Protocol (MCP) server over streamable HTTP. Compatible clients can call the same capabilities as the HTTP API — chat, browsing, and transcription — as MCP tools.
| Field | Value |
|---|---|
| Endpoint | https://llm.dat.ai/mcp |
| Transport | Streamable HTTP (not stdio) |
| Auth | Authorization: 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
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.
| Tool | Description |
|---|---|
ping | Health check; returns ok and has_api_key. Does not start a task. |
chat_complete | OpenAI-compatible chat → POST /v1/chat/completions. Optional stream; final result always includes the full assistant message. |
browsing_run | Run browsing and wait → POST …/browsing/sync. |
browsing_start | Start browsing async → POST …/browsing/async; returns task_id. |
browsing_status | Poll browsing by task_id → GET …/browsing/status. |
browsing_screenshot | Download a task screenshot as MCP image content. Filename comes from the task payload. |
browsing_list | List recent browsing tasks (page / limit). |
whisper_transcribe_run | Transcribe and wait → POST …/transcribe/sync. Audio must be base64. |
whisper_transcribe_start | Start transcription async → POST …/transcribe/async; returns task_id. |
whisper_transcribe_status | Poll transcription by task_id → GET …/transcribe/status. |
For full HTTP request/response shapes, see Inference, Browsing, and Transcribing.
Tool input examples
Chat
chat_complete — required: model, messages.
{
"model": "qwen3:1.7b",
"messages": [
{ "role": "user", "content": "Hello!" }
],
"temperature": 0.7
}Optional: top_p, max_tokens, seed, stop, stream, and datai (tools.net / tools.fs / tools.webview, tps: fast | med | slow). See built-in tools.
Usage patterns
| Goal | Approach |
|---|---|
| Check connectivity | ping — confirm has_api_key: true |
| Short chat | chat_complete |
| Browser task with immediate result | browsing_run |
| Long browser task | browsing_start → poll browsing_status → optional browsing_screenshot |
| Short audio | whisper_transcribe_run |
| Long audio / client timeouts | whisper_transcribe_start → poll whisper_transcribe_status |
Browsing and transcription 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:
| Cause | Fix |
|---|---|
| Missing or invalid API key | Set Authorization: Bearer YOUR_API_KEY with an active key from the dashboard |
has_api_key: false on ping | Header not forwarded — check client config / mcp-remote bridge |
| Missing required field | Check the tool schema in your client (model/messages, task/script, audio_base64, task_id, …) |
| Task timeout / no nodes | Retry, raise timeout_sec, adjust filters, or use async tools |
| Invalid base64 audio | Re-encode the file as base64 |
| Insufficient credits | Top up in the dashboard billing |