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.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

本地代理,包装另一个 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 设置指向它。
安装前请注意
它位于客户端与上游服务器之间并转发所有调用,因此能看到全部工具流量和结果。句柄会持久化到本地数据库并设有可配置的 TTL,早前会话的数据可能仍可读取。网关会拦截 API 请求并向其中注入工具,从而改变模型看到的内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Jmunch Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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.

suiteupstreamdirect tokensvia jmunch-mcpsaved
GitHub (facebook/react issues/PRs/commits)@modelcontextprotocol/server-github379,87844,328335,550 (88.3%)
Firecrawl (Wikipedia scrapes + site map + search)firecrawl-mcp259,5742,928256,646 (98.9%)

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:

suitedirectvia jmunch-mcpdelta
GitHub8.4s6.8s−1.6s (−19.0%)
Firecrawl16.4s9.2s−7.2s (−43.9%)

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

bash
pip install jmunch-mcp

From source:

bash
git clone https://github.com/jgravelle/jmunch-mcpcd jmunch-mcppip install -e .

Quickstart

bash
jmunch-mcp init

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

bash
jmunch-mcp --config examples/config.toml

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.

bash
pip install 'jmunch-mcp[gateway]'jmunch-mcp gateway --config configs/gateway.example.toml# listening on http://127.0.0.1:7879

Point your app:

bash
# OpenAI SDK, LangChain, Aider, Continue, Cline, Ollama-compat apps:export OPENAI_API_BASE=http://127.0.0.1:7879/v1
# Native Anthropic SDK / Claude Code:export ANTHROPIC_BASE_URL=http://127.0.0.1:7879

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's tools array 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.db with 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.

bash
jmunch-mcp dashboard              # http://127.0.0.1:7878jmunch-mcp dashboard --open       # also open in your default browser

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
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分