feat: migrate aibridge injected-MCP proxy to official MCP Go SDK - #28060
Draft
ibetitsmike wants to merge 1 commit into
Draft
feat: migrate aibridge injected-MCP proxy to official MCP Go SDK#28060ibetitsmike wants to merge 1 commit into
ibetitsmike wants to merge 1 commit into
Conversation
Replace the mark3labs client with the official SDK client for the deprecated injected-MCP proxy. The manual protocol-version handshake check and the 5s-close workaround are subsumed by SDK negotiation and session close. The proxy constructor takes an optional *http.Client instead of mark3labs transport options; auth headers ride an http.RoundTripper. Repeated Init now closes the previous session instead of leaking its transport. Test fixtures move to official SDK stateless servers, including the enterprise integration mock, which previously answered every POST with a canned initialize response that the stricter SDK client rejects. The mcpmock generate directive also pointed at the pre-vendoring aibridge module path; fix it and regenerate.
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 5 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
The aibridge injected-MCP proxy now owns an official
*mcp.Client,*mcp.StreamableClientTransport, and*mcp.ClientSession.*http.Clientinstead of mark3labs options; the header-injecting wrapper shallow-copies a supplied client so its Timeout, Jar, and redirect policy survive.Connectand fails when no mutually supported version exists.Initcloses the previous session, and a failed tool fetch closes the just-created session so transports do not leak.aibridge/mcpmockis regenerated, and its stalego:generatesource path is corrected.