Skip to content

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.

  1. 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.

  2. 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_…"
  3. Give it Millimetry's skills, from your project's root:

    Terminal window
    npx skills add https://docs.millimetry.app -a claude-code -y
  4. Ask it to set Millimetry up. Agents load servers and skills when a session starts, so start a new one: run claude 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.

  1. 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.
  2. Adds the Swift package, the Android library or the tracker’s script tag, with the real key.
  3. Picks the events that matter for your product, names them by the naming guide and keeps personal data out of them.
  4. Saves your main funnel, so the dashboard shows something from the first day.
  5. 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.

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.”
  • 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/mcp is 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
  • The agent knows nothing about Millimetry. Agents load servers and skills when a session starts, so start a new one. claude mcp list or codex mcp list shows whether the server is connected.
  • It says the token is missing or refused. Codex and Cursor read MILLIMETRY_API_TOKEN when 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

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.