-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
bugSomething isn't workingSomething isn't workingneeds reproneeds additional information to be able to reproduce bugneeds additional information to be able to reproduce bug
Description
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.pyor simplyfrom 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/renamedTransportError;httpx_ssestill subclasses it.- Pinning
httpx==0.26.0avoids the crash but conflicts with MCP’shttpx>=0.27.1. - Temporary workaround is editing
.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 required httpx-sse version so it handles the API change. If an official workaround already exists, documenting it would help downstream users. Thanks!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds reproneeds additional information to be able to reproduce bugneeds additional information to be able to reproduce bug