Skip to content

CI - Integration Tests - #41

Closed
JanBeelte wants to merge 2 commits into
zigtools:mainfrom
StaffinityAI:ci-e2e
Closed

JanBeelte wants to merge 2 commits into
zigtools:mainfrom
StaffinityAI:ci-e2e

Conversation

@JanBeelte

Copy link
Copy Markdown

No description provided.

Jan Beelte added 2 commits November 1, 2026 09:29
Remove everything specific to the Language Server Protocol: the
metaModel.json code generator, offsets.zig, parser.zig,
basic_server.zig and the LSP examples. What remains has been adapted
for the Model Context Protocol (2025-11-25):

- json_rpc: lsp-kit's JSON-RPC 2.0 message types. Requests with a
  null id are rejected, as MCP requires. Adds the MCP error codes
  -32002 and -32042. Messages without params leave out the params
  field.
- Transport: keeps the vtable interface. Stdio now reads and writes
  newline-delimited JSON instead of Content-Length headers, and
  messages may be longer than the read buffer. Adds Transport.Stream
  for in-memory use and testing.
- types: hand-written MCP protocol types and method tables, with no
  build step.
- schema: generates JSON Schema from Zig types at comptime. Supports
  per-field descriptions and custom schemas.
- server: Server(Handler, config) with comptime dispatch on two
  levels. The server answers initialize, ping, logging/setLevel and
  tools/prompts list/call/get itself, and a Handler can override any
  method by declaring a function with its name. Handler functions get
  their arguments by type (handler, arena, *Context, params). Tool
  failures are returned as isError results. Tools that return a
  struct also produce structuredContent and an outputSchema.

Rename the package and module to blitzmcp, with a new fingerprint.
Add an example stdio server. Drop the codecov and GitHub Pages setup,
and pin CI to Zig 0.17.0.
Add a `ci` build step that runs everything CI runs: format check,
unit tests, build, docs and e2e tests. GitHub Actions now runs only
this step, so CI can be reproduced locally.

The e2e tests (`zig build e2e`) use the official MCP TypeScript SDK
client (pinned to 1.32.2) to drive examples/stdio_server.zig over
stdio. They cover the full roundtrip: protocol version negotiation,
tools (including schema-checked structured output), logging, progress,
resources, prompts and JSON-RPC error codes.
@JanBeelte JanBeelte closed this Nov 1, 2026
@JanBeelte
JanBeelte deleted the ci-e2e branch November 1, 2026 09:40
@JanBeelte
JanBeelte restored the ci-e2e branch November 1, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant