feat(cli): migrate exp mcp stdio server to official MCP Go SDK - #28057
Draft
ibetitsmike wants to merge 1 commit into
Draft
feat(cli): migrate exp mcp stdio server to official MCP Go SDK#28057ibetitsmike wants to merge 1 commit into
ibetitsmike wants to merge 1 commit into
Conversation
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.
This was referenced Aug 12, 2026
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.
Stack Context
PR 2 of 6 in a stack that migrates every Coder MCP surface from the archived
github.com/mark3labs/mcp-golibrary to the officialgithub.com/modelcontextprotocol/go-sdkv1.7.0.Stack: #28056 -> #28057 -> #28058 -> #28059 -> #28060 -> #28061
Why
coder exp mcp server(stdio) now uses the official SDK server withmcp.IOTransportover the invocation's stdin/stdout, and reuses the sharedcoderd/mcp.RegisterSDKToolhelper from PR #28056 so both servers register tools identically.nopWriteCloserprevents the SDK from closing the invocation's stdout.notifications/initializedbeforetools/listbecause the official SDK enforces the protocol lifecycle.