-
Notifications
You must be signed in to change notification settings - Fork 57
Migrate to the official Go SDK for MCP #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: http-mcp-server
Are you sure you want to change the base?
Conversation
github.com/asticode/go-astisub v0.34.0 | ||
github.com/gin-gonic/gin v1.10.0 | ||
github.com/google/go-github/v41 v41.0.0 | ||
github.com/google/jsonschema-go v0.2.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This got moved out into it's own package somewhere between v0.2.0 and v0.5.0 of github.com/modelcontextprotocol/go-sdk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the codebase from a third-party Go MCP SDK (github.com/mark3labs/mcp-go
) to the official MCP SDK (github.com/modelcontextprotocol/go-sdk
v0.6.0) for improved standardization and compatibility. The migration also switches from the jsonschema
package within the old MCP SDK to Google's jsonschema-go
library.
Key changes include:
- Replace all imports and usage of the unofficial
mcp-go
library with the officialgo-sdk
- Update JSON schema generation to use Google's
jsonschema-go
library instead of the old MCP SDK's built-in schema package - Adapt MCP server creation, tool registration, and transport handling to the new SDK's API patterns
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
go.mod | Updated dependencies to use official MCP SDK v0.6.0 and Google's jsonschema-go library |
mcpserver/server.go | Updated MCP server type references to use official SDK |
mcpserver/stdio_server.go | Migrated STDIO server implementation to new SDK API |
mcpserver/http_server.go | Updated HTTP server and SSE handler creation for new SDK |
mcpserver/tools/provider.go | Refactored tool registration to use new SDK's server and schema APIs |
mcpserver/tools/*.go | Updated JSON schema struct tags from jsonschema_description to jsonschema |
mcpserver/testhelpers/helpers.go | Rewrote MCP tool testing utilities for new SDK's transport model |
*_test.go files | Updated test assertions to handle new error handling patterns from SDK migration |
openai/*.go | Updated JSON schema imports to use Google's library |
llm/*.go | Updated JSON schema generation to use Google's library |
mcp/client.go | Updated MCP client transport creation for new SDK API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
* improve tool descriptions * revert error message updates * add description constraints to the descriptions * do not add constraint recommendations to messages
Summary
Move to v0.6.0 of the official go MCP sdk. I removed any use of the old mcp package.
Ticket Link
Screenshots
Release Note