HeadlinesBriefing favicon HeadlinesBriefing.com

mcptoon: 97% Token Savings for MCP CLI

Hacker News •
×

GitHub’s activeing123/mcptoon delivers a 97% less tokens MCP CLI client that slashes tool‑discovery cost from 10,000+ to 350 tokens. The lightweight, zero‑dependency tool is cross‑platform and compatible with any AI agent that can execute shell commands, making it a universal MCP client for Claude Code, Codex, Open Code, Cursor, Cat Paw, and more.

mcptoon replaces verbose JSON with Token‑Optimized Object Notation (TOON), compressing tool discovery and results into a compact 5‑token representation. In benchmarks it saves 6097% on tool‑lists (≈2,000 tokens → 350) and 56‑60% on structured results, translating to 30‑55% of a 128K context window saved. The CLI offers `manifest --toon`, `call <tool> --toon`, and `--json` fall‑backs, plus a pure‑Python API in `mcptoon.client`.

Setup is trivial: `mcptoon init` creates `~/.mcptoon/config.json`, add servers with `mcptoon add`, and the same config serves all agents. The project ships at 50KB, requires Python 3.10+, and includes safety checks that block dangerous operations unless `--destructive` is supplied. No telemetry, no third‑party deps, and local usage tracking keep privacy intact.

The open‑source project, licensed under Apache 2.0, invites contributions and aims to help developers save tokens and streamline MCP integration.