MCP client for fetch failed to start
⚠ MCP client for fetch failed to start: MCP startup failed: handshaking with
MCP server failed: connection closed: initialize response
resolve
[mcp_servers.fetch] type = "stdio" command = "uvx" args = ["--with", "mcp<2", "mcp-server-fetch"]
Root cause: mcp-server-fetch 2026.7.10 allows mcp>=1.1.3, so uvx selects incompatible mcp 2.0.0, where McpError was renamed to MCPError. Python 3.13 fails identically, so Python 3.14 is not responsible.
I verified the pinned command with a real MCP handshake: server=mcp-fetch version=1.29.0, tools=fetch. Apply the argument change in config.toml, then restart Codex; the Inspector’s “Web is up” message only confirms the Inspector UI started, not that the fetch server connected.
from codex
Same problem. Switched to Docker based fetch mcp server. It solved the problem for me but i'd prefer uvx setup fixed.
"mcpServers": {
"fetch": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/fetch"
]
}
}
At least you can do your work while it's broken :)
Hey @tking007 and @slouffka — the initialize response failure you are hitting isn't just a Python dependency quirk; it is a direct collision with the new MCP 2026-07-28 stateless specification.
By pulling mcp 2.0.0, the runtime is trying to execute the new stateless protocol, which explicitly tore out the stateful initialize handshake and the Mcp-Session-Id header. Your client and server are fundamentally speaking two different architectures.
@slouffka — Your Docker workaround is great for bypassing the local uvx package resolution nightmare, but be highly careful if you are deploying that containerized fetch server to a public or enterprise environment.
Because the v2 spec is stateless, the authorization burden shifts entirely to the deployment layer. Treating these endpoints like standard webhooks with static API keys now breaks SOC 2 non-repudiation. This exact architectural transition is what caused the recent RufRoot (CVE-2026-59726) CVSS 10.0 breach, where unauthenticated MCP bridges were left exposed to the network.
If you are shipping these servers to corporate clients or deploying them to production, we just published a CISO architectural briefing on how to secure stateless MCP endpoints with fail-closed authorization gateways. I recommend reviewing it before locking in your Docker deployment architecture: https://mcp.ecocitizenz.com/rufroot
@Ecocitizenz Oh, thanks for the security tip. I'm using fetch mcp locally. Actually got this solution from my coding agent. It also suggested a fix using uvx but I've just used the docker variant. No valid reason to choose over uvx, just didn't want to mess with version pinning and switch to stable version later. It also suggested these options, though I did not test them. Use at your own risk! And of course these all workarounds and I have no idea how they will end up in public facing services ;)
"mcpServers": {
"fetch": {
"command": "uvx",
"args": [
"--with",
"mcp==1.12.1",
"mcp-server-fetch"
]
}
},
or
"fetch": {
"command": "uvx",
"args": [
"--with",
"mcp==1.12.1",
"--with",
"mcp-server-fetch==2026.7.10",
"mcp-server-fetch"
]
}
Could you please clarify if these are valid fixes or these two also affects security? I'm not that good with mcp specs.
Thanks again for security notice. This is really valuable!
Yes @slouffka is a valid fix. As @Ecocitizenz mentioned, the issue arise from the mcp 2.x.
The last 1.x release: --with mcp==1.29.0 mcp-server-fetch
Thanks — and the later mcp==1.29.0 clarification is useful.
I would keep one distinction explicit for anyone finding this thread later:
a compatibility fix is not automatically a security or readiness result.
Pinning a compatible 1.x MCP version can solve the immediate client/server startup mismatch. Docker can likewise change the packaging/execution boundary. But neither fact alone tells an operator whether a production deployment has the right authentication, network exposure, authority, provenance or current-state controls.
For a local fetch MCP used only on your own machine, that distinction may be mostly operational.
For an MCP exposed to other users, agents or enterprise infrastructure, I would separately ask:
- what exact server/version is running?
- who is authoritative for it?
- what network boundary can reach it?
- what identity/authorization governs calls?
- can a relying party determine whether that evidence is still current?
So I'd treat the uvx pin as the compatibility remedy, then assess production trust/security independently if the server crosses a meaningful trust boundary.
That's the separation we're trying to make explicit with ECZ-ID: working endpoint ≠ independently resolvable current trust state.
— Adam Al-Zayed Founder | EcoCitizenz Ltd ECZ-ID — MCP & Agent Trust https://mcp.ecocitizenz.com/ Resolver: https://resolver.ecocitizenz.org/passport/ECZ-GB-RBS1NW
Hey, saw your issue about the fetch client failing to start curious how you first noticed it wasn't starting. Was it an error message, or did something downstream just stop working and you had to trace it back?
Fixed in mcp-server-fetch 2026.8.18, released just now. The package declares mcp>=1.29.0,<2, so uvx mcp-server-fetch resolves a working 1.x again and the --with mcp<2 workaround is no longer needed.
@tking007's diagnosis was right: 2026.7.10 allowed mcp>=1.1.3, uvx resolved 2.0.0, and McpError no longer exists there. The failure is an ImportError at module import, before any transport opens. It does not appear to be related to protocol negotiation or the 2026-07-28 stateless revision.
The sdk floor moved to 1.29.0 rather than staying at 1.1.3 because the older range also resolved versions affected by GHSA-vj7q-gjh5-988w, GHSA-jpw9-pfvf-9f58 and GHSA-hvrp-rf83-w775.
Porting these servers to SDK v2 is separate work and tracked on its own.