Title: FastMCP import fails after httpx≥0.28 upgrade (TransportError removed)
- MCP version: 1.20.0 (also happens on 1.18.x)
- Python: 3.12.10 on Windows 11
- Install method: local venv (
pip install mcp[cli])
Steps to reproduce
- Create a fresh venv.
pip install mcp[cli]>=1.2.0.
- Run
python -m mcp.dev path/to/server.py or simply from mcp.server.fastmcp import FastMCP.
Observed error
from mcp.client.sse import sse_client
File ".../site-packages/mcp/client/sse.py", line 10, in <module>
from httpx_sse import aconnect_sse
File ".../site-packages/httpx_sse/_exceptions.py", line 4, in <module>
class SSEError(httpx.TransportError):
AttributeError: module 'httpx' has no attribute 'TransportError'
Notes
- Resolver now picks
httpx 0.28.1 + httpx-sse 0.4.3.
httpx ≥0.28 removed/renamed TransportError; httpx_sse still subclasses it.
- Pinning
httpx==0.26.0 avoids the crash but conflicts with MCP’s httpx>=0.27.1.
- Temporary workaround is editing
.venv/Lib/site-packages/httpx_sse/_exceptions.py to fall back to httpx.HTTPError; that isn’t sustainable.
Request
Please pin MCP’s dependency stack to a compatible combination (e.g. httpx<0.28) or bump the required httpx-sse version so it handles the API change. If an official workaround already exists, documenting it would help downstream users. Thanks!
Title: FastMCP import fails after httpx≥0.28 upgrade (TransportError removed)
pip install mcp[cli])Steps to reproduce
pip install mcp[cli]>=1.2.0.python -m mcp.dev path/to/server.pyor simplyfrom mcp.server.fastmcp import FastMCP.Observed error
Notes
httpx 0.28.1+httpx-sse 0.4.3.httpx≥0.28 removed/renamedTransportError;httpx_ssestill subclasses it.httpx==0.26.0avoids the crash but conflicts with MCP’shttpx>=0.27.1..venv/Lib/site-packages/httpx_sse/_exceptions.pyto fall back tohttpx.HTTPError; that isn’t sustainable.Request
Please pin MCP’s dependency stack to a compatible combination (e.g.
httpx<0.28) or bump the requiredhttpx-sseversion so it handles the API change. If an official workaround already exists, documenting it would help downstream users. Thanks!