Sutr-dev999/bytepack
Fixed-size binary encoding for AI agent communication. 20x more compact than JSON.
Platform-specific configuration:
{
"mcpServers": {
"bytepack": {
"command": "npx",
"args": [
"-y",
"bytepack"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Fixed-size binary encoding for AI agent communication.
[](https://pypi.org/project/bytepack/) [](https://www.npmjs.com/package/bytepack-encode) [](https://opensource.org/licenses/MIT)
---
Encode any structured data into exactly 2,556 bytes. Always. 20x smaller than JSON.
from bytepack import encode
# Simple message: 2,556 bytes
encode({"action": "observe", "domain": "market"})
# Complex message: still 2,556 bytes
encode({"action": "correlate", "domain": "energy", "related": "geopolitics",
"confidence": 0.94, "evidence": ["reuters", "bbc", "ap"]})| | JSON | bytepack | |---|------|----------| | Message size | 5,000 — 50,000 bytes | 2,556 bytes (fixed) | | Size varies? | Yes | No | | Encode speed | N/A | 2,614 msg/sec | | Noise tolerance | 0% | 25% (survives bit corruption) | | Transport | Text only | Any (HTTP, WebSocket, UDP, binary) |
# Python
pip install bytepack
# JavaScript
npm install bytepack-encodefrom bytepack import encode, decode
result = encode({"action": "alert", "domain": "geo", "confidence": "high"})
print(f"{result['s']} bytes") # 2556
data = decode(result["b64"])const { encode, decode } = require('bytepack-encode');
const result = await encode({ action: 'alert', domain: 'geo' });
console.log(`${result.s} bytes`); // 2556Any MCP-compatible agent (Claude, GPT, Cursor, etc.) can use bytepack as a tool:
{
"name": "binary-encoding",
"tools": [
{ "name": "encode_binary", "description": "Encode structured data to 2556-byte binary" },
{ "name": "decode_binary", "description": "Decode binary back to structured data" }
]
}MCP manifest:
Loading reviews...