mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
ifcmcp: pin mcp below 2.0 to fix broken FastMCP import
mcp 2.0.0 (unpinned in CI and in the ifcmcp[mcp] extra) renamed mcp.server.fastmcp.FastMCP to mcp.server.mcpserver.MCPServer, which ifcmcp does not support yet. server.py caught the resulting ModuleNotFoundError with a bare except Exception and silently reported it as FastMCP not installed, masking the real breakage until the ifcmcp test suite failed in CI. Pinned mcp to >=1.0,<2 in both ci.yml and ifcmcp's pyproject.toml mcp extra, confirmed the full ifcmcp test suite (70 tests) passes against mcp 1.29.0, and confirmed the genuinely-not-installed path still raises the expected ImportError. Also narrowed the except clause to ImportError only so an unrelated future bug in that import block surfaces instead of being swallowed as "not installed". Generated with the assistance of an AI coding tool.
This commit is contained in:
committed by
Thomas Krijnen
parent
913f9f2262
commit
fa1b70883f
@@ -249,7 +249,9 @@ jobs:
|
||||
cd ../ifcquery && make test || ERROR=1
|
||||
pip install -e ../ifcedit --no-deps
|
||||
cd ../ifcedit && make test || ERROR=1
|
||||
pip install mcp
|
||||
# Pinned <2: mcp 2.0.0 renamed mcp.server.fastmcp.FastMCP to
|
||||
# mcp.server.mcpserver.MCPServer, which ifcmcp doesn't support yet.
|
||||
pip install "mcp>=1.0,<2"
|
||||
pip install -e ../ifcmcp --no-deps
|
||||
cd ../ifcmcp && make test || ERROR=1
|
||||
pip install -e ../ifctester --no-deps
|
||||
|
||||
Reference in New Issue
Block a user