API reference

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

claude mcp add --transport http databuddy https://api.databuddy.cc/v1/mcp

Sign in when your first Databuddy question asks you to. For the Databuddy skills as well, install the plugin, which includes the same server:

claude plugin marketplace add databuddy-analytics/skills
claude plugin install databuddy@databuddy

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.

A client with an Authorization or x-api-key header in its config never starts the sign-in. Remove the header to switch from a key to signing in.

Connect a script or CI job with a key

Headless agents send an API key instead of signing in:

mcp.json
{
  "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:

OptionScopeAdds
Workspace actionsmanage:websitesGoals, funnels, annotations and investigation replies. It can also edit and delete websites over REST, so grant it only to automation you trust.
Feature flagsmanage:flagsFlag changes
Short linksread:links, write:linksEvery link in the organization

A key can't read Search Console or manage integrations. Connect as yourself for those.

Find the right tool

AreaTools
Analyticsget_data, capabilities, execute_sql_query, get_schema, list_websites, check_tracking, list_profile_traits, get_business_context
Replayssearch_replays, list_replay_issues
Accountslist_accounts, get_account
Investigationslist_investigations, get_investigation, reply_to_investigation, dismiss_investigation, list_changes, list_insights
Funnels and goalslist_funnels, get_funnel_analytics, get_funnel_analytics_by_referrer, create_funnel, update_funnel, delete_funnel, list_goals, get_goal_analytics, get_conversion_attribution, create_goal, update_goal, delete_goal
Annotationslist_annotations, create_annotation, update_annotation, delete_annotation
Feature flagslist_flags, get_experiment_results, create_flag, update_flag, add_users_to_flag, delete_flag
Short linkslist_links, search_links, get_link_analytics, create_link, update_link, delete_link
Searchget_search_console
Backend logslist_log_sources, query_logs
Integrationslist_integrations, get_log_connection, update_log_links, update_log_fields, list_slack_channels, set_slack_channel, list_github_repos, set_github_repo
Feedbacksubmit_feedback

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 }
    ]
  }
}
ArgumentAccepts
WebsitewebsiteId, websiteName or websiteDomain; optional when the connection reaches one website
Datespreset (default last_30d), or both from and to as YYYY-MM-DD
timezoneAn IANA name such as Europe/Berlin; UTC by default
filters{ field, op, value }, with the same operators as analytics queries, plus trait:<key>
compareprevious_period or previous_year, adding previous and change to each row

Grant permissions

ScopeShown asUnlocks
read:dataRead dataEvery tool needs it: analytics, replays, investigations, reads of goals, funnels and flags
read:logsRead backend logslist_log_sources, query_logs. Off until you turn it on.
manage:websitesManage websitesChanging goals, funnels and annotations; replying to and dismissing investigations
manage:flagsManage flagsChanging flags
read:linksRead linksReading links, and the preview of any link change
write:linksWrite linksAdding, changing and deleting links
manage:configManage integrationsIntegration tools; log links and fields also need manage:websites

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.

LimitTools
60 a minuteOther read tools
30 a minuteget_data, search_replays
20 a minuteOther write tools, plus execute_sql_query, query_logs, get_search_console, get_funnel_analytics, get_funnel_analytics_by_referrer, get_goal_analytics, get_conversion_attribution, get_experiment_results, get_link_analytics, search_links, list_slack_channels
10 a minutecreate_funnel, create_goal, the update_ and delete_ tools for funnels, goals and annotations, delete_flag, delete_link, get_log_connection, update_log_links, update_log_fields, set_slack_channel, list_github_repos, set_github_repo
5 an hoursubmit_feedback
20 at onceRequests in flight per connection

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:

CodeMeans
invalid_inputAn argument is wrong or unknown; the message names it
not_foundNo such website, ID or record for this connection
unauthorizedThe connection lacks access
rate_limitedWait details.retryAfter seconds
plan_limitYour plan doesn't include this; share details.upgrade
upstream_timeoutIt may have saved; check with a list tool before retrying
query_failed, cancelled, internalRetry, or narrow the question

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.

DiscoveryURL
Server cardhttps://api.databuddy.cc/v1/mcp/server-card
Discovery manifesthttps://www.databuddy.cc/.well-known/mcp.json
Guide resourcedatabuddy://guide

How is this guide?