Connect your AI agent
Your coding agent can set Millimetry up for you. Connect it once, ask it to “Add Millimetry to this project”, and it creates the app or site in your account, installs the Swift or Android SDK or the web tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive. Connecting takes a few minutes.
Get a token. Sign in at millimetry.app, name your organization and choose Create a token for my agent. Already signed up? In your organization's settings, under API tokens, make one that can change settings.
Connect Claude Code. Paste the command Millimetry shows with your new token into a terminal. It looks like this:
Terminal window claude mcp add --transport http millimetry \https://mcp.millimetry.app/mcp \--header "Authorization: Bearer mt_…"Give it Millimetry's skills, from your project's root:
Terminal window npx skills add https://docs.millimetry.app -a claude-code -yAsk it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: run
claudein your project and ask it:Add Millimetry to this project.It creates the app or site in your account, installs the SDK or the tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive.
Get a token. Sign in at millimetry.app, name your organization and choose Create a token for my agent. Already signed up? In your organization's settings, under API tokens, make one that can change settings.
Your agent reads the token from your environment each time it starts. Add this line to your shell profile (
~/.zshrcon a Mac) with your token in it, then open a new terminal:Terminal window export MILLIMETRY_API_TOKEN=mt_…Connect Codex:
Terminal window codex mcp add millimetry --url https://mcp.millimetry.app/mcp \--bearer-token-env-var MILLIMETRY_API_TOKENGive it Millimetry's skills, from your project's root:
Terminal window npx skills add https://docs.millimetry.app -a codex -yAsk it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: run
codexin your project and ask it:Add Millimetry to this project.It creates the app or site in your account, installs the SDK or the tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive.
Get a token. Sign in at millimetry.app, name your organization and choose Create a token for my agent. Already signed up? In your organization's settings, under API tokens, make one that can change settings.
Your agent reads the token from your environment each time it starts. Add this line to your shell profile (
~/.zshrcon a Mac) with your token in it, then open a new terminal:Terminal window export MILLIMETRY_API_TOKEN=mt_…Connect Cursor. Restart it so it sees the token, then add Millimetry to Cursor, or put this in
.cursor/mcp.json(this project) or~/.cursor/mcp.json(every project):{"mcpServers": {"millimetry": {"url": "https://mcp.millimetry.app/mcp","headers": {"Authorization": "Bearer ${env:MILLIMETRY_API_TOKEN}"}}}}Give it Millimetry's skills, from your project's root:
Terminal window npx skills add https://docs.millimetry.app -a cursor -yAsk it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: open a new chat in Agent mode and ask it:
Add Millimetry to this project.It creates the app or site in your account, installs the SDK or the tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive.
Get a token. Sign in at millimetry.app, name your organization and choose Create a token for my agent. Already signed up? In your organization's settings, under API tokens, make one that can change settings.
Connect VS Code. Put this in your project's
.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}"}}}}Give GitHub Copilot Millimetry's skills, from your project's root:
Terminal window npx skills add https://docs.millimetry.app -a github-copilot -yAsk it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: open Copilot Chat in Agent mode and ask it:
Add Millimetry to this project.It creates the app or site in your account, installs the SDK or the tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive.
Get a token. Sign in at millimetry.app, name your organization and choose Create a token for my agent. Already signed up? In your organization's settings, under API tokens, make one that can change settings.
Connect your agent. Any client that speaks Streamable HTTP and can send a header works: point it at
https://mcp.millimetry.app/mcpwithAuthorization: Bearer mt_….Give it Millimetry's skills, from your project's root. The command asks which agents to install them for: Gemini CLI, OpenCode, Windsurf and dozens more.
Terminal window npx skills add https://docs.millimetry.appAsk it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: open your agent in your project and ask it:
Add Millimetry to this project.It creates the app or site in your account, installs the SDK or the tracker with the real key, adds the events that matter, saves the funnel and checks the first events arrive.
The Claude and ChatGPT apps connect to servers by signing in with OAuth, which Millimetry doesn't offer yet. Use one of the agents above until it does.
What it does when you ask
Section titled “What it does when you ask”- Finds your app or site in Millimetry, or creates it. For a website, it reads the domains from your project, because Millimetry takes events only from the site’s own domains.
- Adds the Swift package, the Android library or the tracker’s script tag, with the real key.
- Picks the events that matter for your product, names them by the naming guide and keeps personal data out of them.
- Saves your main funnel, so the dashboard shows something from the first day.
- Runs the app or opens the site and checks that the first events arrive.
It asks you only for what needs you, such as a decision about your product or a deploy. Anything that takes something away, such as revoking a key, is marked so that your agent asks you first.
Then ask it anything
Section titled “Then ask it anything”The same connection reads your numbers and changes your settings:
- “Track the onboarding funnel and the paywall.”
- “How did the paywall convert last week, by app version?”
- “Which campaigns sent visitors to /pricing this month?”
- “Add our staging domain to the site’s origins.”
- “Invite sam@example.com as a viewer.”
What you connected
Section titled “What you connected”- The token lets your agent act in Millimetry as you, with your role. A token that can change settings can do what you can, apart from deleting the organization, making tokens and changing owners. For an agent that should only read your numbers, make a read-only token instead. You can revoke either in your organization’s settings at any time. About tokens
- The MCP server at
https://mcp.millimetry.app/mcpis how your agent reads and changes things in Millimetry. Ask your assistant covers each client in more depth, including sharing the connection with your team. - The skills tell your agent how to install Millimetry well: which events to add, how to name them, and what never to put in them. Agent skills
If it doesn’t work
Section titled “If it doesn’t work”- The agent knows nothing about Millimetry. Agents load servers and skills when a session starts, so start a new one.
claude mcp listorcodex mcp listshows whether the server is connected. - It says the token is missing or refused. Codex and Cursor read
MILLIMETRY_API_TOKENwhen they start. Check that the variable is in your shell profile, then restart them. A revoked token stops working at once: make a new one. - A website shows no events. Millimetry takes events only from the site’s own domains. Ask your agent to check the site’s origins.
- You use the Claude or ChatGPT app. They connect to servers by signing in with OAuth, which Millimetry doesn’t offer yet. The details
Without a token
Section titled “Without a token”Install only the skills (step 3) and ask the same thing. Your agent installs Millimetry the same way, and asks you for the app’s or site’s key, which the dashboard shows under Add an app or site. Or install it yourself: an Apple app, an Android app or a website.