Skip to content

Conversation

@chloelee767
Copy link

@chloelee767 chloelee767 commented Nov 25, 2025

There are additional MCP protocols supported in the newer version of the library. Some of these protocols are needed in order to use the current version of the inspector tool (https://github.com/modelcontextprotocol/inspector), which is useful for development.

There are breaking changes in the library, hence some code changes were needed.

> In v0.29.0, MCP-Go introduces breaking changes to tool request handling. The main change is that request.Params.Arguments is no longer directly accessible as a map. Instead, you must use the new GetArguments() method to retrieve arguments as a map. For type-safe argument access, new helper methods like RequireString(), RequireFloat(), and RequireBool() have been added. To migrate:

> Replace direct access to request.Params.Arguments["key"] with request.GetArguments()["key"]
> For better type safety, use the new helper methods: request.RequireString("key"), request.RequireFloat("key"), etc.
> For complex argument structures, use the new BindArguments() method with a struct, or try the new typed tool handlers with mcp.NewTypedToolHandler() as shown in the new examples/typed_tools example.
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