Repository navigation
v0.1.0
First tagged release of zig-mcp-sdk, a Model Context Protocol SDK for Zig 0.16.0.
Highlights
- Comptime tool schemas:
types.schemaForStructgenerates MCP JSON Schema from a plain Zig struct at compile time;types.parseArgsparses incoming arguments into the same struct, so schema and parser cannot drift. Server(Handler): comptime-generic MCP server over stdio with request-scoped arena allocators, full lifecycle handling, and protocol version negotiation.- Streamable HTTP transport: session management, Origin validation (DNS rebinding protection), Content-Type/Accept validation, configurable body size limit. Cross-platform session IDs via
Io.randomSecure. - Logging:
logging/setLevelrouting andContext.sendLogMessagefornotifications/message. - Claude channel support: channel events, permission relay, experimental capabilities.
- Conformance-tested: CI runs the full test suite plus a stdio conformance script covering the handshake, tools, resources, prompts, error codes, and parse-error recovery.
See CHANGELOG.md for details.
Install
zig fetch --save https://github.com/PaytonWebber/zig-mcp-sdk/archive/refs/tags/v0.1.0.tar.gz