Skip to main content

MCP proxy that re-encodes JSON tool responses as GCF. Zero code changes.

Project description

gcf-proxy

MCP proxy that re-encodes JSON tool responses as GCF — the most token-efficient wire format for LLMs. Drop-in, zero code changes. A TOON/JSON alternative that saves 63-79% of tokens.

79% fewer tokens than JSON. 34% fewer than TOON. 90.5% average comprehension accuracy across 10 models and 3 providers. 1,300+ LLM evaluations. Zero training.

Docs: gcformat.com · Proxy Guide · Playground · GCF vs TOON

Install

pip install gcf-proxy

Setup (one line change)

Before:

{"mcpServers": {"yours": {"command": "your-mcp-server"}}}

After:

{"mcpServers": {"yours": {"command": "gcf-proxy", "args": ["your-mcp-server"]}}}

Your server keeps outputting JSON. The LLM receives GCF. Nothing else changes.

Works with Claude Code, Claude Desktop, VS Code, Cursor, and any MCP client.

What it does

LLM  ←──  GCF  ←──  gcf-proxy  ←──  JSON  ←──  Your Server
  1. Spawns your MCP server as a subprocess
  2. Proxies stdin/stdout between client and server
  3. Detects JSON payloads in tool responses
  4. Re-encodes as GCF (graph profile for code intelligence, generic profile for everything else)
  5. Non-convertible responses (text, HTML, errors) pass through unchanged

Savings

Tested on a real MCP tool response (10 symbols, 8 edges):

JSON   2,506 bytes  ~626 tokens
GCF      916 bytes  ~229 tokens

Savings: 63% fewer tokens

On a real agent-lsp blast_radius response (7 symbols, 47 callers):

JSON   6,515 bytes  ~1,628 tokens
GCF    4,866 bytes  ~1,216 tokens

Savings: 25% fewer tokens (generic encoding, no graph profile)

When to use

  • You can't modify the server (third-party binary, another team's code)
  • You want to test GCF savings without writing any code
  • You want zero-effort adoption on any existing MCP server

For session deduplication (92.7% savings) and delta encoding (81.2% savings), use the GCF libraries directly.

Also available on

  • npm: npm install -g @blackwell-systems/gcf-proxy
  • Go: go install github.com/blackwell-systems/gcf-proxy@latest

Benchmarks

Format Accuracy Tokens vs JSON
GCF 90.5% avg (10 models) 11,090 79% fewer
TOON 68.5% avg 16,378 69% fewer
JSON 53.6% avg 53,341 baseline

GCF wins all 6 datasets on TOON's own benchmark. 42% smaller on semi-uniform data, 34% on mixed-structure.

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

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gcf_proxy-0.4.0-py3-none-win_arm64.whl (2.2 MB view details)

Uploaded Python 3Windows ARM64

gcf_proxy-0.4.0-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

gcf_proxy-0.4.0-py3-none-manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded Python 3

gcf_proxy-0.4.0-py3-none-manylinux2014_aarch64.whl (2.3 MB view details)

Uploaded Python 3

gcf_proxy-0.4.0-py3-none-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

gcf_proxy-0.4.0-py3-none-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file gcf_proxy-0.4.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: gcf_proxy-0.4.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 6d71c25187eca3adc6f6b903d6a1b7eca6c46214403b4387d3447fd8cedccd7d
MD5 567a2bf2a0094d74fc101c1da0d4931c
BLAKE2b-256 9e208b95ce009ad949e42320fb437066e16cd2bc8b5eaf7300af2f657b6678cf

See more details on using hashes here.

File details

Details for the file gcf_proxy-0.4.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: gcf_proxy-0.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0acbe16213bf0d5e54a195cd9e4d7f5af544839ddce8c966acb71906b62d1999
MD5 2a39323b7a52e050f070ab322592f981
BLAKE2b-256 f4266ca7a9584e263cd69adf883cf1d94d7580e46122ac79c0f5a7a87f5e9c73

See more details on using hashes here.

File details

Details for the file gcf_proxy-0.4.0-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65c06da014b7af3a16284ff3361f23baa0a6f0b6eb4d2025f3297f62643fe2ab
MD5 042fefde0c770e784ce51a0a69667d77
BLAKE2b-256 0ec67a589268c6d1a039a02dd489f8d0918ee924ef51052c567a2bd77776c0f0

See more details on using hashes here.

File details

Details for the file gcf_proxy-0.4.0-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 26b08aaef7ff4711d7431b7eb0b7ed5fad92418c9121d19acc08b4e57e1c2f1c
MD5 e3c85367d1ba70428733cca797faebfe
BLAKE2b-256 98936345068f5b1698aaaa27ba0a1c46c513c31c3e10c63340b14a4d50fa7560

See more details on using hashes here.

File details

Details for the file gcf_proxy-0.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8edf829b8fed87771609eeb32a3172fe956e7adaecffb1d97da1722cc1496a2
MD5 3b4b6a318e75405ecd456a7f89789df1
BLAKE2b-256 089d8e39b75c7e47a71609223c9b47e8d73f6fdebf461fe28552c28514d41156

See more details on using hashes here.

File details

Details for the file gcf_proxy-0.4.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for gcf_proxy-0.4.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 965bc8913ba0421eb2628722afbfb1407ea98c54dca2ab85185c036a6c3c2b2e
MD5 fe1994dd5751c3255df089bf0ff5ee25
BLAKE2b-256 670f47e79163c0686b7aa40aaabf10754708861731f2c192a78a1047803f7485

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page