Draft
Conversation
Co-authored-by: shreddd <143514+shreddd@users.noreply.github.com>
Co-authored-by: shreddd <143514+shreddd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Upgrade mcp dependency from 1.x to 2.0
Upgrade mcp dependency from 1.x to 2.0
Aug 14, 2026
|
Contributor
|
While testing, I saw these two:
Plus this in server.py line 92 (after
Together they turn a clean Input validation error: 'query' is a required property into Unexpected error: 'NoneType' object is not subscriptable, plus a full traceback in the server log for what is a client-side error. |
Collaborator
|
@jeanbez - we don't strictly need to accept this PR either. Let's discuss more today. |
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.
mcp2.0 reworks the low-levelServerAPI:@server.list_tools()/@server.call_tool()decorators are gone (replaced byon_list_tools/on_call_toolconstructor kwargs), handlers now take(ctx, params)instead of(tool_name, arguments), andserver.request_handlers[...]/ response.rootunwrapping are removed. The blast radius in dsagt is narrow: only the dispatch shell and test harness touch the SDKServerobject directly.Dependency
mcp>=1.0.0,<2.0.0→mcp>=2.0.0,<3.0.0inpyproject.toml, re-synced lockfile.Dispatch shell (
src/dsagt/mcp/server.py)build_dispatch_server()now passeson_list_tools/on_call_toolcallables toServer(...)instead of using the removed decorators.on_list_toolsreturnstypes.ListToolsResult(tools=...)instead of a bare list.on_call_tool(ctx, params)readsparams.name/params.arguments(previously(tool_name, arguments)) and returnstypes.CallToolResult(content=[...])instead of a bare content list.ValueError→ error-dict, str-vs-dict formatting) is unchanged.Test harness
tests/mcp_helpers.py(call_tool_sync/call_tool_async) and the inline duplicates intest_dsagt_server.py,test_kb_search_filters.py,test_knowledge_server.py,test_memory_tools.pynow useserver.get_request_handler("tools/call"|"tools/list").handlerinstead of the removedserver.request_handlers[...]dict, dropping the.rootunwrap.mcp_helpers.pyversions where practical, rather than patching each copy separately.tool.inputSchema→tool.input_schemareads in tests — mcp 2.0 renamed thetypes.ToolPython attribute (theinputSchemaalias still works for construction, so production tool-building code is unaffected).mcp.server.stdio.stdio_server,NotificationOptions,InitializationOptions, andserver.get_capabilities(...)are unaffected by the bump, so_run_stdio,create_dsagt_server, andmain()needed no changes.mcpdependency from 1.x to 2.0 #39