@zap-proto/mcp
v1.0.3
Published
Model Context Protocol over ZAP — mutually authenticated, non-repudiable AI agent ↔ tool communication
Maintainers
Readme
@zap-proto/mcp
Docs: Model Context Protocol over ZAP · part of the ZAP Protocol
Model Context Protocol over ZAP — mutually authenticated, non-repudiable AI agent ↔ tool communication.
zap-proto.io · Spec · Paper · Discord
@zap-proto/mcp layers AI agent ↔ tool semantics over the ZAP wire layer. Post-quantum confidentiality, mutual authentication, and zero-copy parse come from the wire (@zap-proto/zap); this package adds only the AI agent ↔ tool message shape: clients, servers, tool calls, and the transport that carries them.
Install
pnpm add @zap-proto/mcp@zap-proto/zap (the ZAP wire layer) is a dependency and is installed automatically.
Usage
// MCP server
import { ZapServer } from "@zap-proto/mcp/server";
const server = new ZapServer({ port: 9999 });
server.tool("search", "Search the web", {}, async (params) => ({
content: [{ type: "text", text: "results" }],
}));
await server.start();// Browser extension client
import { ExtensionClient } from "@zap-proto/mcp/browser";
const client = new ExtensionClient({ browser: "chrome", version: "1.0.0" });
const mcps = await client.discover();
const result = await client.callTool("search", { query: "hello" });Layering
| Layer | Package | Owns |
|---|---|---|
| Application | @zap-proto/mcp (this) | MCP message shape — tools, calls, agent ↔ tool semantics |
| Wire | @zap-proto/zap | ZAP zero-copy wire codec + Level-1 RPC primitives |
By the composability theorem, @zap-proto/mcp inherits ZAP's PQ confidentiality and mutual auth from the wire — no MCP-specific PQ analysis required.
Why
| Property | MCP-over-HTTP+SSE / stdio | @zap-proto/mcp |
|---|---|---|
| Confidentiality | TLS (classical) | X-Wing hybrid PQ (default) |
| Authentication | bearer / TLS cert | KEM keypair at transport |
| Wire encoding | text or per-protocol binary | ZAP wire, zero-copy |
| Identity binding | DNS / cert chain | zap-rns keypair |
| Future-quantum | classical only | hybrid by construction |
Sub-protocol family
zap-http— HTTP request/response over ZAPzap-ws— multi-stream pubsubzap-fix— FIX 4.4 / 5.0 trading channelzap-rns— KEM-bound service namingzap-mcp— Model Context Protocol over ZAPzap-acp— Agent Communication Protocolzap-a2a— Google Agent2Agent over ZAP
License
MIT OR Apache-2.0
