Skip to content

Update MCP SDK to 2.0 and fix breaking changes - #203

Merged
AadilLatif merged 1 commit into
mainfrom
update-mcp-2.0
Jul 30, 2026
Merged

Update MCP SDK to 2.0 and fix breaking changes#203
AadilLatif merged 1 commit into
mainfrom
update-mcp-2.0

Conversation

@AadilLatif

Copy link
Copy Markdown
Collaborator
  • Replace decorator-based @app.list_tools()/@app.call_tool() with callback-based Server constructor (on_list_tools, on_call_tool)
  • Handlers now accept (ctx: ServerRequestContext, params) signature
  • call_tool returns CallToolResult instead of list[TextContent]
  • list_tools returns ListToolsResult instead of list[Tool]
  • Update tests to use mock context/params for new handler signatures
  • Bump dependency from mcp>=1.28.1 to mcp>=2.0

Change Summary

Related issue number

Checklist

  • The pull request title is a good summary of the changes.
  • Tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including "please review" to assign reviewers

- Replace decorator-based @app.list_tools()/@app.call_tool() with
  callback-based Server constructor (on_list_tools, on_call_tool)
- Handlers now accept (ctx: ServerRequestContext, params) signature
- call_tool returns CallToolResult instead of list[TextContent]
- list_tools returns ListToolsResult instead of list[Tool]
- Update tests to use mock context/params for new handler signatures
- Bump dependency from mcp>=1.28.1 to mcp>=2.0
@sonarqubecloud

Copy link
Copy Markdown

@AadilLatif
AadilLatif merged commit 373436b into main Jul 30, 2026
5 checks passed
@AadilLatif
AadilLatif deleted the update-mcp-2.0 branch July 30, 2026 21:45
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