Просмотр исходного кода

fix(skills): Refresh mcp-ops to current majors (verifier drift)

Live registry check 2026-07-05: standalone fastmcp on PyPI is 3.4.x vs
documented major 2; spec.modelcontextprotocol.io stopped resolving.

- Distinguish the SDK-bundled 1.x-era FastMCP (mcp.server.fastmcp) from
  the standalone fastmcp package, now documented at major 3 with its
  breaking changes (serve-time transport config, ui= -> app=, async ctx
  state, fastmcp meta namespace)
- Re-point the spec citation to modelcontextprotocol.io/specification
  (old subdomain dead - caught by the live spec-url probe)
- mcp-facts.json: fastmcp sampled_major 2 -> 3, new spec url/token

check-mcp-facts.py --offline and --live both exit 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0xDarkMatter 2 недель назад
Родитель
Сommit
3916ffdf0c

+ 24 - 2
skills/mcp-ops/SKILL.md

@@ -12,7 +12,7 @@ metadata:
 
 Comprehensive patterns for building, testing, and deploying Model Context Protocol servers in Python and TypeScript.
 
-> Ecosystem facts verified as of 2026-07.
+> Ecosystem facts verified as of 2026-07-05 (standalone FastMCP at major 3).
 
 ## MCP Architecture Quick Reference
 
@@ -142,6 +142,28 @@ uv add mcp[cli]
 # Or:       uv run mcp run server.py
 ```
 
+**Two Python FastMCPs — know which you're on.** The official `mcp` SDK bundles a frozen
+1.x-era FastMCP (`from mcp.server.fastmcp import FastMCP`, used in the samples above —
+stable, minimal). The standalone `fastmcp` package (gofastmcp.com) is where active
+development happens and is at **major 3**: same decorator surface, plus auth, proxying,
+OpenAPI generation, and a test client. To use it:
+
+```bash
+uv add fastmcp
+```
+
+```python
+from fastmcp import FastMCP   # standalone FastMCP 3 — not mcp.server.fastmcp
+
+mcp = FastMCP("my-server")    # v3: constructor is identity/behaviour only;
+                              # transport config moved to run()/serve time
+```
+
+FastMCP 3 breaking changes (from 2.x): 16 deprecated constructor kwargs removed
+(transport settings now passed at serve time), `ui=` replaced by `app=`,
+`ctx.set_state()`/`ctx.get_state()` are now async with session-scoped persistence, and
+the metadata namespace changed from `_fastmcp` to `fastmcp`.
+
 ## TypeScript SDK Quick Start
 
 ```typescript
@@ -328,7 +350,7 @@ The canonical fact set lives in [`assets/mcp-facts.json`](assets/mcp-facts.json)
 
 ## See Also
 
-- **MCP Specification**: https://spec.modelcontextprotocol.io
+- **MCP Specification**: https://modelcontextprotocol.io/specification/latest (the old spec.modelcontextprotocol.io subdomain no longer resolves)
 - **Python SDK**: https://github.com/modelcontextprotocol/python-sdk
 - **TypeScript SDK**: https://github.com/modelcontextprotocol/typescript-sdk
 - **Official MCP Servers**: https://github.com/modelcontextprotocol/servers

+ 5 - 5
skills/mcp-ops/assets/mcp-facts.json

@@ -3,9 +3,9 @@
   "schema": "claude-mods.mcp-ops.facts/v1",
   "as_of": "2026-07-05",
   "spec": {
-    "url": "https://spec.modelcontextprotocol.io",
-    "prose_token": "spec.modelcontextprotocol.io",
-    "_comment": "The MCP specification URL cited in See Also. --offline asserts the token is named in the skill prose; --live expects the URL to answer HTTP 200 (after redirects)."
+    "url": "https://modelcontextprotocol.io/specification/latest",
+    "prose_token": "modelcontextprotocol.io/specification",
+    "_comment": "The MCP specification URL cited in See Also (moved off the spec. subdomain, which stopped resolving by 2026-07). --offline asserts the token is named in the skill prose; --live expects the URL to answer HTTP 200 (after redirects)."
   },
   "packages": {
     "@modelcontextprotocol/sdk": {
@@ -35,10 +35,10 @@
     "fastmcp": {
       "registry": "pypi",
       "role": "FastMCP high-level framework (gofastmcp.com)",
-      "sampled_major": 2,
+      "sampled_major": 3,
       "track_major": true,
       "prose_token": "fastmcp",
-      "_comment": "The standalone FastMCP package (FastMCP 2 +). Named in prose as FastMCP and via gofastmcp.com; matched case-insensitively."
+      "_comment": "The standalone FastMCP package, documented at major 3 (constructor identity-only, async ctx state, fastmcp meta namespace). Named in prose as FastMCP and via gofastmcp.com; matched case-insensitively."
     }
   }
 }

+ 6 - 1
skills/mcp-ops/references/server-architecture.md

@@ -87,7 +87,12 @@ Servers declare what they support during initialization:
 
 ## FastMCP Server Setup (Python)
 
-FastMCP is the recommended high-level API for Python MCP servers.
+FastMCP is the recommended high-level API for Python MCP servers. Two variants exist:
+the frozen 1.x-era version bundled in the official SDK (`from mcp.server.fastmcp import
+FastMCP`, used below) and the actively developed standalone `fastmcp` package at major 3
+(`from fastmcp import FastMCP`). The decorator surface shown here works on both; on
+standalone FastMCP 3, transport configuration moves out of the constructor to serve time,
+and `ctx.set_state()`/`ctx.get_state()` are async.
 
 ### Basic Server