Skip to content

chore(mcp): migrate fastmcp 2.x → 3.x (precondition for caching middleware, prompts, prefab UI) #108

Description

@dougborg

Problem

frontapp_mcp_server/pyproject.toml pins fastmcp>=2.13.0. Sibling repos stocktrim (PR #155) and statuspro have both moved to fastmcp 3.x and unlocked several capabilities frontapp wants:

  • ResponseCachingMiddleware (built-in read-tool caching) — see issue #TBD-CACHE
  • Native MCP Prompts as a first-class primitive — see issue #TBD-PROMPTS
  • PrefabApp / MCP Apps spec alignment — see issue #TBD-PREFAB
  • Cleaner OTel span instrumentation (replaces our bespoke observe_* decorators) — see issue #TBD-OBSERVE

This is a precondition issue. Land it first, then the dependent issues become straightforward.

Plan

  1. Read the fastmcp 3.x changelog/migration guide
  2. Audit frontapp_mcp_server/src/frontapp_mcp/_fastmcp_patches.py — many of these patches likely become obsolete on 3.x; document which can go away
  3. Bump frontapp_mcp_server/pyproject.toml fastmcp>=3.0.0
  4. Adapt server entry point (server.py), middleware registration, and any 2.x-specific call sites
  5. Verify uv run poe full-check passes
  6. Verify uv run poe mcp-dev starts cleanly and the inspector lists the same tool/resource set

Files likely affected

  • frontapp_mcp_server/pyproject.toml
  • frontapp_mcp_server/src/frontapp_mcp/_fastmcp_patches.py
  • frontapp_mcp_server/src/frontapp_mcp/server.py
  • frontapp_mcp_server/src/frontapp_mcp/__main__.py
  • Possibly frontapp_mcp_server/tests/conftest.py for any test-side fixtures

Acceptance criteria

  • fastmcp>=3.0.0 pinned, lockfile regenerated
  • _fastmcp_patches.py audited; obsolete patches removed with a one-line comment per remaining patch
  • uv run poe full-check passes
  • uv run poe mcp-dev lists same tools and resources as before
  • Manual smoke in Claude Desktop: at least one read tool and one mutation work end-to-end

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions