You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider extensible pattern for protocol flow-control exceptions #1788
PR #1780 adds specific except UrlElicitationRequiredError: raise blocks in tool handlers to prevent this exception from being wrapped as a tool error.
Per SEP-1036, UrlElicitationRequiredError is not a regular error—it's a protocol-level flow control mechanism equivalent to elicitation/create. It needs to propagate as a JSON-RPC error response.
If more continuation-style exceptions are added in the future, consider an attribute-based pattern:
Hi Felix, trying to help out here. Before proceeding, I'd like to clarify a couple of design points:
It seems that mcp/server/lowlevel/server.py is the central exception handling point. wanna double confirm it's the only point where all tool-raised exceptions are caught and wrapped.
Given this is tagged v2, is the expectation that we should use the extensible pattern immediately on the main branch, or should we continue with the specific except UrlElicitationRequiredError: raise from Fix for Url Elicitation issue 1768 #1780 for the current v1.x branch and reserve this refactoring for a dedicated v2 development branch?
Hi Felix, trying to help out here. Before proceeding, I'd like to clarify a couple of design points:
It seems that mcp/server/lowlevel/server.py is the central exception handling point. wanna double confirm it's the only point where all tool-raised exceptions are caught and wrapped.
Given this is tagged v2, is the expectation that we should use the extensible pattern immediately on the main branch, or should we continue with the specific except UrlElicitationRequiredError: raise from Fix for Url Elicitation issue 1768 #1780 for the current v1.x branch and reserve this refactoring for a dedicated v2 development branch?
Deferring to @maxisbey on these questions as he's coordinating v2 for Python.
Activity
the-ayyi commentedon Dec 17, 2025
Hi Felix, trying to help out here. Before proceeding, I'd like to clarify a couple of design points:
It seems that
mcp/server/lowlevel/server.pyis the central exception handling point. wanna double confirm it's the only point where all tool-raised exceptions are caught and wrapped.Given this is tagged
v2, is the expectation that we should use the extensible pattern immediately on themainbranch, or should we continue with the specificexcept UrlElicitationRequiredError: raisefrom Fix for Url Elicitation issue 1768 #1780 for the currentv1.xbranch and reserve this refactoring for a dedicatedv2development branch?felixweinberger commentedon Dec 17, 2025
Deferring to @maxisbey on these questions as he's coordinating v2 for Python.
the-ayyi commentedon Dec 19, 2025
I have a drafting PR: #1800. @maxisbey Any thoughts on this ticket?
maxisbey commentedon Aug 10, 2026
This landed as part of v2, which is now released (via #2928) — closing. Feel free to reopen if there's something still outstanding.