fetch server on mcp 2.0 works
From d2aa2ac456bf3df3256e0299175cac7c101b47c3 Mon Sep 17 00:00:00 2001 From: Eugenio Zuccarelli <11176606+jayzuccarelli@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:16:52 +0000 Subject: [PATCH] fix(fetch): port to mcp SDK v2 mcp 2.0.0 renamed McpError to MCPError and replaced the low-level decorator API with constructor callbacks, so the server failed at import with an unbounded mcp>=1.1.3 pin. Port the handlers to the v2 API (on_list_tools/on_call_tool/on_list_prompts/on_get_prompt, result objects, snake_case fields), raise MCPError directly instead of wrapping ErrorData, pin mcp>=2,<3, and refresh uv.lock. Fixes #4560 --- src/fetch/article.json | 1 + src/fetch/full.html | 1 + src/fetch/pyproject.toml | 2 +- src/fetch/src/mcp_server_fetch/server.py | 117 +++++++++++++--------- src/fetch/tests/test_server.py | 16 +-- src/fetch/uv.lock | 118 +++++++++++++++-------- 6 files changed, 157 insertions(+), 98 deletions(-) create mode 100644 src/fetch/article.json create mode 100644 src/fetch/full.html diff --git a/src/fetch/article.json b/src/fetch/article.json new file mode 100644 index 0000000000..3cd84364f4 --- /dev/null +++ b/src/fetch/article.json @@ -0,0 +1 @@ +{"title":"","byline":null,"dir":null,"content":"
fetch server on mcp 2.0 works
fetch server on mcp 2.0 works