Skip to content

MCP Server

Connect a custom or generic MCP client to the remote GoodMetrics MCP server.

The GoodMetrics MCP server lets OAuth-capable MCP clients query GoodMetrics analytics data through the Model Context Protocol.

Looking for Claude or ChatGPT setup? Use the GoodMetrics Help Docs for connect-and-use guides. This page is for technical developers connecting a custom or generic MCP client.

https://data.goodmetrics.io/mcp

The server is remote and read-only. It can retrieve analytics data available to your GoodMetrics account, but it cannot create, update, or delete sites, tracking settings, dashboards, or account data.

GoodMetrics exposes a remote HTTP MCP endpoint. Use HTTP or Streamable HTTP when your client asks for a transport.

The MCP transport uses request/response JSON-RPC over POST. It returns 202 Accepted for accepted notifications and 405 Method Not Allowed for GET.

GoodMetrics does not provide a local stdio server, CLI-based MCP server, SSE transport, or session streaming.

GoodMetrics publishes OAuth metadata for MCP clients that support discovery and dynamic registration.

Protected resource metadata:

https://data.goodmetrics.io/.well-known/oauth-protected-resource/mcp

Authorization server metadata:

https://api.goodmetrics.io/.well-known/oauth-authorization-server

Clients request the analytics:read scope for the https://data.goodmetrics.io/mcp resource. The service supports dynamic client registration and the Authorization Code flow with PKCE S256.

When a client connects, it should discover the authorization service, open the GoodMetrics sign-in flow, and request read-only analytics access. The client manages OAuth tokens and refresh behavior.

If a client reports that the server does not implement OAuth, confirm that both metadata URLs return JSON. The MCP endpoint URL does not change.

The REST API exposes resource paths such as:

GET https://data.goodmetrics.io/{gmID}/events/audience/countries

Your MCP client discovers the server’s tools and selects the appropriate analytics operations for each question. Clients can resolve sites by name, domain, alias, or public gmID, then query realtime and reporting data through read-only operations.

MCP tools map to the same analytics data available through REST API resources, including realtime activity, overview metrics, pages, referrers, traffic trends, audience, acquisition, charts, headers, and custom events.

For application code, scheduled jobs, dashboards, or integrations where you control the request and response handling, use the REST API.