aws-samples / aws-samples/sample-aws-devops-agent-acp-mcp
mcp dependency has no upper bound — breaks on mcp 2.0.0 (ModuleNotFoundError: mcp.server.fastmcp)
- Dominant language
- Python
- Stars
- 12
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
## What happened
`pip install -e '.[mcp]'` fails at import time on a fresh install:
```
ModuleNotFoundError: No module named 'mcp.server.fastmcp'
```
## Root cause
The package's `mcp` dependency is pinned as `mcp[cli]>=1.2.0` with no upper bound. The upstream `mcp` SDK shipped a `2.0.0` release that removed `mcp.server.fastmcp` (renamed/restructured), and the sample server imports that module at load time. Any install performed on or after that release resolves to `mcp>=2.0.0` and breaks immediately, with no code changes on the caller's side.
## Workaround
Pin the dependency to the last known-good 1.x release when installing:
```
pip install 'mcp==1.29.0'
```
## Suggested fix
Add an upper bound in `pyproject.toml`, e.g. `mcp[cli]>=1.2.0,<2`, until the server is updated for the `mcp` 2.x API.
## Context
Hit this 2026-08-23 while integrating this MCP server into an external client ([victoria-gateway](https://github.com/GordonWei/victoria-gateway)) against a live AWS DevOps Agent instance. Happy to open a PR with the pin if that's preferred over a report.
Contributor guide
Research direction
Start in pyproject.toml and inspect the mcp optional dependency, then reproduce the failure with pip install -e '.[mcp]' on a fresh environment. Done means dependency resolution stays below version 2 and the sample server imports successfully without ModuleNotFoundError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100