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
| Input | Meaning |
|---|---|
| website_id | From list_websites. Optional when the token can use only one website. |
| period | today, yesterday, 24h, 7d, 30d (default), 90d, 6m, 1y, wtd, mtd or all. |
| from, to | Calendar days, YYYY-MM-DD, both inclusive. Replace period. |
| timezone | IANA name such as Europe/Madrid for day boundaries and grouping. Default UTC. |
| filters | Up to six filters, for example [{"dim":"country","op":"is","values":["US"]}]. |
Reports (read scope)
| Tool | Returns |
|---|---|
| list_websites | Websites the token can use: id, name, domains. |
| get_traffic | Visitors, 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_breakdown | A complete ranked table for one dimension (channel, referrer, utmSource, page, entryPage, country, city, browser, device, outbound…), with sort, q, limit and offset. |
| get_revenue | Payments, new and renewal revenue, refunds, MRR estimates, customers and lifetime value, by first-touch source. |
| get_conversions | Goal completions and rates, paying customers and funnel steps with drop-off. |
| get_goal | One goal by name: completions over time, properties and sources. |
| get_insights | Which channels, pages, countries and devices turn visitors into buyers, time to first purchase and source changes. |
| get_search_keywords | Search Console queries and pages, when connected. |
| get_ai_crawlers | AI crawler and bot requests by crawler, purpose and page. |
| get_realtime | Visitors online now with page, source, country and device. |
| list_funnels | Saved funnels and their steps. |
| list_notes | Chart notes in the period. |
Visitors (visitors scope)
| Tool | Returns |
|---|---|
| search_visitors | Visitors in the period with source, location, pageviews and payments. Inputs q, payment (all, paid, unpaid), sort, limit, offset. |
| get_visitor | One visitor's profile and full journey: visits, pages, goals and payments. Input visitor_id. |
Changes (write scope)
| Tool | Does |
|---|---|
| create_note | Adds a note to the traffic chart. Inputs date (YYYY-MM-DD, up to tomorrow) and text (up to 280 characters). |
| create_website | Adds 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_realtimeand other reports leave out names, emails and visitor IDs.