Skip to content

feat(cli): migrate exp mcp stdio server to official MCP Go SDK - #28057

Draft
ibetitsmike wants to merge 1 commit into
mike/mcp-go-sdk/coderd-http-serverfrom
mike/mcp-go-sdk/cli-stdio-server
Draft

feat(cli): migrate exp mcp stdio server to official MCP Go SDK#28057
ibetitsmike wants to merge 1 commit into
mike/mcp-go-sdk/coderd-http-serverfrom
mike/mcp-go-sdk/cli-stdio-server

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Stack Context

PR 2 of 6 in a stack that migrates every Coder MCP surface from the archived github.com/mark3labs/mcp-go library to the official github.com/modelcontextprotocol/go-sdk v1.7.0.

Stack: #28056 -> #28057 -> #28058 -> #28059 -> #28060 -> #28061

Why

coder exp mcp server (stdio) now uses the official SDK server with mcp.IOTransport over the invocation's stdin/stdout, and reuses the shared coderd/mcp.RegisterSDKTool helper from PR #28056 so both servers register tools identically.

  • A nopWriteCloser prevents the SDK from closing the invocation's stdout.
  • Tests send spec-compliant initialize params and notifications/initialized before tools/list because the official SDK enforces the protocol lifecycle.

Mux created this PR on Mike's behalf.

Replace mark3labs/mcp-go with the official SDK for coder exp mcp
server. Tool registration reuses coderd/mcp's RegisterSDKTool
adapter, preserving the allowlist, conditional registration of
user-authenticated tools and coder_report_task, and stdout purity
(protocol frames only, logs to stderr).

The SDK enforces the MCP lifecycle, so test fixtures now send a
spec-compliant initialize handshake before other requests.
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