Tokei LogoTokei
Connect

Connect your AI to Tokei

One URL works in every client that supports remote MCP servers. Your AI then runs your campaigns as you.

Want the terminal CLI or the full overview? See Tokei Agent.

The 60-second version

  1. Have a Tokei Subscriber plan. API access is included.
  2. Add the URL below to your AI client as a remote MCP server.
  3. Sign in to Tokei when the browser opens, then ask for something.
https://tokei.io/mcp

Setup by client

Claude (claude.ai and desktop)

OAuth

Add Tokei as a custom connector. The same connector works in the desktop app.

  1. Open Settings → Connectors and choose Add custom connector.
  2. Name it Tokei and paste the URL below.
  3. Choose Connect, sign in to Tokei, and press Allow.
https://tokei.io/mcp

Claude Code

OAuth

One command registers the server, then you sign in once.

  1. Register the server.
  2. Run /mcp inside Claude Code, pick tokei, and sign in to Tokei in the browser.
claude mcp add --transport http tokei https://tokei.io/mcp

Headless (CI, cron): an API key instead of a browser sign-in

claude mcp add --transport http tokei https://tokei.io/mcp --header "Authorization: Bearer tokei_k_..."

Any client that takes a remote MCP URL

OAuth

Point the client at the URL. It finds the sign-in page by itself.

  1. Add a remote (Streamable HTTP) server with the URL below. Config key names vary by client.
  2. Sign in to Tokei when the client opens the browser.
https://tokei.io/mcp

Clients that only speak stdio

OAuth

The mcp-remote bridge turns the remote URL into a local command.

  1. Use this command as the server command in the client's MCP config.
npx -y mcp-remote https://tokei.io/mcp

Local server (no remote URL)

API key

Runs on your machine and talks to the Tokei API with a key.

  1. Create an API key in Settings, then register the server with it.
claude mcp add tokei --env TOKEI_API_KEY=tokei_k_... -- npx -y tokei-agent mcp

CLI and REST API

API key

For agents that can run a shell or make HTTP calls, no MCP needed.

  1. Set TOKEI_API_KEY, then run any command. Output is JSON when piped.
  2. The REST API is documented at /docs/api, and the spec is at /openapi.json.
npx tokei-agent pages:list

When you need an API key

Scripts, cron jobs and CI have no browser to sign in with. Send a key as Authorization: Bearer tokei_k_... to the same URL. Keys are read-only by default and can expire. Create one in Settings, and read how agent-safe keys work.

Example prompts

  • “List my Tokei pages and tell me which ones are live.”
  • “Clone my last giveaway and move the end date to Friday.”
  • “Who are my top 10 referrers this week?”
  • “Show me this month's signups for my waitlist page, grouped by day.”
  • “Draft a new waitlist page from one of your templates, and show it to me before you publish.”
  • “Set up a webhook that posts new entries to https://example.com/hooks/tokei.”

Tools

The connector exposes 21 tools. Write tools are marked as writes, so your client can ask before it runs one.

ToolWhat it doesAccess
meVerify API keyRead
pages_listList promotion pagesRead
pages_getGet promotion pageRead
statsGet page analyticsRead
leaderboardGet page leaderboardRead
referrals_topGet top referrersRead
winners_listGet selection-run winnersRead
entries_listList entriesRead
surveys_listList survey responsesRead
templates_listList templatesRead
actions_catalogList entry-action catalogRead
events_catalogList webhook event catalogRead
pages_cloneCreate page from clone or templateWrite
pages_updateUpdate promotion pageWrite
pages_publishPublish pageWrite
pages_unpublishUnpublish pageWrite
entries_createCreate entryWrite
webhooks_listList webhooksRead
webhooks_createCreate webhook subscriptionWrite
webhooks_deleteDelete webhook subscriptionWrite
media_uploadUpload media from a URLWrite

Good to know

  • Each connection is one Tokei account. Your AI sees only the pages that account owns.
  • Disconnect any time in Settings → Connectors → Connected apps. The sign-in stops working at once.
  • Calls count against the same rate limits as the API. A 429 answer says when the quota resets.
  • Entrant data your AI reads can end up in that AI's conversation history. See the privacy policy.

Hand your next launch to your agent

Create an API key, point tokei-agent at it, and let Claude Code or Cursor run the busywork — you stay in the loop for anything that goes public.