Skip to content

Ask your assistant

Millimetry runs an MCP server at https://mcp.millimetry.app/mcp. Connect your assistant or coding agent to it once, then ask about your numbers in plain words:

  • “How many people opened the app yesterday, compared with the day before?”
  • “How did the paywall convert last week, by app version?”
  • “Which campaigns sent visitors to /pricing this month?”
  • “Which AI agents used our API, and what did they call?”

With a token that can change settings, it also does the setting up, so you never have to open the dashboard for it:

  • “Add Millimetry to this project.” (With the skills installed, a coding agent creates the app or site, installs it, adds the events that matter, saves the funnel and checks the first events arrive.)
  • “Add staging.example.com to the site’s origins.”
  • “Invite sam@example.com as a viewer.”
  • “We’re near our quota: what would Pro cost, and can I get the checkout link?”

It answers with the same numbers as the dashboard, and every change it makes is one the dashboard could make, by you.

New to Millimetry? Sign in at millimetry.app, name your organization, and on the next step choose Create a token for my agent. It shows the Claude Code command to paste into a terminal, so you can skip to step 2.

Otherwise, open your organization’s settings → API tokens (admins and owners can) and choose what the token may do:

  • Read-only: reads every app in the organization and changes nothing. Right for reports, scripts and assistants that only answer questions.
  • Can change settings: also creates and changes apps, sites, keys, origins, funnels, members, exports and billing links. It acts as you, with your role at the time of each change, so it can do exactly what you can, and it stops working if you leave the organization. A few things stay in the dashboard whatever the token: deleting the organization, making tokens and changing owners.

The token starts with mt_ and is shown once, with the command that connects Claude Code. You can revoke it there at any time.

Keep it out of files you commit. The setups below read it from an environment variable or ask for it once:

Terminal window
export MILLIMETRY_API_TOKEN=mt_…
Terminal window
claude mcp add --transport http millimetry https://mcp.millimetry.app/mcp \
--header "Authorization: Bearer $MILLIMETRY_API_TOKEN"

That saves the token in your own Claude Code settings. To share the server with your team, put it in the project’s .mcp.json instead. Claude Code fills in ${MILLIMETRY_API_TOKEN} from each person’s environment, so the file holds no secret:

{
"mcpServers": {
"millimetry": {
"type": "http",
"url": "https://mcp.millimetry.app/mcp",
"headers": { "Authorization": "Bearer ${MILLIMETRY_API_TOKEN}" }
}
}
}

In .cursor/mcp.json (one project) or ~/.cursor/mcp.json (every project):

{
"mcpServers": {
"millimetry": {
"url": "https://mcp.millimetry.app/mcp",
"headers": { "Authorization": "Bearer ${env:MILLIMETRY_API_TOKEN}" }
}
}
}

Cursor has to see the variable, so set it where Cursor starts, or launch Cursor from a terminal that has it.

In .vscode/mcp.json. VS Code asks for the token the first time and keeps it in its secret storage:

{
"inputs": [
{
"type": "promptString",
"id": "millimetry-token",
"description": "Millimetry API token (mt_…)",
"password": true
}
],
"servers": {
"millimetry": {
"type": "http",
"url": "https://mcp.millimetry.app/mcp",
"headers": { "Authorization": "Bearer ${input:millimetry-token}" }
}
}
}

In ~/.codex/config.toml. Codex reads the token from the variable you name:

[mcp_servers.millimetry]
url = "https://mcp.millimetry.app/mcp"
bearer_token_env_var = "MILLIMETRY_API_TOKEN"

Any client that speaks Streamable HTTP and can send a header works: point it at https://mcp.millimetry.app/mcp with Authorization: Bearer mt_….

Claude and ChatGPT apps: sign in, no token

Section titled “Claude and ChatGPT apps: sign in, no token”

claude.ai, the Claude desktop and mobile apps, Cowork and ChatGPT connect by signing in rather than with a token. Add the URL as a custom connector, and Millimetry asks you to sign in and tick the organizations it may read:

  1. Claude: Settings → Connectors → Add custom connector, name it Millimetry and enter https://mcp.millimetry.app/mcp. Claude sends you to millimetry.app to sign in (an emailed link, as always), then shows what it asks for.
  2. ChatGPT: Settings → Connectors (developer mode) → Create, with the same URL.
  3. On the consent page, check where you will be sent back (claude.ai or chatgpt.com; for a desktop app, a page on your own computer), tick the organizations, and allow.

A connection reads as a viewer: the stats of the organizations you ticked, and nothing it could change. It is yours, not the organization’s: it stops reading an organization the moment you leave it, and you end it any time under Account → Connected assistants. Claude Code also connects this way when you add the server without a header (claude mcp add --transport http millimetry https://mcp.millimetry.app/mcp): it opens the sign-in in your browser.

Replit’s Agent adds a remote MCP server from a share link. This one adds Millimetry; Replit then sends you through the same sign-in:

Add Millimetry to Replit

Millimetry is its own OAuth 2.1 authorization server, at https://millimetry.app (its metadata is at /.well-known/oauth-authorization-server; the MCP server’s at https://mcp.millimetry.app/.well-known/oauth-protected-resource/mcp). Clients identify with a Client ID Metadata Document from a known host (Claude’s and ChatGPT’s) or register dynamically; every client is public and uses PKCE (S256). Access tokens last an hour, refresh tokens thirty days and rotate; a refresh token used twice ends the connection. Tokens made this way work only on the MCP server, never on the REST API, where an API token is the credential.

Read everything the dashboard shows: headline numbers and daily series, breakdowns by any dimension, events and their properties, funnels (saved or ad hoc), what happens after an event, sessions, the weekday-by-hour heatmap, the last five minutes, AI agents, AI traffic, what changed since a date, whether a release helped, and your plan’s usage. The reference lists every tool.

Set up and manage, with a token that can change settings: add apps and sites and their origins, add and revoke keys, issue a forwarding secret for a proxy or the AI agents middleware, save and delete funnels, mark releases, subscribe to a daily digest or the anomaly watch by email or a signed webhook, export events, rename the organization, invite people and change their roles, list and revoke tokens, and get Stripe links to subscribe or manage billing. Changes that take something away (a key, a secret, an origin, someone’s access, an app) are marked as such, so your client asks you before it runs them.

What it can’t tell you is what Millimetry never records. Visitor IDs change every day, so there is no retention, no returning users and no one person’s history. The server tells your assistant this, and asks it to report daily visitors as daily visitors. If an answer says “unique users this month”, the assistant got it wrong.

  • The values are your visitors’ words. Event names, pages, referrers and property values come from your app’s users and your site’s visitors, and they end up in your assistant’s context. The server tells the model to treat them as data, never as instructions, but a model can be fooled. With a read-only token, nothing in Millimetry can change. With one that can change settings, keep your client asking before it runs a tool that changes something (most clients ask by default), and read what it’s about to do. Be as careful as you’d be with any web page you show an assistant, especially when it can also use your email or other tools in the same chat.
  • The token is the key. Anyone holding a read-only token can read your organization’s numbers; anyone holding one that can change settings can do what you can. Give each person or tool its own token, read-only unless it needs more, and revoke one in settings if it leaks.