Zero-Copy Agent Protocol

ZAP

One endpoint to rule all MCP servers

MCP made tool integration easy — but JSON everywhere doesn't scale. ZAP uses zero-copy serialization: low allocation, low memory, built for agent swarms.

40–50×
Lower overhead
↓ Infra
RAM + CPU
< 1 μs
Local hop
0
JSON parsing

Why ZAP?

Purpose-built for agent swarms. Every design decision optimizes for low latency and minimal resource consumption.

Collapse the Server Explosion

MCP sidecars per agent → duplicated processes, schemas, idle RAM. ZAP → shared tool backends behind a single endpoint.

Lower Latency at Swarm Scale

Fewer processes, fewer context switches, fewer parsers → better p95/p99 under load.

Built for ZAP↔ZAP

Run pure ZAP for maximum efficiency, or bridge MCP while migrating. Full interoperability.

Zero-Copy Native

ZAP's zero-copy serialization means no parsing overhead. Data stays in wire format, accessed directly in memory.

Zero Allocation Hot Path

Pre-allocated buffers and arena allocation eliminate GC pressure during request handling.

MCP Gateway Mode

Wrap existing MCP servers transparently. One ZAP endpoint can proxy 12+ MCP servers with automatic schema federation.

Capability-Based Security

Fine-grained permissions at the tool level. Delegate only what agents need, nothing more.

Lux Consensus Ready

Optional coordination layer using Lux metastable consensus for distributed agent swarms.

Simple to Use

One daemon, multiple backends. Agents maintain a single long-lived connection.

Terminal
# Connect 12 MCP servers → 1 ZAP endpoint
$ zapd serve --port 9999
$ zapd add mcp --name github --url stdio://gh-mcp
$ zapd add mcp --name slack --url http://localhost:8080
$ zapd add mcp --name db --url zap+unix:///tmp/postgres.sock
# Agents connect once: zap://localhost:9999

zapd multiplexes tools/resources across MCP servers (or ZAP-native servers).

Architecture

ZAP acts as a unified gateway, federating multiple tool servers behind a single endpoint.

┌─────────────────────────────────────────────────────────────────┐
│                        Agent Swarm                               │
│  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐             │
│  │ Agent 1 │  │ Agent 2 │  │ Agent 3 │  │ Agent N │    ...      │
│  └────┬────┘  └────┬────┘  └────┬────┘  └────┬────┘             │
│       │            │            │            │                   │
│       └────────────┴─────┬──────┴────────────┘                   │
│                          │                                       │
│                          ▼                                       │
│              ┌───────────────────────┐                           │
│              │      ZAP Gateway       │                           │
│              │   zap://localhost:9999│                           │
│              │                       │                           │
│              │  • Schema Federation  │                           │
│              │  • Request Routing    │                           │
│              │  • Capability Control │                           │
│              └───────────┬───────────┘                           │
│                          │                                       │
│       ┌──────────────────┼──────────────────┐                    │
│       │                  │                  │                    │
│       ▼                  ▼                  ▼                    │
│  ┌─────────┐       ┌─────────┐       ┌─────────┐                │
│  │MCP Srv │       │ZAP Srv │       │MCP Srv │                │
│  │ GitHub  │       │ Native  │       │ Slack   │    ...         │
│  └─────────┘       └─────────┘       └─────────┘                │
└─────────────────────────────────────────────────────────────────┘
N:1
Agents share one connection
1:M
Gateway fans out to backends
0
Duplicate tool processes
v0.2.1

Ready to scale your agent swarm?

Join the next generation of agent infrastructure.
Welcome to Hanzo AI. All aboard for a greener agentic future.

Performance claims depend on workload, payload size, and topology. "40–50×" refers to measured reductions in process duplication + parsing overhead in representative swarm benchmarks.