From df5916f6167e1d2f751e23ed642b39e21dfd4485 Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Mon, 3 Aug 2026 17:45:50 +0200 Subject: [PATCH] Pin mcp below 2.0, which dropped the module _mcp.py imports CI has been red since 2026-07-30 for a reason unrelated to any commit here: mcp 2.0.0 removed mcp.server.fastmcp, which _mcp.py imports at module scope, and the manifests asked for `mcp>=1.9` with no upper bound. Verified directly -- 2.0.0 raises ModuleNotFoundError on that import, 1.29.0 provides it. It failed pylint here rather than only the test job, because the repo root now reaches pylint's import resolution. Pinned `<2` in all three places the dependency is declared until the server is ported to the 2.x API. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fc1453..14fcfc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -103,7 +103,7 @@ repos: - requests - gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.4.0#subdirectory=gatelock - crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.1.0#subdirectory=crdt-sync - - mcp + - mcp>=1.9,<2 - pydantic # Test suites intentionally use patterns (protected-access, magic-value # comparisons) that don't belong in the source-code 10/10 gate. diff --git a/pyproject.toml b/pyproject.toml index e4d7e2f..b6768f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ # so the systemd/CLI system-python path stays dependency-light and never has # to import the MCP SDK. [project.optional-dependencies] -mcp = ["mcp>=1.9"] +mcp = ["mcp>=1.9,<2"] # Without this, setuptools' flat-layout auto-discovery treats the Flutter # app/ directory as a second top-level package and refuses to build. diff --git a/requirements.txt b/requirements.txt index 99e388d..6d8ecc9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ codespell>=2.2.0 coverage>=7.4.0 crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.1.0#subdirectory=crdt-sync gatelock @ git+https://github.com/kuhyx/utils@gatelock-v0.4.0#subdirectory=gatelock -mcp>=1.9 +mcp>=1.9,<2 mypy>=1.8.0 pre-commit>=3.6.0 pydantic>=2