Skip to content

Migrate FastMCP to v3.2.0 (CVE-2026-32871)#19

Open
meltedhyperion wants to merge 16 commits intomainfrom
fix/fastmcp-v3.2.0-cve-2026-32871
Open

Migrate FastMCP to v3.2.0 (CVE-2026-32871)#19
meltedhyperion wants to merge 16 commits intomainfrom
fix/fastmcp-v3.2.0-cve-2026-32871

Conversation

@meltedhyperion
Copy link
Copy Markdown

Summary

  • Upgrades FastMCP to >=3.2.0 to patch CVE-2026-32871 (SSRF & Path Traversal)
  • Fixes deprecated import paths and API patterns for v3 compatibility

Changed files

  • agents/pyproject.toml
  • environment/pyproject.toml
  • mcp_servers/calendar/pyproject.toml
  • mcp_servers/calendar/smoke_test/pyproject.toml
  • mcp_servers/chat/pyproject.toml
  • mcp_servers/chat/smoke_test/pyproject.toml
  • mcp_servers/code/pyproject.toml
  • mcp_servers/code/smoke_test/pyproject.toml
  • mcp_servers/documents/pyproject.toml
  • mcp_servers/documents/smoke_test/pyproject.toml
  • mcp_servers/filesystem/pyproject.toml
  • mcp_servers/filesystem/smoke_test/pyproject.toml
  • mcp_servers/mail/pyproject.toml
  • mcp_servers/mail/smoke_test/pyproject.toml
  • mcp_servers/pdfs/pyproject.toml
  • mcp_servers/pdfs/smoke_test/pyproject.toml
  • mcp_servers/presentations/pyproject.toml
  • mcp_servers/presentations/smoke_test/pyproject.toml
  • mcp_servers/spreadsheets/pyproject.toml
  • mcp_servers/spreadsheets/smoke_test/pyproject.toml

Test plan

  • Verify MCP server starts without import errors
  • Verify all tools register correctly

🤖 Generated with Claude Code

Upgrade fastmcp dependency to >=3.2.0 to patch critical SSRF and Path Traversal vulnerability (CVE-2026-32871).
Fixes deprecated import paths and removed API patterns where applicable.
Remove invalid fastmcp version string from [tool.uv.sources] sections.
uv.sources requires source maps (git/path/url), not version specifiers.
Remove invalid fastmcp version string from [tool.uv.sources] sections.
uv.sources requires source maps (git/path/url), not version specifiers.
"datadog-api-client>=2.44.0",
"fastapi>=0.121.1",
"fastmcp>=2.12.4",
"fastmcp>=3.2.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lock files not updated, still pin FastMCP v2

High Severity

The pyproject.toml files were bumped to fastmcp>=3.2.0, but agents/uv.lock still locks fastmcp to 2.13.2 and environment/uv.lock still locks to 2.13.0.2. The lock file metadata also retains the old >=2.12.4 specifier. Since the environment/Dockerfile copies uv.lock and runs uv sync --all-groups, uv will detect the mismatch between the lock file and pyproject.toml and fail, breaking Docker builds. The CVE-2026-32871 security patch won't actually be applied in these packages because the locked versions are still v2.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 956939f. Configure here.

FastMCP v3 renamed batch getters:
- get_tools() -> list_tools()
- get_resources() -> list_resources()

Also removes invalid fastmcp entries from [tool.uv.sources] where applicable.
FastMCP v3 list_tools() returns list[Tool] instead of dict[str,Tool].
- Remove .values() calls on list_tools() results
- Change for name,tool in tools.items() to for tool in tools
FastMCP v3 removed _tool_manager. Tools are now in _local_provider._components.
Also fixes description -> instructions kwarg in FastMCP() constructor.
tools = await mcp_instance.list_tools()
server_tools = []
for tool in tools.values():
for tool in tools:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tool extraction scripts produce entries without schemas

Medium Severity

All extract_tools.py scripts check hasattr(tool, "parameters") and hasattr(tool, "output_schema"), but mcp.types.Tool returned by list_tools() has neither attribute — it uses inputSchema instead. Both conditions evaluate to False, so every extracted tool entry will contain only name and description, with inputSchema silently omitted. This affects all 8 extract scripts across calendar, chat, code, documents, filesystem, mail, pdfs, presentations, and spreadsheets.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 07b97d7. Configure here.

… mutations

FastMCP v3 list_tools() returns fresh objects each call, so schema
mutations via list_tools() dont persist. Use _local_provider._components
which returns the stored tool objects directly.
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5983d46. Configure here.


async def _flatten_tool_schemas():
for tool in (await mcp.get_tools()).values():
for tool in mcp._local_provider._components.values():
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fragile private API access for component iteration

Medium Severity

mcp._local_provider._components is a private API accessing internal FastMCP internals. In v3, _components is a unified dictionary containing all registered component types (tools, resources, prompts) with type-prefixed keys — not just tools. While only tools are currently registered and the getattr guard provides safety, this approach is tightly coupled to undocumented internals and will break silently if the internal storage structure changes in a future FastMCP release.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5983d46. Configure here.

Copy link
Copy Markdown

@jwstanly jwstanly left a comment

Choose a reason for hiding this comment

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

Approve: FastMCP v3.2.0 migration; validate workflow uses https://api.studio.mercor.com/services/validate with MERCOR_INTELLIGENCE_API_KEY where applicable.

@jwstanly
Copy link
Copy Markdown

jwstanly commented Apr 8, 2026

Approval is for the FastMCP v3.2.0 CVE bump. This PR diff does not change an ArCo validate workflow. If you add CI that calls Studio validate, use POST https://api.studio.mercor.com/services/validate with header X-API-Key: ${{ secrets.MERCOR_INTELLIGENCE_API_KEY }}.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants