mcptoon — MCP tool-catalog compression
mcptoon is a zero-dependency CLI. If it is not installed yet, one command sets
it up: pip install mcptoon (189KB, installs in seconds, nothing else pulled
in). It gives you a compressed view of the user's MCP tools and calls them
back.
When to use what
| Situation |
Command |
| User asks "what tools do I have" / you need the tool catalog |
mcptoon manifest (compact names only — ~2.2 tokens/tool) |
| You need one tool's real parameter schema before calling |
mcptoon inspect <server> <tool> |
| Find a tool by capability |
mcptoon search <query> |
| Call a tool |
mcptoon call <server> <tool> '{"arg":"value"}' |
| You don't know which server owns the tool |
mcptoon call --auto <tool> '{...}' |
| Huge JSON argument |
mcptoon call <server> <tool> --stdin |
| Tool returns images/base64 that must never be compressed |
mcptoon policy set <server> <tool> raw (one-time; applies to every later call) |
| Prove the token savings on this machine (tools + skills, one table) |
mcptoon bench (--roots DIR for any catalog; --json for scripts) |
| Diagnose connectivity/config |
mcptoon doctor |
Managing a skill catalog (mcptoon as the skill center)
Skills and MCP servers are the same shape — one source, many agent views — so
mcptoon skills manages both halves of a session's toolbox.
| Situation |
Command |
| See what skills exist |
mcptoon skills list (--usage adds per-skill hit counts) |
| Find the right skill for a task |
mcptoon skills resolve "<task>" (offline, instant, no LLM) |
| Distribute one source to every agent's skill folder |
mcptoon skills sync [SRC] [VIEW ...] (--dry to preview, --copy for real dirs) |
| Refuse "edited but forgot to bump the version" |
mcptoon skills sync --version-gate |
Regenerate the flat .md views (Roo / OpenCode) |
mcptoon skills sync --derived roo|opencode|all |
| Create / retire a skill |
mcptoon skills add <name> --desc "…" / mcptoon skills remove <name> |
| Retire a skill so a git sync cannot revive it |
mcptoon skills remove <name> --tombstone |
| Park drift/removals in a chosen graveyard |
add --archive DIR to sync or remove |
Sync views are links by default (a junction on Windows, no admin needed), so
one edit at the source is live everywhere and there is no second copy to drift.
Two safety rules hold: a real directory where a link belongs is archived, never
deleted, and a view that is itself a whole-directory link to the source is
left completely alone. remove moves the skill to a dated archive — a wrong
removal is a mv back, not a re-clone. --usage counts only skills mcptoon
routed; a skill an agent loaded directly is invisible there, and the output says
so rather than implying full coverage.
When another manager already runs the catalog
mcptoon is designed to take over from an incumbent sync script without a
cutover, by matching it byte for byte first:
--version-gate reads the same ledger the incumbent wrote
(skill_versions.json; override with MCPTOON_SKILLS_LEDGER), so both reach
the same verdict on the same bytes. A skill whose content moved while its
frontmatter version did not is blocked with a printed reason; --force lets
it through and rebaselines. An unversioned skill is warned about, not blocked.
--derived output is byte-identical to the incumbent's, including line
endings (a text-mode write turns the source's LF into CRLF on Windows), so a
derived view does not become a diff the next sync has to fight.
--tombstone commits a removal with a path-scoped git add. It will never
run a whole-repo git add -A: a real skill repo has hundreds of unrelated edits
in flight, and sweeping them into a "tombstone" commits another session's work.
Point mcptoon at sandbox views first with MCPTOON_SKILLS_VIEWS and run --dry
before any real sync. Do not run two managers against one view directory: during
a hand-over, one is the writer and the other is read-only.
Making mcptoon visible in a session
mcptoon serve returns an instructions field from the MCP initialize
handshake, so a connected client learns what mcptoon is without anyone editing
a system prompt, and can close a turn with one honest savings line. The figures
come from the mcptoon_usage tool, never from the model's estimate. Users who
find the line noisy turn it off once:
mcptoon config set footer off # persists; the next connection omits it entirely
Note this is advisory — it works only when the client honours instructions,
and only when mcptoon serve is actually registered with that agent.
Rules
- Prefer
mcptoon manifest over reading raw MCP tool listings — same
information, ~99% fewer tokens on large catalogs (255 tools: 71,929 → 581).
manifest output is a name index, not schemas. Keep it in context;
fetch the one schema you need with inspect, then call.
- Tool names in
call are server_tool (namespaced). --auto resolves
the server for you when the name is unambiguous.
- Never claim savings percentages you did not observe; if you quote numbers,
use the ones printed by the command itself —
mcptoon bench prints them for
this machine. It needs tiktoken for the exact figures; without it the table
is labelled an estimate, so do not report those as measured.
- If a Claude Code plugin install wired the
mcptoon serve bridge via
.mcp.json, tool discovery is already compressed for the host agent; use
the CLI commands above in terminal contexts or when the bridge is not
connected.
Setup
- Install/upgrade:
pip install --upgrade mcptoon (zero-dependency wheel,
189KB, installs in seconds). Confirm the upgrade before running it — pinning a
version here would only go stale, but a bare --upgrade should be your call,
not an automatic one.
- Source: this package is published to PyPI by GitHub Actions from
github.com/activeing123/mcptoon. If an install prompt shows any other
publisher or index, stop and check before continuing.
- Diagnose:
mcptoon doctor.
- Undo:
pip uninstall mcptoon removes the CLI. Its config lives in
~/.mcptoon/config.json (plus an optional per-project ./.mcptoon.json); remove
those files, or drop a single server with mcptoon remove <name>. Nothing outside
them is touched.
- Claude Code users get one-command setup instead:
/plugin marketplace add activeing123/mcptoon (installs the CLI, wires the
bridge, and bundles this skill).
1---2name: mcptoon3description: Compress MCP tool discovery with the mcptoon CLI. Trigger when a session has a large MCP tool catalog (many servers/tools), when the user mentions token cost, tool discovery, mcptoon, or asks to list/call MCP tools efficiently. Also route here when the user says the MCP tool list is too large, the agent context window is filling up with tool schemas, or they need the same MCP servers configured across Claude Code, Cursor, Codex, Cline, Windsurf and other agents. Also covers managing an agent's skill catalog with `mcptoon skills` (list / resolve / sync / add / remove, plus a version gate, derived Roo/OpenCode views, and tombstoned removals). mcptoon compresses 71,929 tokens of tool schemas to 581 (-99.2%) and serves as an MCP 2026-07-28 stateless-first bridge.4---56# mcptoon — MCP tool-catalog compression78mcptoon is a zero-dependency CLI. If it is not installed yet, one command sets9it up: `pip install mcptoon` (189KB, installs in seconds, nothing else pulled10in). It gives you a compressed view of the user's MCP tools and calls them11back.1213## When to use what1415| Situation | Command |16|---|---|17| User asks "what tools do I have" / you need the tool catalog | `mcptoon manifest` (compact names only — ~2.2 tokens/tool) |18| You need one tool's real parameter schema before calling | `mcptoon inspect <server> <tool>` |19| Find a tool by capability | `mcptoon search <query>` |20| Call a tool | `mcptoon call <server> <tool> '{"arg":"value"}'` |21| You don't know which server owns the tool | `mcptoon call --auto <tool> '{...}'` |22| Huge JSON argument | `mcptoon call <server> <tool> --stdin` |23| Tool returns images/base64 that must never be compressed | `mcptoon policy set <server> <tool> raw` (one-time; applies to every later call) |24| Prove the token savings on this machine (tools + skills, one table) | `mcptoon bench` (`--roots DIR` for any catalog; `--json` for scripts) |25| Diagnose connectivity/config | `mcptoon doctor` |2627## Managing a skill catalog (mcptoon as the skill center)2829Skills and MCP servers are the same shape — one source, many agent views — so30`mcptoon skills` manages both halves of a session's toolbox.3132| Situation | Command |33|---|---|34| See what skills exist | `mcptoon skills list` (`--usage` adds per-skill hit counts) |35| Find the right skill for a task | `mcptoon skills resolve "<task>"` (offline, instant, no LLM) |36| Distribute one source to every agent's skill folder | `mcptoon skills sync [SRC] [VIEW ...]` (`--dry` to preview, `--copy` for real dirs) |37| Refuse "edited but forgot to bump the version" | `mcptoon skills sync --version-gate` |38| Regenerate the flat `.md` views (Roo / OpenCode) | `mcptoon skills sync --derived roo\|opencode\|all` |39| Create / retire a skill | `mcptoon skills add <name> --desc "…"` / `mcptoon skills remove <name>` |40| Retire a skill so a git sync cannot revive it | `mcptoon skills remove <name> --tombstone` |41| Park drift/removals in a chosen graveyard | add `--archive DIR` to `sync` or `remove` |4243Sync views are **links** by default (a junction on Windows, no admin needed), so44one edit at the source is live everywhere and there is no second copy to drift.45Two safety rules hold: a real directory where a link belongs is **archived, never46deleted**, and a view that is *itself* a whole-directory link to the source is47left completely alone. `remove` **moves** the skill to a dated archive — a wrong48removal is a `mv` back, not a re-clone. `--usage` counts only skills mcptoon49routed; a skill an agent loaded directly is invisible there, and the output says50so rather than implying full coverage.5152### When another manager already runs the catalog5354mcptoon is designed to take over from an incumbent sync script **without a55cutover**, by matching it byte for byte first:5657- `--version-gate` reads the **same** ledger the incumbent wrote58 (`skill_versions.json`; override with `MCPTOON_SKILLS_LEDGER`), so both reach59 the same verdict on the same bytes. A skill whose content moved while its60 frontmatter `version` did not is blocked with a printed reason; `--force` lets61 it through and rebaselines. An unversioned skill is warned about, not blocked.62- `--derived` output is byte-identical to the incumbent's, **including line63 endings** (a text-mode write turns the source's LF into CRLF on Windows), so a64 derived view does not become a diff the next sync has to fight.65- `--tombstone` commits a removal with a **path-scoped** `git add`. It will never66 run a whole-repo `git add -A`: a real skill repo has hundreds of unrelated edits67 in flight, and sweeping them into a "tombstone" commits another session's work.6869Point mcptoon at sandbox views first with `MCPTOON_SKILLS_VIEWS` and run `--dry`70before any real sync. Do not run two managers against one view directory: during71a hand-over, one is the writer and the other is read-only.7273## Making mcptoon visible in a session7475`mcptoon serve` returns an `instructions` field from the MCP initialize76handshake, so a connected client learns what mcptoon is without anyone editing77a system prompt, and can close a turn with one honest savings line. The figures78come from the `mcptoon_usage` tool, never from the model's estimate. Users who79find the line noisy turn it off once:8081```bash82mcptoon config set footer off # persists; the next connection omits it entirely83```8485Note this is advisory — it works only when the client honours `instructions`,86and only when `mcptoon serve` is actually registered with that agent.8788## Rules89901. **Prefer `mcptoon manifest` over reading raw MCP tool listings** — same91 information, ~99% fewer tokens on large catalogs (255 tools: 71,929 → 581).922. `manifest` output is a **name index**, not schemas. Keep it in context;93 fetch the one schema you need with `inspect`, then call.943. Tool names in `call` are `server_tool` (namespaced). `--auto` resolves95 the server for you when the name is unambiguous.964. Never claim savings percentages you did not observe; if you quote numbers,97 use the ones printed by the command itself — `mcptoon bench` prints them for98 this machine. It needs `tiktoken` for the exact figures; without it the table99 is labelled an estimate, so do not report those as measured.1005. If a Claude Code plugin install wired the `mcptoon serve` bridge via101 `.mcp.json`, tool discovery is already compressed for the host agent; use102 the CLI commands above in terminal contexts or when the bridge is not103 connected.104105## Setup106107- Install/upgrade: `pip install --upgrade mcptoon` (zero-dependency wheel,108 189KB, installs in seconds). Confirm the upgrade before running it — pinning a109 version here would only go stale, but a bare `--upgrade` should be your call,110 not an automatic one.111- Source: this package is published to PyPI by GitHub Actions from112 `github.com/activeing123/mcptoon`. If an install prompt shows any other113 publisher or index, stop and check before continuing.114- Diagnose: `mcptoon doctor`.115- Undo: `pip uninstall mcptoon` removes the CLI. Its config lives in116 `~/.mcptoon/config.json` (plus an optional per-project `./.mcptoon.json`); remove117 those files, or drop a single server with `mcptoon remove <name>`. Nothing outside118 them is touched.119- Claude Code users get one-command setup instead:120 `/plugin marketplace add activeing123/mcptoon` (installs the CLI, wires the121 bridge, and bundles this skill).