Labsco
blackwell-systems logo

gcf-proxy

โ˜… 5

from blackwell-systems

Drop-in MCP proxy that losslessly re-encodes JSON tool responses as GCF. 71% fewer tokens, 100% comprehension across 1,700+ LLM evaluations. Zero code changes.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

gcf-proxy

Bidirectional MCP proxy that translates between JSON and GCF. Drop-in, zero changes to your server or client. Works with any structured data format.

100% comprehension on every frontier model. 29% fewer tokens than TOON, 56% fewer than JSON (2,400+ evals, 11 models, 3 providers). Nested object flattening with opt-out for open-weight models. One line change in your MCP config.

Try it (30 seconds, no auth)

gcf-proxy --verbose uvx yfinance-mcp

Use it with any MCP client. When tools return structured JSON, the proxy re-encodes to GCF and logs savings to stderr:

gcf-proxy: get_price_history              54.0KB -> 28.1KB (48% saved)
gcf-proxy: get_ticker_info                10.0KB -> 7.4KB (26% saved)
gcf-proxy: get_price_history              53.8KB -> 27.9KB (48% saved)

--- gcf-proxy session stats ---
Tool calls rewritten:  3
JSON bytes in:         117.8KB
GCF bytes out:         63.4KB
Bytes saved:           54.4KB (46.2%)
Est. tokens saved:     ~13.6K
-------------------------------

Real live stock data from Yahoo Finance. 118KB of JSON reduced to 63KB. ~13,600 tokens saved in 3 tool calls.

How it works

  1. Spawns your MCP server as a subprocess
  2. Proxies stdin/stdout between client and server
  3. Responses: intercepts JSON-RPC responses, re-encodes structured JSON as GCF
  4. Requests: scans tool call arguments for GCF strings, decodes to JSON
  5. Passes everything else through unchanged in both directions

Why not modify the server?

Sometimes you can't. The server is a third-party binary, or it's maintained by another team, or you just don't want to add a dependency. gcf-proxy gives you the token savings without touching server code.

If you control the server, use the GCF libraries directly for better control over session deduplication and delta encoding.

Benchmarks

100% general comprehension on every frontier model. 91.2% on adversarial code graphs (vs TOON 68.8%, JSON 54.1%). Wins 15/16 datasets on token benchmark.

EvalGCFTOONJSON
General comprehension100%100%100%
Adversarial code graphs (500 symbols)91.2%68.8%54.1%
Token efficiency (16 datasets)15/16 wins1/16baseline

Reproduce comprehension eval: git clone https://github.com/blackwell-systems/gcf-go && cd gcf-go/eval && GOWORK=off go test -run TestComprehension -v -timeout 0

Reproduce token benchmark: git clone https://github.com/blackwell-systems/toon && cd toon && git checkout gcf-comparison && cd benchmarks && pnpm install && pnpm benchmark:tokens

More links