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

Uploaded Python 3Windows ARM64

gcf_proxy-0.5.0-py3-none-win_amd64.whl (1.3 MB view details)

Uploaded Python 3Windows x86-64

gcf_proxy-0.5.0-py3-none-manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded Python 3

gcf_proxy-0.5.0-py3-none-manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded Python 3

gcf_proxy-0.5.0-py3-none-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

gcf_proxy-0.5.0-py3-none-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: gcf_proxy-0.5.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.3 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.5.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 580a78cfb3abd0c23065b2f5a189a68a2614f0801c04f19c98f322615afb1cb8
MD5 963e25a99417b63c9b06176423818fe5
BLAKE2b-256 ec11778030371ac2e8a2b99a59b53763e300ab2ceb7499440943c931c7f356dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gcf_proxy-0.5.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.3 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.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ebf49070035daaaac68d0547c4b239a0ace08402399a204bf574eadc6d6f22cd
MD5 1a0b9e76d4602d9048c510a44d66a848
BLAKE2b-256 2b8706b6f321759f0034985c0d7741d80b2d1829c5858c2b44900e53fbc957f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.5.0-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a28ec29bd144a78f18f0ddba00c6f3dcf5aa26f3a9132343c989199a5d107c14
MD5 c628af6a0d5527e0d2d69a378e06a179
BLAKE2b-256 3be092cf16a0c42e14279e98a7e4dc20ce430ed4d31bb2f4b34860e6bc05a0d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.5.0-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6b3a0cbf49685f225f2668ea94f0062c1cf45bd0e39840ea02b4a04740a80ff6
MD5 9cefd6be0ccba44888e863a0b654fd48
BLAKE2b-256 5b40bfcf4f74116ed6221d9e854353105e9c7d1b85498a8b5f504c226a13f7ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.5.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05b09492f5a35f56e0deb9c908770d0295b123cb73f1512cfbedb51b35bd968e
MD5 2963365f3e46b3ee0a522e5e61b93984
BLAKE2b-256 805258b54098ab13345d6884fe5536521a59087a0c6edec820c16efe322c10c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gcf_proxy-0.5.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7d1e239b356cc71e9be305e5bd55585c0d8a67428a4faa4000bf1959e02d6fac
MD5 167a354a9ab93f04a6b28787bd160656
BLAKE2b-256 e7b2f2ddfbc7ab656c34607c722053a206195dd0cbf8d5ce44414795b7526eca

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