mcp 2.0.0 removed `mcp.server.fastmcp`; the `<2` ceiling in 23c7a3d
stopped the bleeding but left this server on the previous major.
Ports to the 2.x API, following the same shape seed-mcp shipped.
- requirements.txt: `mcp[fastmcp]>=1.0.0,<2` -> `mcp>=2,<3` (2.x has
no [fastmcp] extra)
- server.py: FastMCP -> mcp.server.mcpserver.MCPServer; `mcp.settings`
is gone, so host/port/stateless_http/transport_security are now
run() kwargs
- stateless_http is gated to streamable-http. Under 1.x it was a
constructor arg and so applied to sse too; sse is a dev-only path
here, and this matches seed-mcp.
- CI: both workflows now run `python -c "import docs_mcp.server"`
against the built image before pushing it. This is the durable
half — a green build can no longer ship a non-importing image.
- CLAUDE.md / README.md: correct the FastMCP references. PLAN.md is
left alone; it tracks the upstream template, not this repo.
Verification (mcp 1.27.1 -> 2.2.0):
- tools/list dumped in wire format is byte-for-byte identical,
md5 cea0326f59b55abbbf47c9679252d38f both sides. All 5 tools
(search_docs, get_page, list_versions, corpus_status,
crop_chem_api_lessons) unchanged, so routing is unaffected.
- streamable-http: `initialize` -> 200, no mcp-session-id header
(stateless_http confirmed active); tools/list and a real
tools/call over the wire both succeed.
- stdio: initialize + tools/list both fine.
- Image built; the new CI smoke command passes against it.
corpus_status reads the baked indexes (4,164 labels / 216,467
chunks) and a live `search_docs` returns hits with mode=hybrid-rrf
against Ollama on .0.125.
No eval numbers: this touches transport and packaging only. The
chunker, embedder, Chroma/BM25 stores, RRF and the reranker are all
untouched, and the live search above confirms retrieval still runs.
Note: `serverInfo.version` now reports "" instead of the SDK version
(2.x behaviour for an unversioned server). Cosmetic, but visible to
clients. httpx2 + opentelemetry-api come in as 2.x deps and coexist
with the existing httpx 0.28.1 pin, as expected.
Closes #4
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FFBDnRWHispovmJVK9rXc9
21 lines
484 B
Plaintext
21 lines
484 B
Plaintext
# MCP server
|
|
mcp>=2,<3 # 2.x: no [fastmcp] extra; FastMCP -> MCPServer
|
|
pydantic>=2.0
|
|
httpx>=0.27
|
|
|
|
# Vector store + embeddings
|
|
chromadb>=0.5.0
|
|
ollama>=0.4.0 # if using Ollama-hosted embedder; swap if not
|
|
|
|
# Scraping (Phase 1; adjust per product)
|
|
beautifulsoup4>=4.12
|
|
requests>=2.31
|
|
pypdf>=4.0 # PDF -> text for label extraction
|
|
# playwright>=1.40 # uncomment if you need headless browser fallback
|
|
|
|
# Evaluation
|
|
numpy>=1.26
|
|
|
|
# Dev / utility
|
|
python-dateutil>=2.8
|