feat: migrate from mark3labs/mcp-go to toolhive-core/mcpcompat (go-sdk)#5729
Draft
JAORMX wants to merge 3 commits into
Draft
feat: migrate from mark3labs/mcp-go to toolhive-core/mcpcompat (go-sdk)#5729JAORMX wants to merge 3 commits into
JAORMX wants to merge 3 commits into
Conversation
Swaps all github.com/mark3labs/mcp-go/{mcp,server,client,client/transport}
imports to the go-sdk-backed compatibility shim in toolhive-core
(github.com/stacklok/toolhive-core/mcpcompat/*). No call-site logic changes —
the shim mirrors mcp-go's API. This moves ToolHive's MCP protocol handling
onto the official modelcontextprotocol/go-sdk.
Depends on stacklok/toolhive-core#150; the toolhive-core dependency is pinned
to that branch commit and should be bumped to the released version once #150
merges.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump github.com/stacklok/toolhive-core to the mcpcompat shim commit that closes the server/client compatibility gaps exercised by the vMCP and MCP test suites (pulls the required cel-go v0.29.1). Also fix gci import grouping in three files flagged by lint (toolhive-core shares the github.com/stacklok/toolhive prefix, so its imports group with toolhive's). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5729 +/- ##
==========================================
- Coverage 70.65% 70.61% -0.04%
==========================================
Files 682 682
Lines 68854 68854
==========================================
- Hits 48651 48624 -27
- Misses 16657 16683 +26
- Partials 3546 3547 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 <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.
What this does
Pure import swap: every
github.com/mark3labs/mcp-go/{mcp,server,client,client/transport}import is replaced with the go-sdk-backed compatibility shim in toolhive-core (github.com/stacklok/toolhive-core/mcpcompat/*). No call-site logic changes — the shim mirrors mcp-go's API. This moves ToolHive's MCP protocol handling onto the officialmodelcontextprotocol/go-sdk, and removes the directgithub.com/mark3labs/mcp-godependency from ToolHive (it remains only as a transitive// indirectrequirement pulled in by other modules).Dependency / merge blocker
Depends on stacklok/toolhive-core#150. The
toolhive-coredependency is pinned to that branch commit (6b7da5c, resolved asv0.0.27-0.20260706081226-6b7da5c3241e). Bump it to the released tag once #150 merges.Verification
All run against the pinned shim commit:
Known behavioral caveats (inherited from the shim)
SendNotificationToAllClientsin the stdio bridge forwards only progress/message notifications —tools/list_changedand other methods are dropped because go-sdk v1.6.1 exposes no public generic notification sender.SessionIdManagerisn't yet wired to go-sdk's session lifecycle.🤖 Generated with Claude Code