MCP server
Ask your AI assistant about your traffic, errors, funnels and goals by adding one server URL: https://api.databuddy.cc/v1/mcp.
Connect your assistant
On the sign-in screen, pick the organization, the websites and the permissions to grant. Read permissions start on, except Read backend logs.
Then try:
For databuddy.cc, what were the top 10 pages last week, Monday to Sunday in Europe/London time? Show the dates you used.Connect a script or CI job with a key
Headless agents send an API key instead of signing in:
{
"mcpServers": {
"databuddy": {
"type": "http",
"url": "https://api.databuddy.cc/v1/mcp",
"headers": { "x-api-key": "${DATABUDDY_API_KEY}" }
}
}
}Get one from Organization settings → Integrations → Databuddy MCP: choose Connect assistant, then Use an API key. It always has read:data, and you can add these:
A key can't read Search Console or manage integrations. Connect as yourself for those.
Find the right tool
Your client only sees the tools your permissions cover. get_data answers most questions; capabilities lists its query types, and execute_sql_query covers the rest with up to 100 rows.
{
"tool": "get_data",
"arguments": {
"websiteDomain": "databuddy.cc",
"preset": "last_week",
"compare": "previous_period",
"queries": [
{ "type": "summary_metrics" },
{ "type": "top_pages", "orderBy": "delta.visitors DESC", "limit": 5 }
]
}
}Grant permissions
Every change takes two calls. The first returns a preview and a confirmationToken; after you approve, the assistant repeats the call with the token. A token works once, within 10 minutes. Change what you granted by disconnecting in Account settings → Connected apps and reconnecting.
Handle limits and errors
Limits count per tool and per connection. A write's previews count as reads.
Over a limit, a tool returns a rate_limited error with details.retryAfter in seconds.
A failed call returns isError: true with an error.code:
A tool your permissions don't cover returns JSON-RPC -32602 naming the scopes it needs. Requests without valid sign-in get 401 with a WWW-Authenticate header pointing to sign-in.
Related
How is this guide?