{
 "action": "Not for automatic application — after the patch the example still uses FastMCP, which the verified example does not: the patch covers part of the change. Show this correction to the user as a lead. Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [],
 "applicability": {
  "leftover": [
   "FastMCP"
  ],
  "line": 3,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "113c0f3c8f66",
  "reason": "after the patch the example still uses FastMCP, which the verified example does not: the patch covers part of the change",
  "run_on": "2.3.0",
  "status": "incomplete"
 },
 "by_notes": false,
 "changelog_ref": {
  "quote": "",
  "url": ""
 },
 "confirmations": {
  "failed": 0,
  "worked": 10
 },
 "detect": [
  "FastMCP",
  "mcp.server.fastmcp"
 ],
 "ecosystem": "pypi",
 "equivalence": "same",
 "error_kind": "missing_module",
 "error_signature": {
  "message": "No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) and other APIs changed; see the migration guide at https://py.sdk.modelcontextprotocol.io/v2/migration/#fastmcp-renamed-to-mcpserver or pin 'mcp<2' to keep runni",
  "norm": "missing_module:mcp.server.fastmcp",
  "type": "ModuleNotFoundError"
 },
 "first_seen": "2026-10-20T16:11:13+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "pypi/mcp/2.3.0/0005",
 "kind": "changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "mcp",
 "proof": {
  "applicability": {
   "leftover": [
    "FastMCP"
   ],
   "line": 3,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "113c0f3c8f66",
   "reason": "after the patch the example still uses FastMCP, which the verified example does not: the patch covers part of the change",
   "run_on": "2.3.0",
   "status": "incomplete"
  },
  "auto_apply": false,
  "auto_apply_reason": "the patch gives incomplete when applied word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "same",
  "equivalent": true,
  "fails_on": "2.3.0",
  "fixed_on": "2.3.0",
  "level": "differential",
  "method": {
   "fix_on": "2.3.0",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "1.26.0",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "import asyncio\n\nimport anyio\n\nfrom mcp import ClientSession\nfrom mcp.server.auth.middleware.auth_context import get_access_token\nfrom mcp.server.mcpserver import Context, MCPServer\nfrom mcp.shared.memory import create_client_server_memory_streams\n\nmcp = MCPServer(\"whoami-server\")\n\n\n@mcp.tool()\ndef whoami(ctx: Context) -> str:\n    \"\"\"Return the client ID from the request context, or 'anonymous'.\"\"\"\n    access_token = get_access_token()\n    client_id = access_token.client_id if access_token else None\n    return client_id if client_id else \"anonymous\"\n\n\nasync def main() -> None:\n    # MCPServer wraps a low-level server.\n    # Create in-memory streams, run the server on them and an initialized ClientSession.\n    server = getattr(mcp, \"_lowlevel_server\", None) or mcp._mcp_server\n    async with create_client_server_memory_streams() as (client_streams, server_streams):\n        async with anyio.create_task_group() as tg:\n            tg.start_soon(\n                server.run,\n                server_streams[0],\n                server_streams[1],\n                server.create_initialization_options(),\n            )\n            async with ClientSession(client_streams[0], client_streams[1]) as client:\n                await client.initialize()\n                result = await client.call_tool(\"whoami\", {})\n                for item in result.content:\n                    text = getattr(item, \"text\", None)\n                    if text is not None:\n                        print(text)\n            tg.cancel_scope.cancel()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())",
  "script_wrong": "import asyncio\n\nfrom mcp.server.fastmcp import Context, FastMCP\nfrom mcp.shared.memory import create_connected_server_and_client_session\n\nmcp = FastMCP(\"whoami-server\")\n\n\n@mcp.tool()\ndef whoami(ctx: Context) -> str:\n    \"\"\"Return the client ID from the request context, or 'anonymous'.\"\"\"\n    client_id = ctx.client_id\n    return client_id if client_id else \"anonymous\"\n\n\nasync def main() -> None:\n    # FastMCP wraps a low-level server, exposed as _mcp_server.\n    # The helper creates in-memory streams and an initialized ClientSession.\n    async with create_connected_server_and_client_session(\n        mcp._mcp_server\n    ) as client:\n        result = await client.call_tool(\"whoami\", {})\n        for item in result.content:\n            text = getattr(item, \"text\", None)\n            if text is not None:\n                print(text)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())",
  "works_on": "1.26.0"
 },
 "right": "from mcp.server.mcpserver import Context, MCPServer",
 "seen_in_models": [
  "claude-sonnet-5-5",
  "gemini-3.8-flash",
  "gpt-6.1-sol"
 ],
 "seq": 5,
 "slug": "context-client-id",
 "source": "pipeline",
 "symbol": "FastMCP",
 "updated": "2026-10-27T17:20:00+00:00",
 "url": "https://formachines.ai/errata/pypi/mcp/0005-context-client-id/",
 "variant_confirmations": 10,
 "variant_models": [
  "claude-sonnet-5-5",
  "gemini-3.8-flash",
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">1.26.0,<=2.3.0",
  "fails_on": "2.3.0",
  "works_on": "1.26.0"
 },
 "wrong": "from mcp.server.fastmcp import Context, FastMCP"
}