Export WAI application; turn golden fixtures into an API-agnostic conformance corpus - #24
Merged
Conversation
…rpus Two ideas from the dpella/mcp discussion (issue #9): - mcpApplication is exported (and re-exported from MCP.Server) so the MCP endpoint can be embedded into an existing WAI stack instead of transportRunHttp running its own Warp server. - The golden wire fixtures become a self-describing, API-agnostic conformance corpus: request/response pairs on disk enumerated by manifest.json, with the reference server documented in test/golden/README.md so other MCP implementations can consume it. Response fixtures are unchanged (renamed only); the runner is now manifest-driven. Version 0.2.1.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the two actionable ideas from the dpella/mcp merge discussion (#9), without taking any position on the merge itself.
Export the WAI application
mcpApplication :: HttpConfig -> McpServerInfo -> McpServerHandlers -> Wai.Applicationis now exported fromMCP.Server.Transport.Httpand re-exported fromMCP.Server— dpwiz's literal suggestion. The MCP endpoint can be mounted inside an existing WAI stack (own Warp settings, TLS, middleware, larger routers);httpPort/httpHostare documented as ignored when embedding, everything else (endpoint path check, Origin validation, bearer auth, subscriptions/listen streaming) applies unchanged. README gains an embedding section.Conformance corpus
The golden wire fixtures are restructured from inline Haskell strings into an on-disk, self-describing corpus: each case under
test/golden/is a.request.json/.response.jsonpair, enumerated bymanifest.json(which also records the reference-server variant and notification support per case), with the reference server fully documented intest/golden/README.md. Nothing in the corpus refers to Haskell — any MCP implementation reproducing the reference server can replay requests and diff responses, which is the neutral 'shared ground' the issue thread was circling.The response fixtures are byte-for-byte unchanged —
git mvrenames only (the v0.2.0 legacy anchor is preserved). The GoldenWire runner is now manifest-driven (runIO+ data files);GOLDEN_ACCEPT=1semantics unchanged (create-only, responses only).Verification
cabal checkclean;cabal sdistpacks the full corpus (requests, responses, manifest, corpus README) via extra-source-files, so the suite still runs from the sdist🤖 Generated with Claude Code