
Jmunch Mcp
io.github.jgravelle由 GitHub 帳號 jgravelle 發布v0.2.3更新於 Oct 24, 2026
Transparent MCP proxy. Turns fat tool responses into queryable handles: 88-99% fewer tokens.
概覽
本機代理,包裝另一個 MCP 伺服器,把龐大的工具回應轉為可查詢的控制代碼,減少 88–99% 的 token 用量。
- 可以做什麼
- 包裝單一上游 MCP 伺服器並轉送其工具呼叫,以精簡的控制代碼和摘要取代大體積回傳內容。透過通用動詞查詢控制代碼:peek、slice、search、aggregate、describe、summarize 與列出控制代碼。表格資料交由 SQLite 後端處理,JSON 資料交由 JSON 樹後端處理,支援 JSONPath 切片與搜尋。可選用閘道模式,對 OpenAI 或 Anthropic 風格的 HTTP API 流量做同樣的控制代碼化處理。在本機唯讀介面檢視轉送呼叫與 token 節省的指標。
- 適用情境
- 當助理使用的 MCP 伺服器回傳結果很大(例如 issue、提交、擷取或搜尋結果),希望降低 token 成本、避免逐頁讀取完整回應時適用。也適合呼叫 OpenAI 或 Anthropic 相容 API、希望不必改程式碼就獲得同樣效果的应用程式。
- 執行需求
- 以 Python 套件形式透過 pip 在本機安裝;閘道模式需安裝 gateway 附加元件。需要一個被包裝的上游 MCP 伺服器與設定檔,init 指令可從偵測到的用戶端設定產生。閘道在本機 HTTP 埠監聽,透過 base_url 設定指向它。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Jmunch Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
jmunch-mcp
Transparent MCP proxy that reduces the token cost of large upstream tool responses for nearly every other MCP server imaginable. Wraps a single upstream MCP, forwards every call, and handle-ifies fat payloads into content-aware backends the agent can query with a small set of universal verbs (peek, slice, search, aggregate, describe, list_handles).
Benchmarks
Measured end-to-end against two popular real-world MCP servers. Each run fires a fixed script of tool calls twice — once direct, once through jmunch-mcp — with three follow-up jmunch.* verb calls on the proxied side to model an agent drilling into a large result rather than slurping it whole.
Wall-clock time was also faster with the proxy on both suites, despite the extra verb calls — the agent never has to page through the fat payload:
Tabular content (GitHub) routes to the SQLite backend and answers peek/slice/aggregate; JSON content (Firecrawl scrape/map) routes to the JSON-tree backend and answers peek/slice (JSONPath)/search. See bench/README.md to reproduce.
Install
From source:
Quickstart
init scans three sources — your MCP client configs (Claude Desktop, Claude Code, Cursor, Windsurf, Continue), running processes, and a small catalog of popular upstreams (GitHub, Firecrawl, filesystem, fetch, Brave Search, Slack) — and renders a checklist. Tick the upstreams you want wrapped, and it writes one <name>.toml per selection into ./configs/. Non-interactive flags: --yes (pick everything already registered in a client), --dry-run, --overwrite, --out <dir>, --no-running, --no-catalog.
Manual
Configure your MCP client to launch jmunch-mcp --config <path> instead of the upstream server directly. Add --report to print a session summary on shutdown.
Gateway mode (v2 — universal proxy)
The MCP proxy above saves tokens for MCP clients. The gateway saves tokens for any AI application that speaks the OpenAI or Anthropic HTTP API — LangChain, LlamaIndex, CrewAI, AutoGen, Continue, Cline, Aider, or a raw SDK. No code changes in the app; just point base_url at jmunch.
Point your app:
What it does, transparently:
- Handle-ifies fat tool_results in outgoing requests — your app's tool returns 100KB of JSON, the model sees a 1KB summary + opaque handle.
- Injects jmunch verbs (
peek,slice,search,aggregate,describe,summarize,list_handles) into the request'stoolsarray so the model can drill in. - Short-circuits verb calls — when the model calls
jmunch_peek, the gateway resolves it locally against the handle registry and synthesizes the follow-up turn. The app never sees jmunch tool_calls; those completions cost zero upstream tokens. - Persists handles to
~/.jmunch/handles.dbwith a configurable TTL so they survive restarts and cross-session reads. - Streams both ways — OpenAI SSE and Anthropic event streams are buffer-then-replayed with correct verb resolution.
Per-request controls via headers:
X-Jmunch-Upstream: <name>— override the configured upstream.X-Jmunch-Inject: false— disable tool injection for this call (pure pass-through + request-side handle-ify only).
Metrics flow into the same dashboard as the MCP proxy. Filter with ?surface=gateway or ?surface=mcp on /api/stats and /api/calls.
Dashboard
A read-only local web UI over the metrics DB each proxy writes to. Shows cumulative totals, per-upstream breakdowns, and a time series of forwarded calls.
Flags: --port (default 7878), --host (default 127.0.0.1), --db <path> to point at a non-default metrics DB, --open to launch the browser. Metrics only populate once proxies have recorded calls, so run your client against a wrapped upstream first.
License
jmunch-mcp is released under the MIT License — free to use, modify, distribute, and embed in commercial products.
Note that licensing of upstream MCP services you proxy through jmunch-mcp is governed by those services' own terms. This applies to third-party MCP servers (GitHub, filesystem providers, vendor APIs) and to any sibling tools in the broader retrieval ecosystem you may compose with — check each upstream's license before redistribution.
來源:README.md,提交 ffa8ca5
工具
0版本歷史
1- v0.2.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分