HomePapers / BenchmarksMcp2cli登場、MCPより96-99%少ないトークンで全APIをCLI化

Mcp2cli登場、MCPより96-99%少ないトークンで全APIをCLI化 Show HN: Mcp2cli – One CLI for every API, 96-99% fewer tokens than native MCP

元記事を読む 鮮度 OK
AI 3 行サマリ
  • Mcp2cliは任意のAPIを単一のCLIとして公開し、ネイティブMCPに比べ96〜99%少ないトークン消費でLLMエージェントから利用できるようにするツール。
  • 冗長なツール定義を避け、必要時にヘルプを参照する設計で効率化を図る。
English summary
  • HN: 146 points, 100 comments · @knowsuchagency · https://news.ycombinator.com/item?id=47305149

Mcp2cliは、任意のAPIをLLMエージェント向けの単一CLIとして提供するオープンソースツールで、Model Context Protocol (MCP) のネイティブ実装に比べ96〜99%のトークン削減をうたう点が特徴だ。エージェント時代のツール統合における「コンテキスト肥大化」問題に対する一つの解決策として注目される。

MCPAnthropicが提唱した、LLMが外部ツールやデータソースに接続するための標準プロトコルで、ClaudeやCursorなど主要なエージェント環境で採用が進んでいる。しかし運用上の課題として、接続したサーバーが提供するツール定義(スキーマ)が会話の冒頭で全てコンテキストに注入され、ツール数が増えるほどトークン消費が膨らむ点が指摘されてきた。複数のMCPサーバーを併用すると、実作業に入る前に数万トークンが消費されるケースも珍しくない。

Mcp2cliはこの構造を逆転させ、APIをCLIサブコマンド群として表現する。エージェントは最初にすべての引数仕様を読み込む代わりに、必要に応じて --help を呼び出して目的のサブコマンドだけを把握する。Unixの伝統的な発見可能性 (discoverability) をLLMの推論ループに当てはめた設計といえる。結果として、初期コンテキストには軽量なエントリポイントだけが載り、深い情報は使用時にのみ取得される。

Mcp2cliは任意のAPIを単一のCLIとして公開し、ネイティブMCPに比べ96〜99%少ないトークン消費でLLMエージェントから利用できるようにするツール。
🔬 Papers / Benchmarks · 本記事のポイント

類似の発想は他にも見られ、Cloudflareの「code mode」やAnthropic自身が示唆した、ツールをコードとして扱いオンデマンドで読み込むアプローチと方向性を共有していると見られる。エージェント設計のベストプラクティスがプロトコル先行から効率重視へ揺り戻している兆候とも解釈できる。

一方で、96〜99%という数字は特定のベンチマーク条件下での値である可能性が高く、実ワークロードでの効果はAPIの粒度や呼び出しパターンに依存するだろう。CLI経由の間接化により学習済みのMCPクライアント機能(進捗通知、サンプリング等)が一部失われる懸念もあり、採用にあたっては自身のエージェント構成との適合を見極める必要がある。

Mcp2cli is an open-source project that wraps arbitrary APIs as a single command-line interface designed for LLM agents, claiming a 96-99% reduction in token usage compared to native Model Context Protocol (MCP) servers. It tackles one of the more practical pain points of the current agent stack: context bloat caused by tool schemas.

MCP, introduced by Anthropic, has become a de facto standard for connecting LLMs to external tools and data sources, with adoption across Claude Desktop, Cursor, and a growing ecosystem of community servers. The protocol's design, however, front-loads every connected server's tool definitions into the model's context window. Once a user wires up several MCP servers, tens of thousands of tokens can be consumed before any real work begins, and agents must reason over a long catalog of tools they may never use.

Mcp2cli inverts that pattern. Instead of exposing each API operation as a discrete MCP tool with a full JSON schema, it presents the API as a CLI with subcommands. The agent sees only a lightweight entry point and discovers capabilities on demand by invoking --help on specific subcommands, much like a human developer exploring an unfamiliar tool. This brings classic Unix-style discoverability into the LLM reasoning loop, keeping the initial context small and deferring detail until it is actually needed.

The idea is not isolated. Cloudflare recently described a related pattern called code mode, in which tools are exposed as code that the agent imports as needed, and Anthropic itself has discussed treating tools as on-demand modules rather than always-on schemas. Together these approaches suggest the agent community is shifting away from eager schema injection toward lazy, code-like discovery, with token economics as a primary driver.

That said, the headline 96-99% figure should be read with caution. Such savings likely reflect specific benchmarks comparing a fully loaded MCP setup against a minimal CLI entry point, and real-world gains will depend on the granularity of the underlying API, how often the agent needs to consult help text, and how chatty the resulting tool calls become. There may also be tradeoffs around features that MCP clients handle natively, such as streaming progress, structured errors, sampling, or capability negotiation, which a CLI shim cannot fully replicate without extra plumbing.

For teams already feeling the cost and latency impact of large MCP toolsets, Mcp2cli is worth evaluating as a complementary or alternative integration layer, particularly for read-heavy REST APIs where help-driven exploration maps cleanly to subcommands. Whether this style supplants schema-first MCP or merges into it as a discovery optimization remains to be seen, but it reflects a healthy maturation of how the field thinks about giving agents access to the outside world.

  • SourceHacker News - AI codingT3
  • Source Avg ★ 1.5
  • Typeコミュニティ
  • Importance ★ 情報 (lower priority in Papers / Benchmarks)
  • Half-life ⏱️ 短命 (ニュース)
  • LangEN
  • Collected2026/06/30 19:00

本ページの本文・要約は AI による自動生成です。正確性は元記事 (github.com) をご確認ください。

🔬 Papers / Benchmarks の他の記事 もっと見る →

URL をコピーしました