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. 100% comprehension accuracy (13/13) where JSON scores 76.9% and TOON scores 92.3%.

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, tabular 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 100% (13/13) 11,090 79% fewer
TOON 92.3% (12/13) 16,378 69% fewer
JSON 76.9% (10/13) 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.2.0-py3-none-win_arm64.whl (1.9 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3

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

Uploaded Python 3

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

Uploaded Python 3macOS 11.0+ ARM64

gcf_proxy-0.2.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.2.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: gcf_proxy-0.2.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 1.9 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.2.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 80aeb5f2cb7850750aec7122e6282d16195934ce88f0306d9a21826581173209
MD5 820ef476f22a8e343755eccb85620dba
BLAKE2b-256 c1c3e95beade62b9b7b1757bf6636afb2ad0af89576c78f9424e8cfe7c46d759

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcf_proxy-0.2.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.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 927cb49cd9ca84c59ce9f72ffb83b79074e55b84e378a00bf779a01f2af48f31
MD5 c1711b1674e8d4f48abb4cb58ee1978f
BLAKE2b-256 d83aafe28a9b847b1d744b7c67667cc26e026f9d24642e25185b55924e9a4031

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.2.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d056e13357f610653a3efae5732f66a594293dbab3863f5d3fea45fa62acf5c
MD5 f761f0f4664a591c5881e7698f6df267
BLAKE2b-256 1dec780323ad736636df6b971844bfcc1dd49b0fb3b76fb758c6576ae5d6e43d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.2.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 04b9f56a2b9d87321420014b12bfafb52d5818a7deaea13ca2a249d421354683
MD5 368bc80cc1de711eca93b1fb2f8e60ea
BLAKE2b-256 b0dceba8daea8133b5cddfbd95477ae1efdd60dfc8829d15009a7f18a688ecfc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8112499863ee37953173067ee7125e7a57e22f9fcc7c2e0d2522145e2e95725
MD5 39db42da22e53fe7f8726716a9bf293e
BLAKE2b-256 b184812851787714236fb2be5aa0a734553853764a2e4c2570a1ea884988b12a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.2.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a081fdf229e87bcdfee942098e059d3566ead5694a386f3801eebff06881ba8d
MD5 aeb4424f449f2b1bbd0ca311dbe6e6e8
BLAKE2b-256 64b078e477f856becb6ce41465261535e18059b6305ad52a5d009b8a86965571

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