Skip to content

Raise the mcp version floor and drop unused fastapi/uvicorn #49

Closed

Description

@TMHSDigital

Summary

mcp-server/requirements.txt allows mcp>=1.0, but server.py imports mcp.server.fastmcp, which first shipped in mcp 1.2.0, and versions below 1.9.4 carry published advisories. The same file declares fastapi and uvicorn, which nothing imports.

Where

  • mcp-server/requirements.txt:1 (mcp>=1.0,<2)
  • mcp-server/requirements.txt:2-3 (fastapi>=0.110,<1, uvicorn>=0.29,<1)
  • mcp-server/server.py:11 (from mcp.server.fastmcp import FastMCP)
  • mcp-server/server.py:204 (mcp.run(), stdio transport)
  • .github/workflows/validate.yml:245 (installs the requirements in CI)

Details

  • The mcp 1.0.0 and 1.1.3 wheels have no mcp/server/fastmcp/ package; 1.2.0 is the first that does. If an environment already has mcp 1.0.x or 1.1.x, pip install -r requirements.txt treats it as satisfied and the server crashes on import.
  • OSV lists advisories against mcp fixed in 1.9.4 (CVE-2025-53366, a FastMCP validation DoS) and later releases (1.10.0, 1.23.0, 1.27.2, 1.28.1, 1.30.0). Most are in HTTP/WebSocket transports; this server uses the default stdio transport, so they are not shown to be reachable here. This is a routine upgrade.
  • git grep -iE 'fastapi|uvicorn' finds only these two requirement lines and a prose mention in .cursorrules:10. No Python file imports them, and docs/GETTING-STARTED.md:245 tells users pip "installs three Python packages the server needs".
  • There is no lockfile or constraints file.

Impact

Users with an older mcp already installed get an import crash at startup; environments below 1.9.4 keep known-vulnerable code. Every install and CI run also pulls two unused web frameworks and their dependency trees, adding install time and vulnerability noise.

Steps to reproduce

  1. pip install mcp==1.1.3
  2. pip install -r mcp-server/requirements.txt (no upgrade happens)
  3. python mcp-server/server.py fails with ModuleNotFoundError: No module named 'mcp.server.fastmcp'.

Suggested fix

  • Raise the floor to a current 1.x release (for example mcp>=1.30.0,<2; at minimum >=1.2.0).
  • Remove fastapi and uvicorn from requirements.txt.
  • Fix the "FastAPI" wording in .cursorrules and the "three Python packages" sentence in docs/GETTING-STARTED.md.
  • Optionally add a constraints or lock file for reproducible installs.

Acceptance criteria

  • requirements.txt lists only mcp with a floor that includes mcp.server.fastmcp and the published fixes.
  • A fresh pip install -r mcp-server/requirements.txt followed by python -c "import server" (from mcp-server/) works.
  • No doc refers to FastAPI or to three required packages.

Getting started

  • Relevant files: mcp-server/requirements.txt, .cursorrules, docs/GETTING-STARTED.md
  • How to run checks: there is no test suite yet; run the MCP server with cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in .github/workflows/validate.yml
  • Related docs: MCP Python SDK release notes

Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: S. audit-key: dependencies|mcp-server/requirements.txt|mcp

Activity

  1. added
    good first issue
    dependencies
    on Nov 21, 2026
  2. TMHSDigital commented on Nov 21, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 6fe7c7a.

    requirements.txt now lists only mcp>=1.30.0,<2; fastapi and uvicorn are removed, and GETTING-STARTED no longer mentions three packages.

    Verified: A fresh virtualenv install of requirements-dev.txt resolves mcp 1.30.0 without fastapi; import server works and all tests pass.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesgood first issueseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions