Tokei LogoTokei
Tokei Agent

Put Tokei to work with AI and enterprise-grade automation

A CLI and MCP server that lets Claude Code, Cursor, or any MCP client run your Tokei giveaway and prelaunch campaigns — clone a page, edit copy, pull stats, and wire up webhooks.

17 agent operationsRead-only keys by defaultHuman-in-the-loop approvals

Drop it into any agent

Claude Code
Cursor
OpenClaw
Any MCP client
Direct CLI

Join hundreds of creators who automate their launches with Tokei

Your agent handles your marketing while you stay in control.

How it works

Launch your first automated workflow

Three real exchanges — building a page, reading stats, and wiring automation — run entirely from an agent or the terminal.

Example output — the numbers are illustrative; the commands and field names are real.

1

Create or edit a launch page from chat

The agent clones a proven starter, then reshapes it. pages:updatePATCHes copy, dates and reward tiers — iterating until it's right.

claude code — tokei
youClone the giveaway starter and set it up for our March launch.
agentCloning the platform starter, then updating the title and end date.
$npx tokei-agent pages:clone --title "Win the March Launch Bundle"
{ "data": { "id": "a1b2c3d4", "title": "Win the March Launch Bundle", "status": "draft" } }
$npx tokei-agent pages:update a1b2c3d4 --end-date 2026-03-31 \ --data '{"reward_thresholds":[{"id":"tier-1","points":100,"rewardType":"custom","rewardDescription":"Early access","isEnabled":true}]}'
{ "data": { "id": "a1b2c3d4", "end_date": "2026-03-31T23:59:59Z", "status": "draft" } }
agentDraft updated. It stays a draft until you publish it.
2

Monitor campaign stats from chat

Ask in plain language; the agent runs read commands and summarizes. A read-only key covers everything — stats, leaderboard and entries:list.

claude code — tokei
youHow's the March giveaway doing?
$npx tokei-agent stats a1b2c3d4
{ "data": { "total_entries": 1284, "unique_participants": 977 } }
$npx tokei-agent leaderboard a1b2c3d4 --per-page 3
{ "data": [ { "rank": 1, "full_name": "Ari", "entry_points": 340 }, { "rank": 2, "full_name": "Sam", "entry_points": 295 } ] }
agent1,284 entries from 977 people. Ari leads with 340 points.
3

Wire up a webhook for real-time events

Subscribe to entry.created. The whsec_ signing secret is shown once; deliveries are HMAC-signed and retried on failure.

bash — webhooks
# entry.created is the only event; the whsec_ secret is shown once
$npx tokei-agent webhooks:create \ --url https://hooks.acme.dev/tokei --events entry.created
{ "data": { "id": "wh_7c1e", "url": "https://hooks.acme.dev/tokei", "events": ["entry.created"], "secret": "whsec_a1b2c3d4e5f6..." } }
# store whsec_... now — deliveries carry an X-TOKEI-Signature (HMAC-SHA256) and retry on failure

Works with your agent

Drop it into any MCP client

Claude Code

One command to connect

Register the MCP server and Claude Code can call all 17 operations as tools — no wrapper code.

$claude mcp add tokei --env TOKEI_API_KEY=tokei_k_... -- npx -y tokei-agent mcp

A SKILL.md agent reference ships inside the npm package — all 17 commands with worked examples.

OpenClaw & others

Skill-native, or just shell out

The bundled SKILL.md carries OpenClaw-compatible frontmatter, so the agent picks it up as a first-class skill.

Prefer no MCP at all? Any agent that can run a shell can call npx tokei-agent <command> directly — every command prints JSON to stdout.

Agent-safe keys

Let your AI safely access Tokei

Giving an autonomous agent access to your account should feel safe by default. Tokei API keys are built for exactly that.

Read-only by default

The key-creation UI defaults to read-only scope. Write access is opt-in, so an agent can only change things when you deliberately hand it a write key.

Keys that expire

Set an expiry of 1, 7, 30, 90, or 365 days — 90 days by default. Hand an agent a one-day key and a leaked credential can't linger.

Security email on webhook create

Whenever a webhook is created via the API, you get a security email — so a new outbound integration can never be set up silently.

Rate limits agents can read

Every authenticated response carries X-RateLimit-* headers, so a well-behaved agent self-throttles instead of hammering the API.

Human in the loop

The agent drafts and operates. You approve.

Nothing that reaches the public happens on its own. Page changes going live, emails, winner picks — each one waits for a human to approve it. The agent does the legwork: cloning, editing drafts, pulling stats, and preparing changes for your sign-off.

This is a product principle, not a limitation — it's how you move fast without shipping something you didn't mean to.

For agents & developers

Point your agent at the docs

Agents discover Tokei through /llms.txt — the index that links the API reference, the OpenAPI spec, and the tokei-agent tooling.

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.