@blackwell-systems/gcf-proxy 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +82 -0
  2. package/bin/gcf-proxy +43 -0
  3. package/package.json +32 -0
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # gcf-proxy
2
+
3
+ MCP proxy that re-encodes JSON tool responses as [GCF](https://gcformat.com/) — the most token-efficient wire format for LLMs. Drop-in, zero code changes. A TOON/JSON alternative that saves 63-79% of tokens.
4
+
5
+ **79% fewer tokens than JSON. 34% fewer than TOON. 100% LLM comprehension at scale.**
6
+
7
+ Docs: [gcformat.com](https://gcformat.com/) · [Proxy Guide](https://gcformat.com/guide/proxy.html) · [Playground](https://gcformat.com/playground.html) · [GCF vs TOON](https://gcformat.com/guide/vs-toon.html)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install -g @blackwell-systems/gcf-proxy
13
+ ```
14
+
15
+ ## Setup (one line change)
16
+
17
+ **Before:**
18
+ ```json
19
+ {"mcpServers": {"yours": {"command": "your-mcp-server"}}}
20
+ ```
21
+
22
+ **After:**
23
+ ```json
24
+ {"mcpServers": {"yours": {"command": "gcf-proxy", "args": ["your-mcp-server"]}}}
25
+ ```
26
+
27
+ Your server keeps outputting JSON. The LLM receives GCF. Nothing else changes.
28
+
29
+ Works with Claude Code, Claude Desktop, VS Code, Cursor, and any MCP client.
30
+
31
+ ## What it does
32
+
33
+ ```
34
+ LLM ←── GCF ←── gcf-proxy ←── JSON ←── Your Server
35
+ ```
36
+
37
+ 1. Spawns your MCP server as a subprocess
38
+ 2. Proxies stdin/stdout between client and server
39
+ 3. Detects JSON payloads in tool responses
40
+ 4. Re-encodes as GCF (graph profile for code intelligence, tabular profile for everything else)
41
+ 5. Non-convertible responses (text, HTML, errors) pass through unchanged
42
+
43
+ ## Savings
44
+
45
+ Tested on a real MCP tool response (10 symbols, 8 edges):
46
+
47
+ ```
48
+ JSON 2,506 bytes ~626 tokens
49
+ GCF 916 bytes ~229 tokens
50
+
51
+ Savings: 63% fewer tokens
52
+ ```
53
+
54
+ On a real agent-lsp blast_radius response (7 symbols, 47 callers):
55
+
56
+ ```
57
+ JSON 6,515 bytes ~1,628 tokens
58
+ GCF 4,866 bytes ~1,216 tokens
59
+
60
+ Savings: 25% fewer tokens (generic encoding, no graph profile)
61
+ ```
62
+
63
+ ## When to use
64
+
65
+ - You can't modify the server (third-party binary, another team's code)
66
+ - You want to test GCF savings without writing any code
67
+ - You want zero-effort adoption on any existing MCP server
68
+
69
+ For session deduplication (92.7% savings) and delta encoding (81.2% savings), use the [GCF libraries](https://gcformat.com/ecosystem/implementations.html) directly.
70
+
71
+ ## Also available on
72
+
73
+ - PyPI: `pip install gcf-proxy`
74
+ - Go: `go install github.com/blackwell-systems/gcf-proxy@latest`
75
+
76
+ ## Links
77
+
78
+ - [Full Setup Guide](https://gcformat.com/guide/proxy.html)
79
+ - [GCF Specification](https://gcformat.com/reference/spec.html)
80
+ - [GCF vs TOON](https://gcformat.com/guide/vs-toon.html)
81
+ - [Playground](https://gcformat.com/playground.html)
82
+ - [GitHub](https://github.com/blackwell-systems/gcf-proxy)
package/bin/gcf-proxy ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { execFileSync } = require("child_process");
5
+ const os = require("os");
6
+
7
+ const PLATFORMS = {
8
+ "darwin-arm64": "@blackwell-systems/gcf-proxy-darwin-arm64",
9
+ "darwin-x64": "@blackwell-systems/gcf-proxy-darwin-x64",
10
+ "linux-arm64": "@blackwell-systems/gcf-proxy-linux-arm64",
11
+ "linux-x64": "@blackwell-systems/gcf-proxy-linux-x64",
12
+ "win32-x64": "@blackwell-systems/gcf-proxy-win32-x64",
13
+ "win32-arm64": "@blackwell-systems/gcf-proxy-win32-arm64",
14
+ };
15
+
16
+ const platform = os.platform();
17
+ const arch = os.arch();
18
+ const key = `${platform}-${arch}`;
19
+ const pkg = PLATFORMS[key];
20
+
21
+ if (!pkg) {
22
+ process.stderr.write(`gcf-proxy: unsupported platform ${key}\n`);
23
+ process.stderr.write(`Supported: ${Object.keys(PLATFORMS).join(", ")}\n`);
24
+ process.stderr.write(`Install from https://github.com/blackwell-systems/gcf-proxy/releases\n`);
25
+ process.exit(1);
26
+ }
27
+
28
+ const ext = platform === "win32" ? ".exe" : "";
29
+
30
+ let binPath;
31
+ try {
32
+ binPath = require.resolve(`${pkg}/bin/gcf-proxy${ext}`);
33
+ } catch {
34
+ process.stderr.write(`gcf-proxy: platform package ${pkg} is not installed\n`);
35
+ process.stderr.write(`Try: npm install -g @blackwell-systems/gcf-proxy\n`);
36
+ process.exit(1);
37
+ }
38
+
39
+ try {
40
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
41
+ } catch (err) {
42
+ process.exit(err.status ?? 1);
43
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@blackwell-systems/gcf-proxy",
3
+ "version": "0.1.0",
4
+ "description": "MCP proxy that re-encodes JSON tool responses as GCF. Zero code changes.",
5
+ "bin": {
6
+ "gcf-proxy": "bin/gcf-proxy"
7
+ },
8
+ "optionalDependencies": {
9
+ "@blackwell-systems/gcf-proxy-darwin-arm64": "0.1.0",
10
+ "@blackwell-systems/gcf-proxy-darwin-x64": "0.1.0",
11
+ "@blackwell-systems/gcf-proxy-linux-arm64": "0.1.0",
12
+ "@blackwell-systems/gcf-proxy-linux-x64": "0.1.0",
13
+ "@blackwell-systems/gcf-proxy-win32-x64": "0.1.0",
14
+ "@blackwell-systems/gcf-proxy-win32-arm64": "0.1.0"
15
+ },
16
+ "keywords": [
17
+ "gcf",
18
+ "mcp",
19
+ "proxy",
20
+ "llm",
21
+ "tokens",
22
+ "json",
23
+ "wire-format",
24
+ "toon-alternative"
25
+ ],
26
+ "homepage": "https://gcformat.com/",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/blackwell-systems/gcf-proxy.git"
30
+ },
31
+ "license": "MIT"
32
+ }