Sign up

MCP

MCP tool reference

On this page

Assistants pick these tools themselves. A tool only appears when your token's scopes allow it.

Common inputs

InputMeaning
website_idFrom list_websites. Optional when the token can use only one website.
periodtoday, yesterday, 24h, 7d, 30d (default), 90d, 6m, 1y, wtd, mtd or all.
from, toCalendar days, YYYY-MM-DD, both inclusive. Replace period.
timezoneIANA name such as Europe/Madrid for day boundaries and grouping. Default UTC.
filtersUp to six filters, for example [{"dim":"country","op":"is","values":["US"]}].

Reports (read scope)

ToolReturns
list_websitesWebsites the token can use: id, name, domains.
get_trafficVisitors, pageviews, visits, bounce rate, session time, revenue, conversion rate and revenue per visitor vs the previous period, a time series and top channels, referrers, campaigns, pages, countries and devices. Optional granularity.
get_breakdownA complete ranked table for one dimension (channel, referrer, utmSource, page, entryPage, country, city, browser, device, outbound…), with sort, q, limit and offset.
get_revenuePayments, new and renewal revenue, refunds, MRR estimates, customers and lifetime value, by first-touch source.
get_conversionsGoal completions and rates, paying customers and funnel steps with drop-off.
get_goalOne goal by name: completions over time, properties and sources.
get_insightsWhich channels, pages, countries and devices turn visitors into buyers, time to first purchase and source changes.
get_search_keywordsSearch Console queries and pages, when connected.
get_ai_crawlersAI crawler and bot requests by crawler, purpose and page.
get_realtimeVisitors online now with page, source, country and device.
list_funnelsSaved funnels and their steps.
list_notesChart notes in the period.

Visitors (visitors scope)

ToolReturns
search_visitorsVisitors in the period with source, location, pageviews and payments. Inputs q, payment (all, paid, unpaid), sort, limit, offset.
get_visitorOne visitor's profile and full journey: visits, pages, goals and payments. Input visitor_id.

Changes (write scope)

ToolDoes
create_noteAdds a note to the traffic chart. Inputs date (YYYY-MM-DD, up to tomorrow) and text (up to 280 characters).
create_websiteAdds a website and returns its ID, secret key (once) and tracking script. Needs a token for all websites.

Calling the server directly

The server speaks JSON-RPC over HTTP POST. You rarely need this, but it helps when testing:

terminal
curl https://metricraven.com/api/mcp \
  --header "Authorization: Bearer $METRICRAVEN_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_traffic","arguments":{"period":"7d"}}}'

Details

  • Results are JSON. Very long results are cut at about 120,000 characters; narrow the period or add filters.
  • Tools return the same data as the Reports API, so numbers match the dashboard.
  • Without the visitors scope, get_realtime and other reports leave out names, emails and visitor IDs.