# Mcp2cli – One CLI for every API, 96-99% fewer tokens than n…

Every MCP server injects its full tool schemas into context on every turn — 30 tools costs ~3,600 tokens/turn whether the model uses them or not. Over 25 turns with 120 tools, that's 362,000 tokens just for schemas. mcp2cli turns any MCP server or OpenAPI spec into a CLI at runtime. The LLM discove…

- **Page:** https://magpie.gallery/i/mcp2cli-one-cli-for-every-api-96-99-fewer-tokens-t-ktzo
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Runs on:** windows, macos, linux
- **Tags:** mcp, cli, tokens, openapi, llm

## Source

Web · knowsuchagency: Mcp2cli – One CLI for every API, 96-99% fewer tokens than native MCP

- **Original:** https://news.ycombinator.com/item?id=47305149

> Every MCP server injects its full tool schemas into context on every turn — 30 tools costs ~3,600 tokens/turn whether the model uses them or not. Over 25 turns with 120 tools, that's 362,000 tokens just for schemas. mcp2cli turns any MCP server or OpenAPI spec into a CLI at runtime. The LLM discovers tools on demand: mcp2cli --mcp https://mcp.example.com/sse --list # ~16 tokens/tool mcp2cli --mcp https://mcp.example.com/sse create-task --help # ~120 tokens, once mcp2cli --mcp https://mcp.example.com/sse create-task --title "Fix bug" No codegen, no rebuild when the server changes. Works with any LLM — it's just a CLI the model shells out to. Also handles OpenAPI specs (JSON/YAML, local or remote) with the same interface. Token savings are real, measured with cl100k_base: 96% for 30 tools over 15 turns, 99% for 120 tools over 25 turns. It also ships as an installable skill for AI coding agents (Claude Code, Cursor, Codex): `npx skills add knowsuchagency/mcp2cli --skill mcp2cli` Inspired by Kagan Yilmaz's CLI vs MCP analysis and CLIHub. https://github.com/knowsuchagency/mcp2cli https://github.com/knowsuchagency/mcp2cli

## GitHub projects

- https://github.com/knowsuchagency/mcp2cli

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
