MCP (AI assistants)
MCP (AI assistants)
Section titled “MCP (AI assistants)”MetriXs exposes a read-only MCP (Model Context Protocol) endpoint so you can query your analytics from inside an AI assistant: “how many visitors did my site have this week, and where did they come from?”, answered with real data instead of a guess.
Endpoint: https://mcp.metrixs.eu/api/mcp
MetriXs never calls an AI provider itself. You connect your own assistant with your own credentials; only aggregated analytics numbers flow to the chat you chose. Nothing leaves your MetriXs instance except the answers to the questions you ask in it.
Agencies: clients cannot connect the MCP server
Section titled “Agencies: clients cannot connect the MCP server”Client accounts on Agency plans cannot use the MCP server: the consent flow refuses customer accounts outright, and clients cannot create API keys in the dashboard either. If a client wants AI access to their analytics, the agency creates a site API key (Settings → Sites → API keys) and shares it with them — the key stays pinned to that one site and read-only.
Two ways to connect
Section titled “Two ways to connect”1. API key (Claude Code, Codex CLI, Gemini CLI, VS Code / GitHub Copilot, Cursor, JetBrains)
Section titled “1. API key (Claude Code, Codex CLI, Gemini CLI, VS Code / GitHub Copilot, Cursor, JetBrains)”- In the dashboard, open Settings → Sites and create an API key for the site you want to share. The key is shown once.
- Add the server to your client with the URL above and the header
Authorization: Bearer <key>:
| Client | Where |
|---|---|
| Claude Code | claude mcp add metrixs --transport http https://mcp.metrixs.eu/api/mcp --header "Authorization: Bearer <key>" |
| VS Code / GitHub Copilot | .vscode/mcp.json → servers.metrixs with type: "http", the URL and the header |
| Codex CLI | ~/.codex/config.toml → [mcp_servers.metrixs] with url + bearer_token_env_var |
| Gemini CLI | ~/.gemini/settings.json → mcpServers.metrixs with httpUrl + headers |
| Cursor | MCP settings → add a custom (HTTP) server with the URL and header |
| JetBrains AI Assistant | Settings → MCP, add a remote server with the URL and header |
2. OAuth (Claude Desktop, ChatGPT connectors, Cursor, JetBrains)
Section titled “2. OAuth (Claude Desktop, ChatGPT connectors, Cursor, JetBrains)”- In your assistant, add a custom remote MCP server / connector with the URL above. Claude Desktop and ChatGPT only support this flow; they do not accept plain API keys.
- The assistant opens a MetriXs page in your browser. Log in, pick one site, and allow access.
- Done. The assistant can now read that site’s analytics.
Every OAuth connection appears as an API key named MCP: <assistant> under
Settings → Sites → API keys. Deleting that row revokes the connection
instantly, including live sessions.
Available tools (all read-only)
Section titled “Available tools (all read-only)”list_sites, get_current_visitors, get_overview, get_timeseries,
get_breakdown (pages, sources, countries, devices, UTM, …), get_events,
get_event_props, get_revenue, get_funnel, get_top_products (commerce
sites), get_ai_traffic, get_blocked_bots, get_security_audit (latest
security audit, Team, Pro, and Agency plans).
Privacy
Section titled “Privacy”- Read-only: no tool can change settings, sites or data.
- One site per connection: a key is pinned to a single site; assistants never see past it.
- Aggregates only: no visitor identifiers exist to expose; visitor IDs are daily-rotating hashes and are never included in any tool response.
- EU-hosted: MetriXs makes no AI calls itself. Your assistant talks to MetriXs; MetriXs never talks to an AI provider.