litellm/litellm/proxy/_experimental/mcp_server/faults
joshua 5dc01319d7 refactor(mcp): port MCP client and server helpers to MCP SDK 2
McpError -> MCPError (new code/message/data constructor), camelCase model
attributes and constructor kwargs -> snake_case, RequestResponder ->
ClientSession message handler receiving ServerNotification | Exception,
RequestContext -> ClientRequestContext, read_timeout_seconds -> float,
server_capabilities property, JSONRPCMessage union parsed via TypeAdapter,
and httpx -> httpx2 for every object handed to the SDK transports
(MCPSigV4Auth, the httpx client factory, outbound_credentials auth
classes and resolver return types). Helpers that serve both litellm httpx
clients and the SDK's httpx2 transport accept both response types.

The SDK read-timeout code is now the JSON-RPC REQUEST_TIMEOUT (-32001)
instead of HTTP 408; as_mcp_read_timeout keeps the TimeoutError context
discriminator. Upstream transport exceptions and responses found in
exception trees are matched as httpx2 alongside httpx.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-18 22:13:04 +00:00
..
__init__.py fix(mcp): explain refused OAuth registration and bound discovery retries 2026-09-10 21:02:46 -07:00
classify.py fix(mcp): explain refused OAuth registration and bound discovery retries 2026-09-10 21:02:46 -07:00
list_outcomes.py refactor(mcp): port MCP client and server helpers to MCP SDK 2 2026-09-18 22:13:04 +00:00
render_oauth.py fix(mcp): render registration refusals without recursion 2026-09-10 21:54:06 -07:00
traversal.py feat(lint): enforce Final on locals and freeze function parameters (LIT010, LIT011) 2026-08-04 12:54:39 -07:00
types.py fix(mcp): explain refused OAuth registration and bound discovery retries 2026-09-10 21:02:46 -07:00