Skip to content

fix: cap mcp below 2 so pip install -e . can start the MCP servers - #666

Open
vishalhabib99 wants to merge 1 commit into
IBM:mainfrom
vishalhabib99:fix/cap-mcp-below-2
Open

vishalhabib99 wants to merge 1 commit into
IBM:mainfrom
vishalhabib99:fix/cap-mcp-below-2

Conversation

@vishalhabib99

Copy link
Copy Markdown

Description

The README Quick Start (pip install -e .) installs mcp 2.3.0, and then none of the MCP servers can start. pyproject.toml asks for mcp[cli]>=1.26.0 with no upper bound. mcp 2.x removed mcp.server.fastmcp, which all six servers import (iot, utilities, vibration, tsfm, fmsr, wo):

$ pip install -e .            # resolves mcp==2.3.0, fastmcp==4.1.4
$ python -c "import servers.iot.main"
ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer ...

uv sync users don't see this, because uv.lock pins mcp 1.26.0.

Fix Details

  • pyproject.toml: mcp[cli]>=1.26.0,<2.
  • uv.lock: only the matching requires-dist specifier line. No locked versions change, and uv lock --check passes.

With the cap, a fresh resolve gives mcp==1.30.0 and fastmcp==3.4.11. Moving the servers to the mcp 2.x MCPServer API can come later as a separate change.

Impact on Benchmarking

  • No change to baselines: This fix only improves stability/performance.
  • Baseline change: This fix corrects a scoring error.

Related Issues

  • Fixes: none filed. Found by a static scan (mcp-doctor) and reproduced as shown above.

Verification Steps

  1. uv run pytest src/ -k "not integration": 696 passed and 8 failed. The same 8 fail on main without this change (test_static_json_scorer.py ×6, test_file_exporter.py ×2).
  2. Manual check: in a fresh venv, pip install -e . resolves mcp 2.3.0 on main, and import servers.<name>.main fails for every server. On this branch it resolves mcp 1.30.0 and all six import. iot and fmsr only log missing-credential warnings.

Checklist

  • I have added tests that prove my fix is effective. (This is a dependency bound, so I verified it with a fresh install instead.)
  • My code follows the project's Ruff formatting and linting rules.
  • I have signed off my commits (DCO).

All six MCP servers import mcp.server.fastmcp, which mcp 2.x removed.
pyproject asks for mcp[cli]>=1.26.0 with no upper bound, so the README's
pip install -e . now resolves mcp 2.3.0 and every server fails on import.
uv.lock already pins 1.26.0; only the requires-dist line changes there.

Signed-off-by: Vishal Habib <vishalhabib99@gmail.com>
@vishalhabib99

Copy link
Copy Markdown
Author

Hi, just checking whether this one is on your radar. It's a small fix (cap mcp below 2 so pip install -e . can start the MCP servers) and the branch is still mergeable. Happy to change anything.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants