
Tokei Agent
io.github.gilesdawe由 GitHub 帳號 gilesdawe 發布v0.3.8更新於 Oct 30, 2026
Control your Tokei (tokei.io) pre-launch and waitlist campaigns from AI agents and the command line.
概覽
本機 MCP 伺服器,讓助理透過 Tokei v1 REST API 讀取與管理 Tokei 的預熱與候補名單活動。
- 可以做什麼
- 核對帳戶:驗證金鑰並查看方案與 API 用量
- 瀏覽活動:列出並讀取頁面,含獎品、獎勵級別與公開連結
- 查看成效:彙總統計、排行榜、推薦轉換排行、得獎者抽選紀錄、報名與問卷回覆
- 查看設定:Webhook 訂閱、頁面範本、報名動作類型與 Webhook 事件類型
- 以讀寫金鑰變更活動:複製、更新、發布或下架頁面,新增報名,上傳媒體
- 管理 Webhook:建立與刪除 HTTPS 訂閱
- 適用情境
- 適合正在經營 Tokei 候補名單或預熱活動、希望助理在對話中直接取得分析資料、報名與問卷資料,或起草並套用頁面變更的情境。
- 執行需求
- 以 npm 套件 tokei-agent 透過 stdio 在本機執行,需要 Node 22.12+。需在 TOKEI_API_KEY 提供 Tokei API 金鑰,且 API 存取需要有效的訂閱或終身方案。可選的 TOKEI_API_URL 可覆寫 API 基礎網址。需要連線至 tokei.io 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tokei Agent,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
tokei-agent
Control your Tokei pre-launch and waitlist campaigns from the command line — and from AI agents like Claude Code and OpenClaw. Wraps the Tokei v1 REST API with JSON-only output, zero runtime dependencies.
Install
Requires Node 22.12+.
Claude Code
Install it as a plugin and the tokei-agent skill comes with it — Claude then
knows the whole command surface without being told:
Set TOKEI_API_KEY (see Quick start) and you're done. The CLI
itself still runs via npx, so there is nothing else to install.
Quick start
-
Create an API key at tokei.io → Dashboard → Settings → API Keys. Pick read-only unless you need to change things; API access requires an active subscription or lifetime plan.
-
Export it — the syntax differs by shell:
- Try it:
Every command prints JSON to stdout with a top-level rate_limit object. Exit codes: 0 success, 1 API/network error, 2 usage error (JSON on stderr).
Interactive output (0.3.1+). When stdout is an interactive terminal, the CLI renders a banner and a human-readable summary instead of raw JSON. When stdout is a pipe, a redirect, CI, or the
mcptransport, it prints exactly the JSON it always has — so agents, scripts and MCP clients are unaffected. SetTOKEI_OUTPUT=jsonto force JSON at a terminal too;NO_COLORdisables colour and animation, andTOKEI_NO_ANIM=1keeps the colour but stops the movement.
Known issue — exit codes on Node 24 / Windows (fixed in 0.3.0). On 0.2.2 and earlier the CLI could print its correct JSON output and then abort during process exit, corrupting the exit code (
$LASTEXITCODEread-1073740791/0xC0000409on success and failure alike). On an affected version, judge a run by the JSON on stdout, not by the exit status — or upgrade. (Historical labelling slip: the 0.3.0 tarball misreported--versionas0.2.2; 0.3.1+ reports correctly.)
Commands
Read (any key):
Write (needs a read+write key):
Write commands take simple fields as flags and full/nested bodies via --data '<json>' or --data @file.json (flags win on conflict). Run tokei-agent --help for every flag, or see SKILL.md — the agent-oriented reference bundled in this package, with worked examples and error-handling guidance.
MCP server
The package doubles as a local MCP server (stdio): every command above becomes an MCP tool (pages_list, pages_update, stats, …) for Claude Code, Claude Desktop, and other MCP clients.
Or in JSON config:
Environment
Agents, human in the loop
Tokei is built so agents draft and humans approve: give monitoring agents a read-only key, reserve read+write keys for agents that genuinely need to change things, and set key expiry. New webhook subscriptions created via the API trigger a security notification to the account owner.
Privacy Policy
Full policy: https://tokei.io/privacy
Data collection practices
tokei-agent is a thin client for the Tokei v1 REST API. It collects no data of
its own: there is no telemetry, no analytics, no crash reporting, and no
phone-home of any kind.
It reads exactly two inputs from your environment — TOKEI_API_KEY and the
optional TOKEI_API_URL — plus the arguments you pass on the command line (or
the arguments an MCP client passes to a tool call). For media:upload it also
reads the bytes of the local file you name.
Usage and storage
Your API key is used solely as an Authorization: Bearer header on requests to
your Tokei account. Command arguments become the request path, query string, or
JSON body. Nothing is written to disk: the CLI creates no config file, cache,
credential store, or log file, and holds nothing after the process exits.
API responses — which can include entrant email addresses, survey answers, and analytics — are printed as JSON to stdout. From that point they are handled by whatever invoked the CLI (your shell, your scripts, or your AI agent and its conversation history). Treat that output as the personal data it is.
Third-party sharing
Nothing is sold or shared with third parties. Data is transmitted only to:
- Tokei (
https://tokei.io, or the host you set inTOKEI_API_URL) — every command, to serve your request against your own account. - Tokei's object storage provider —
media:uploadonly. The CLI sends the file to the Tokei API, which stores it with the provider; the CLI never contacts the provider itself. The file becomes a public asset on your promotion page.
The CLI contacts no other host.
Data retention
The CLI retains nothing. Data held in your Tokei account — promotions, entries, survey responses — is retained under the Tokei privacy policy above, and you can request access or deletion there. API keys are created, scoped, expired, and revoked by you at Dashboard → Settings → API Keys; revoking a key immediately stops all access through it.
Contact information
Tokei — https://tokei.io/privacy — [email protected]
Docs
- API reference: https://tokei.io/docs/api
- OpenAPI spec: https://tokei.io/openapi.json
- Agent skill reference: SKILL.md
License
MIT
來源:README.md,提交 58a884e
工具
0版本歷史
3- v0.3.8最新Oct 23, 2026
- v0.3.7Oct 18, 2026
- v0.3.6Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分