Transparent MCP proxy that reduces token cost of large tool responses via content-aware handles
Project description
jmunch-mcp
Transparent MCP proxy that reduces the token cost of large upstream tool responses. 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.
| suite | upstream | direct tokens | via jmunch-mcp | saved |
|---|---|---|---|---|
GitHub (facebook/react issues/PRs/commits) |
@modelcontextprotocol/server-github |
379,878 | 44,328 | 335,550 (88.3%) |
| Firecrawl (Wikipedia scrapes + site map + search) | firecrawl-mcp |
259,574 | 2,928 | 256,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:
| suite | direct | via jmunch-mcp | delta |
|---|---|---|---|
| GitHub | 8.4s | 6.8s | −1.6s (−19.0%) |
| Firecrawl | 16.4s | 9.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.
Quickstart
pip install -e .
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
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.
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.
jmunch-mcp dashboard # http://127.0.0.1:7878
jmunch-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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jmunch_mcp-0.0.3.tar.gz.
File metadata
- Download URL: jmunch_mcp-0.0.3.tar.gz
- Upload date:
- Size: 63.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e833437a4c6998f6e7d88fef5308e61c502a49ccc25fb3cae08d7198654006d6
|
|
| MD5 |
8973354aa01a3a44bd273698cc60fd5d
|
|
| BLAKE2b-256 |
6ba44ffbebc2de7fd8578cccc608ee2d0a7b2a532a67fb8c0e29b110b18de734
|
File details
Details for the file jmunch_mcp-0.0.3-py3-none-any.whl.
File metadata
- Download URL: jmunch_mcp-0.0.3-py3-none-any.whl
- Upload date:
- Size: 56.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d056c7c7754ac2b0dd1ccccbcf637c1b14065a7271dbc77b35b2feec2460d8
|
|
| MD5 |
0cc2997253e56c43b40f753de17e1f81
|
|
| BLAKE2b-256 |
7a5b8e976bc0d7a0aa6c70f7b156a34623889921a22a2b7e93efa0e205ca46ee
|