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.3.0-py3-none-win_arm64.whl (2.0 MB view details)

Uploaded Python 3Windows ARM64

gcf_proxy-0.3.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

gcf_proxy-0.3.0-py3-none-manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded Python 3

gcf_proxy-0.3.0-py3-none-manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded Python 3

gcf_proxy-0.3.0-py3-none-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

gcf_proxy-0.3.0-py3-none-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: gcf_proxy-0.3.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.0 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.3.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 a10397c1499acbb1c21c1f90a0e5bc2bdc1d50d738fb6518c9f285dfad150000
MD5 99522983e2fc52c37c0f19b3f0e246a3
BLAKE2b-256 9f6e08c16703bcabf45e9cdfb7136a6c79a557b63d179abf2b45485d99775d03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcf_proxy-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 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.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 09da48ffa1ac4d6bb6727e763bef5dfbb0e795063ca3a81b3998ccef89f321c4
MD5 66cb55e44ada1fc67b816bf692450720
BLAKE2b-256 37583f77886d7da4e001ed51ec43c6039c523aabd0dcd106c2289e5b86ca541b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.3.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44e5562ec5236829c9ca531d98a850b437758af8ddfc51d223d5acb5cdf76603
MD5 a5bbd29b25a9031b5ebc3619c6a672c9
BLAKE2b-256 fd68883ff7d9219cd48f4453cd280154d3882538763da1afd1f7cd7af4aaf198

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.3.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dff0685529870e3858f49e54201528f7700aa58bcc1518d083e8eaed21ea67b3
MD5 38a4ba469a45da0f917bfc53dc77f359
BLAKE2b-256 9113b6b92fa7fc484546d41c222aeded045beb36f646dd52fc8d6507d1cb0020

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0b486501c022db46321cbb1ab12561277dedba3b5d9d34e7e749808f8760328
MD5 cfc266c0452c617788a000d9908eee78
BLAKE2b-256 7b895d08f66fa453e02ce0bbd8bf2b6f504350d4b33688efa47e1a2b542c7f93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.3.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0da2809b4cecb57c74bedfccc7217cbfd75365dc7f0f19b6662ad918969880e7
MD5 c55627d57831f18bbbe53017af6e7f5f
BLAKE2b-256 f3aa21fcfce28f199b547c4e34dda9c2a149254ef663ef3fb8d881356e39c390

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