Skip to content

fix: bound MCP extra to supported major version - #339

Merged
rng1995 merged 4 commits into
NVIDIA:mainfrom
koriyoshi2041:rios/fix-mcp-v2-compat
Aug 14, 2026
Merged

fix: bound MCP extra to supported major version#339
rng1995 merged 4 commits into
NVIDIA:mainfrom
koriyoshi2041:rios/fix-mcp-v2-compat

Conversation

@koriyoshi2041

Copy link
Copy Markdown
Contributor

Problem

Fresh skillspector[mcp] installs resolve MCP 2.x, which removed mcp.server.fastmcp. The install succeeds, but the server fails at initialization and incorrectly reports that the optional dependency is missing. Fixes #333.

Fix

  • constrain the MCP extra to the supported 1.x line
  • regenerate the lockfile
  • distinguish an absent mcp package from an installed package missing the expected FastMCP module
  • cover the incompatible-install diagnostic

Test

  • uv run pytest -q tests/unit/test_mcp_server.py (10 passed, including stdio initialize/list-tools)
  • uv run ruff check src/skillspector/mcp_server.py tests/unit/test_mcp_server.py
  • uv run ruff format --check src/skillspector/mcp_server.py tests/unit/test_mcp_server.py
  • git diff --check

Risk

Low. This deliberately holds the optional server integration on MCP 1.x until SkillSpector migrates to the 2.x API; users that force an incompatible install now receive an accurate error instead of a missing-extra message.

rng1995
rng1995 previously approved these changes Aug 5, 2026

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Automated SkillSpector Review]

Approved. Bounding the optional MCP dependency below v2 keeps the currently supported FastMCP import contract explicit, and the improved import error distinguishes an absent package from an incompatible installed layout. The focused MCP suite passed (10 tests), as did Ruff lint and format checks.

@koriyoshi2041

Copy link
Copy Markdown
Contributor Author

Rebased onto current main at 7fc09a3. Upstream now already carries the MCP <2.0.0 dependency bound, so the remaining delta is limited to distinguishing an incompatible installed MCP layout from a missing optional dependency, with its regression test.

Focused MCP tests pass (10/10); Ruff lint/format, lock check, and diff check also pass.

@rng1995

rng1995 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

@koriyoshi2041 - Please resolve the merge conflict.

Signed-off-by: kigland <shuaizhicheng336@gmail.com>
@koriyoshi2041
koriyoshi2041 force-pushed the rios/fix-mcp-v2-compat branch from 7fc09a3 to 8c5451f Compare August 12, 2026 10:48
@koriyoshi2041

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and resolved the test-file conflict while retaining both the new local-target coverage and this PR’s incompatible-MCP regression. Focused MCP tests pass (27/27); Ruff lint/format, lock check, and diff check are clean.

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review approved at the current head. The MCP v2 upper bound and compatibility error remain acceptable and there are no unresolved review threads. CI is green except for the mechanical DCO failure on the unsigned merge commit.

@rng1995
rng1995 force-pushed the rios/fix-mcp-v2-compat branch from 90f9591 to a63fe4c Compare August 14, 2026 20:49
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
@rng1995
rng1995 force-pushed the rios/fix-mcp-v2-compat branch from 8ae9a0f to e25f027 Compare August 14, 2026 20:57
@rng1995
rng1995 merged commit 06fc723 into NVIDIA:main Aug 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants