spect8-mcp
v0.7.1
Published
Spect8 local MCP server: captures tool events + token usage from Cursor, Codex CLI and Claude Code via passive log tailing + deterministic hooks (no agent cooperation needed), with self-healing install. Posts HMAC-signed batches to the Spect8 ingest API.
Readme
spect8-mcp
Captures how you use AI coding tools — Cursor, Claude Code, and Codex CLI — and forwards the telemetry (metadata only) to the Spect8 ingest API.
Capture is deterministic and automatic: it does not depend on the agent choosing to call any tool. It works via each IDE's own signals —
- Claude Code — lifecycle hooks (
~/.claude/settings.json) + the session JSONL for token usage. - Codex CLI — a passive tailer over
~/.codex/sessions/**that derives tool events + token usage from Codex's own logs. No hooks needed. - Cursor — hooks (
~/.cursor/hooks.json) for tool events; token usage from Cursor's local DB, and (for teams) the Cursor Admin API.
Install
One command. It opens your browser to link this machine, then auto-detects and configures every supported IDE it finds:
npx -y spect8-mcp setupThat's the whole thing. On success it prints Connected ✓ and the capture tier
per IDE. Re-running it is safe (idempotent), and the running server self-heals
its config, so removed hooks come back on their own.
Options
# Configure just one IDE
npx -y spect8-mcp setup --ide cursor # cursor | claude-code | codex
# Check status / re-verify
npx -y spect8-mcp detect # list detected IDEs + capture tier
npx -y spect8-mcp doctor # config + connectivity checks
# Re-write or remove config
npx -y spect8-mcp install all # cursor | claude-code | codex | all
npx -y spect8-mcp uninstall allInstall globally instead of npx if you prefer:
npm install -g spect8-mcp
spect8 setupNon-interactive / CI
Supply the key and ingest URL directly (skips the browser):
SPECT8_INGEST_HMAC_KEY=<key> npx -y spect8-mcp setup --ide cursor
# or, positionally:
npx -y spect8-mcp setup <key> <ingest_url> --ide cursorConfig lives in ~/.spect8/config.json; every field also has a SPECT8_
env-var equivalent (SPECT8_INGEST_URL, SPECT8_DEVELOPER_ID, …). Set
SPECT8_NO_AUTO_INSTALL=1 to disable the server's self-heal.
What gets written
~/.cursor/mcp.json,~/.cursor/hooks.json(Cursor)~/.claude/settings.json(Claude Code hooks)~/.codex/config.toml(Codex MCP entry; capture is via the tailer)~/.spect8/config.json(your key + developer id)
Nothing is written into your project/repo. Secrets are never placed in IDE config files.
