-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
π Critical Installation Failure - Blocking All Users
π Issue Summary
The package cannot be installed due to incompatible dependency requirements between fastapi and mcp packages.
π¨ Error Message
pip install polymarket-mcp
ERROR: Cannot install polymarket-mcp because these package versions have conflicting dependencies.
The conflict is caused by:
fastapi 0.104.0 depends on anyio<4.0.0 and >=3.7.1
mcp 1.25.0 depends on anyio>=4.5
mcp 1.24.0 depends on anyio>=4.5
mcp 1.23.3 depends on anyio>=4.5
[ ... all MCP versions >=1.20.0 have same requirement ... ]
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflictsπ― Root Cause Analysis
The issue stems from incompatible anyio version requirements in pyproject.toml:
[project]
dependencies = [
"fastapi>=0.104.0", # β οΈ Requires anyio<4.0.0
"mcp>=1.20.0", # β οΈ Requires anyio>=4.5
# ... other deps
]Dependency Conflict Matrix
| Package | anyio Requirement | MCP anyio Requirement | Compatible? |
|---|---|---|---|
| fastapi 0.104.0 | >=3.7.1, <4.0.0 |
>=4.5 |
β NO |
| fastapi 0.109.0+ | >=3.6.2, <5.0 |
>=4.5 |
β YES |
β Solution
Update pyproject.toml dependencies:
dependencies = [
"mcp>=1.20.0",
"py-clob-client>=0.28.0",
"websockets>=12.0",
"eth-account>=0.11.0",
"python-dotenv>=1.0.0",
"httpx>=0.27.0",
- "pydantic>=2.9.0,<2.10.0",
+ "pydantic>=2.9.0",
"pydantic-settings>=2.3.0",
- "fastapi>=0.104.0",
+ "fastapi>=0.109.0",
"uvicorn>=0.24.0",
"jinja2>=3.1.0",
"typing-extensions>=4.12.0",
]Why This Works
- FastAPI >=0.109.0 dropped the
anyio<4.0.0constraint β - FastAPI >=0.109.0 now accepts
anyio>=4.5β - Both packages can now use
anyio 4.12.0β
π§ͺ Verification
Before Fix
$ pip install -e .
ERROR: ResolutionImpossible
β Installation failsAfter Fix
$ pip install -e .
β
Successfully installed fastapi-0.128.0 anyio-4.12.0 mcp-1.25.0 ...
β
Package imports correctlyπ Impact Analysis
| Metric | Status |
|---|---|
| Installation | β Currently broken |
| User Access | β Completely blocked |
| Backward Compatibility | β No breaking changes |
| Security Updates | β Improved |
π Related Pull Request
β
PR #5: fix: resolve FastAPI/MCP dependency conflict (anyio version incompatibility)
Ready for review and merge.
π Additional Context
Version History
- FastAPI 0.104.0 (Nov 2023): Introduced
anyio<4.0.0constraint - anyio 4.0.0 (Jan 2024): Breaking changes from version 3.x
- FastAPI 0.109.0 (Dec 2024): Removed upper bound, compatible with anyio 4.x
- MCP 1.20.0+: Requires
anyio>=4.5
Why Not Downgrade MCP?
MCP 1.20.0+ provides critical features required for the model context protocol. Downgrading would break core functionality.
π·οΈ Labels
critical bug dependencies installation blocker
Severity: π¨ Critical - Blocks all users
Status: β
Fix available in PR #5
Action Required: Please review and merge PR #5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels