convez.ai
MCP ServerIntegração & APIsIntermediário
blackwell-systems

GCF Proxy

blackwell-systems/gcf-proxy

Proxy MCP que reduz tokens em 53% convertendo JSON para GCF automaticamente

Ver no GitHub
BomPluginScore · de 0 a 100

MCP server proxy que converte JSON para GCF (Graph Columnar Format) automaticamente, reduzindo tokens em 25-71%. Funciona como tradutor bidirecional zero-config entre clientes MCP e servidores, diminuindo significativamente o custo de processamento sem exigir mudanças no código existente.

Instalação

$npx convez-ai blackwell-systems/gcf-proxy

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
11
Forks
1
Acompanhando
0
Saúde
42%
Último commit
há 1 mês
Versão
v0.11.5
Issues abertas
0
Contribuidores
1

Casos de uso

  • Reduzir custos de API ao integrar servidores MCP com modelos de linguagem
  • Otimizar transmissão de dados estruturados em workflows de IA
  • Deployar servidores MCP remotos com compressão automática de respostas

Veredito

Ferramenta técnica sólida que entrega economia real de tokens (verificada em 1.300+ avaliações) com implementação trivial. Ideal para quem já usa MCP e quer otimizar custos sem refatoração.

README

A tradução para o português deste README ainda está na fila.

gcf-proxy

Bidirectional MCP proxy that translates between JSON and GCF. Drop-in, zero changes to your server or client.

100% comprehension on every frontier model. 25.5% fewer tokens than TOON, 53% fewer than JSON (1,700+ evals, 10+ models, 3 providers). One line change in your MCP config.

Install

pip install gcf-proxy                                         # PyPI
npm install -g @blackwell-systems/gcf-proxy                   # npm
go install github.com/blackwell-systems/gcf-proxy@latest      # Go

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.

Usage

Local server (stdio)

Add gcf-proxy in front of any MCP server command:

{
  "mcpServers": {
    "memory": {
      "command": "gcf-proxy",
      "args": ["npx", "-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Remote server (HTTP)

Point --upstream at any Streamable HTTP MCP server:

{
  "mcpServers": {
    "remote": {
      "command": "gcf-proxy",
      "args": ["--upstream", "http://host:3000/mcp"]
    }
  }
}

Supports JSON and SSE responses. Session ID tracking via Mcp-Session-Id is automatic.

Deploy as HTTP service

--http turns the proxy into a remote Streamable HTTP server:

gcf-proxy --http :9090 --session your-mcp-server

Any MCP client that supports HTTP transport connects directly. Health check at /health. Chains with --upstream for fully remote deployments.

Both modes are bidirectional: server responses are encoded to GCF, GCF in tool call arguments is decoded to JSON. Neither side needs to change.

Responses: Server (JSON) -> LLM (GCF)

Before: {"tool":"context_for_task","symbols":[{"qualified_name":"pkg.Auth","kind":"function","score":0.78,...},...]}
After:  GCF profile=graph tool=context_for_task budget=5000 tokens=1900 symbols=50 edges=20
        ## targets
        @0 fn pkg.Auth 0.78 lsp_resolved
        ...

53-71% fewer input tokens.

Requests: LLM (GCF) -> Server (JSON)

If the LLM produces GCF in a tool call argument (63% fewer output tokens), the proxy decodes it to JSON before forwarding:

LLM sends:    {"tool": "process", "arguments": {"data": "GCF profile=generic\nname=Alice\nage=30\n"}}
Server gets:  {"tool": "process", "arguments": {"data": {"name": "Alice", "age": 30}}}

Detection is a 4-byte prefix check (GCF ). Zero overhead. Non-GCF strings pass through untouched.

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% comprehension on standard workloads. 90.7% on code graphs (vs TOON 68.5%, JSON 53.6%). Wins 13/15 datasets on expanded token benchmark.

FormatAccuracyTokensvs JSON
GCF100% (frontier models)11,090-24,00053-71% fewer
TOON68.5% avg16,37869% fewer
JSON53.6% avg53,341baseline

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

License

MIT - Dayna Blackwell / GCF

Ver o original no GitHub

Bom para

Relacionados