feat(mcp): migrate to mcp 2.x (MCPServer)

Lift the mcp<2 pin landed in de2560c. Three mechanical changes from
the seed-mcp#23 port: MCPServer instead of FastMCP, transport options
moved onto run(), and CI import smoke so a green build cannot ship a
non-importing image.

tools/list is byte-for-byte identical between 1.30.0 and 2.2.0 (10
tools). initialize over streamable-http returns 200.

Closes #9
This commit is contained in:
2026-09-10 20:47:43 -04:00
parent b63b623514
commit 819eb5349b
4 changed files with 50 additions and 20 deletions
+14
View File
@@ -59,6 +59,9 @@ jobs:
python -m pip install -q --upgrade pip
python -m pip install -q -r requirements.txt
- name: Smoke — server module imports
run: python -c "import docs_mcp.server"
- name: Refresh digest history
# Cheap (few seconds). Without this step, a code-only deploy
# would ship an increasingly-stale digest history.
@@ -124,6 +127,17 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Smoke — image must import docs_mcp.server
# mcp 2.x renamed mcp.server.fastmcp -> mcp.server.mcpserver, so an
# unpinned dep produced a green build that crash-looped in prod
# (seed-mcp 2026-09-01, zerto-docs 2026-08-11). Import is
# side-effect-free here (lazy singletons), so this needs no
# Ollama/Chroma.
run: |
IMAGE="${{ steps.repo.outputs.owner }}/${{ steps.repo.outputs.name }}"
docker run --rm --entrypoint python \
"${REGISTRY_PUSH}/${IMAGE}:latest" -c "import docs_mcp.server"
- name: Link container package to this repo
env:
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}