feat(mcp): migrate to mcp 2.x (MCPServer) (#23)
Image rebuild (skip scrape) / build (push) Successful in 6m5s

Co-authored-by: claude <[email protected]>
This commit was merged in pull request #23.
This commit is contained in:
2026-09-10 14:22:41 -04:00
committed by claude
parent e5ec32bff6
commit 0eb8ad0db6
4 changed files with 29 additions and 14 deletions
+6 -3
View File
@@ -161,7 +161,7 @@ template's PLAN.md.
│ ├── becks_pfr.py
│ └── becks_products.py
├── rag/ # chunk + embed + Chroma + BM25
├── docs_mcp/ # FastMCP server + lessons.md
├── docs_mcp/ # MCPServer (mcp 2.x) + lessons.md
├── eval/ # Golden-query harness
└── scripts/ # registry_gc.py, usage_report.py
```
@@ -189,7 +189,8 @@ template's PLAN.md.
- **Lexical store**: SQLite FTS5
- **Fusion**: RRF k=60
- **Transport**: streamable-HTTP in prod, stdio for local dev
- **MCP framework**: FastMCP with `stateless_http=True`
- **MCP framework**: `mcp` 2.x `MCPServer` (the 1.x `FastMCP`), with
`stateless_http=True` passed to `run()`
### Image name and package linking are repo-name-derived
@@ -230,7 +231,9 @@ python -m eval.run_eval --queries eval/queries.jsonl --output eval/results/basel
- **Reranker per-pair token limit**: jina-reranker GGUF rejects the
ENTIRE batch if any doc exceeds `n_ctx_train=1024`. Truncate
reranked docs to ~2000 chars.
- **FastMCP `stateless_http=True`**: critical for prod.
- **`stateless_http=True`**: critical for prod. Under mcp 2.x it is a
`run()` kwarg, NOT a constructor arg — every transport option moved off
the constructor. `mcp.settings` no longer exists.
- **Runner shell is `/bin/sh` (dash)** in CI — no `${VAR::N}`.
- **Cloudflare 100 MB body cap**: push via LAN endpoint
`192.168.0.2:1234`, pull via `git.jpaul.io`.