ZAP Protocol
Overview

ZAP vs MCP

Detailed comparison between ZAP and Model Context Protocol

ZAP vs MCP Comparison

ZAP is designed as a high-performance successor to MCP while maintaining full backward compatibility. This page details the key differences.

Performance

Serialization

AspectMCP (JSON-RPC)ZAP (Cap'n Proto)
FormatText (JSON)Binary
ParsingFull parse requiredZero-copy access
SizeLarger (verbose)2-10x smaller
CPUHigh (parsing)Minimal
MemoryAllocationsDirect access

Benchmarks

Real-world measurements on typical agent workloads:

Operation              MCP        ZAP        Speedup
---------------------------------------------------------
Tool list (100 tools)  45ms       0.4ms      112x
Tool call (small)      12ms       0.8ms      15x
Tool call (large)      89ms       2.1ms      42x
Resource read (1KB)    8ms        0.2ms      40x
Resource read (1MB)    156ms      4.2ms      37x

Protocol Features

MCP Features in ZAP

ZAP implements all MCP features:

FeatureMCPZAPNotes
ToolsYesYesSame semantics
ResourcesYesYes+ streaming
PromptsYesYesSame semantics
LoggingYesYesSame levels
InitializationYesYesCapability exchange

ZAP Extensions

Features unique to ZAP:

FeatureDescription
GatewayBridge MCP servers
CoordinatorAgent discovery
PQ HandshakePost-quantum security
RingtailThreshold signing
Agent ConsensusResponse voting
DID RegistryW3C identity
Resource StreamingReal-time updates

Security Comparison

Transport Security

AspectMCPZAP
DefaultNonePQ-TLS
Key Exchange-X25519 + ML-KEM-768
AuthenticationNone/BasicML-DSA-65
Forward Secrecy-Yes
PQ-ResistantNoYes

Identity

AspectMCPZAP
IdentityApplication-levelW3C DID
Methods-did:lux, did:key, did:web
Verification-On-chain optional
StakingNoYes (Lux)

Language Support

MCP SDKs

  • Python (official)
  • TypeScript (official)

ZAP Bindings

  • Rust (reference)
  • Go
  • Python
  • JavaScript/TypeScript
  • C++
  • C
  • Java
  • C#
  • Erlang
  • OCaml
  • Haskell

Migration Path

ZAP provides seamless migration from MCP:

// Create ZAP gateway
gateway := zap.NewGateway()

// Add existing MCP servers
gateway.AddServer("filesystem", "stdio://npx -y @modelcontextprotocol/server-filesystem", &zap.ServerConfig{
    Transport: zap.TransportStdio,
})

gateway.AddServer("github", "stdio://npx -y @modelcontextprotocol/server-github", &zap.ServerConfig{
    Transport: zap.TransportStdio,
    Auth: &zap.Auth{
        Bearer: os.Getenv("GITHUB_TOKEN"),
    },
})

// Use unified ZAP interface
tools, _ := gateway.ListTools()
result, _ := gateway.CallTool(&zap.ToolCall{
    Name: "read_file",
    Args: []byte(`{"path": "/etc/hosts"}`),
})

When to Use Which

Use MCP When

  • Prototyping quickly
  • Limited language support is acceptable
  • Performance is not critical
  • No security requirements

Use ZAP When

  • Production deployments
  • Performance-sensitive applications
  • Multi-agent coordination
  • Post-quantum security required
  • Need threshold signing
  • W3C DID identity needed
  • Bridging multiple MCP servers

Future Compatibility

ZAP is designed for forward compatibility:

  • Versioned schemas: Protocol evolution without breaking changes
  • Capability negotiation: Clients and servers declare supported features
  • Extension points: Room for future protocol extensions

Last updated on

On this page