Replace the TypeScript MCP conformance harness with Go schema-based validation #750
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#750
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While fixing the missing
resultTypeon tool results (#740), I confirmed a deeper problem with how I test MCP conformance here.Problem
The client-conformance harness (
conformance/mcp-client) pulls the official TypeScript MCP SDK into this Go repo to drivemadtea serveas a real client. That one dependency installs about 93 transitive npm packages (a full HTTP server and OAuth stack) to use only a stdio client. The harness is dev-only andnode_modulesis gitignored, but it is still a large surface to maintain, keep current, and scan.madtea does not implement the MCP protocol envelope. The go-sdk does: it frames every result and sets
resultTypeat the session layer. So the harness mostly validates the go-sdk's layer, not madtea's own code. The only MCP surface madtea controls is the tool schemas it defines (each tool'sinputSchema/outputSchema).Proposal
The authority for compliance is the official MCP schema (
schema.json), which is language-neutral. Validate against it in Go:tools/listschemas and its tool-call result envelopes against the official MCPschema.jsonfor each supported protocol revision.package.json/lock, and the TS step inscripts/mcp-conformance.sh, unless a concrete gap is proven first.internal/mcp/result_type_test.goonce the schema validator coversresultType.Tradeoff
Schema validation catches spec violations. It does not reproduce a specific client's extra strictness beyond the spec. By the spec-is-authority principle, a client that rejects spec-compliant output has its own bug, which I would report upstream rather than encode here.
Acceptance criteria
schema.jsonfor the supported protocol revision(s), and fails on a real violation.scripts/mcp-conformance.share removed (or a documented gap justifies keeping a minimal piece).internal/mcp/result_type_test.gois removed once the validator coversresultType.