Files
zeekay 1f44b494d1 Initial: zap-mcp v0.1 schema
Model Context Protocol over ZAP — mutually authenticated, non-repudiable.

Schema-first release: schema/zap_mcp.zap defines the wire format in
ZAP schema language. Reference implementations follow in v0.2 once
zap-proto/spec provides cross-language codegen.

See https://github.com/zap-proto/papers/tree/main/agent-communication for the
formal analysis.
2026-05-06 13:26:25 -07:00

55 lines
1.4 KiB
Plaintext

# zap-mcp — Model Context Protocol over ZAP.
#
# MCP is a JSON-RPC 2.0 protocol for AI agents calling tool servers.
# zap-mcp wraps each JSON-RPC message in a ZAP frame, signed with the
# calling agent's ML-DSA-65 key. Verifiers years later can reconstruct
# whether a given agent issued a given call without trusting any
# operator log or HTTP middleware.
#
# See zap-proto/papers/agent-communication for the non-repudiation
# theorem and concrete bounds.
# Frame is the unit on the wire. Either a JSON-RPC request or response,
# wrapped with provenance (sigSubject, sig, sessionId, seqNum).
struct Frame
sessionId Text
seqNum UInt64
sigSubject Text # which agent's key signed this
sig Data # ML-DSA-65 signature over canonical(payload || envelope)
payload Payload
struct Payload
union
request Request
response Response
notify Notify
# Request matches the JSON-RPC 2.0 shape.
struct Request
id Text
method Text
params Data # opaque JSON or ZAP binary, content-type in `kind`
kind ParamKind
# Response matches the JSON-RPC 2.0 shape; exactly one of result/error.
struct Response
id Text
result Data
error Error
kind ParamKind
struct Error
code Int32
message Text
data Data
struct Notify
method Text
params Data
kind ParamKind
enum ParamKind
json
zapBinary
none