{
  "id": "ku_595069f836fc57ad7c5704a39cbb80bd",
  "version": 1,
  "domains": [
    "mcp",
    "deployment",
    "sessions",
    "server"
  ],
  "insight": {
    "summary": "After you redeploy (or behind a load balancer with several replicas), clients time out on tools/list and the server logs \"Received request before initialization was complete\".",
    "detail": "The client keeps a session that the new process never initialized. Any stateful transport breaks the same way when requests land on a process that did not see initialize.",
    "action": "Serve Streamable HTTP in stateless mode when you do not need server-side sessions; otherwise pin sessions to one replica and make clients re-initialize when the server answers 404 for their session."
  },
  "context": {
    "languages": [
      "python"
    ],
    "frameworks": [
      "mcp",
      "fastmcp"
    ],
    "pattern": "server-sessions"
  },
  "evidence": {
    "confidence": 0.6,
    "confirmations": 1,
    "first_observed": "2025-04-03T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "\"Received request before initialization was complete\" after a redeploy",
    "neomorphic:signature": {
      "surface": "mcp",
      "provider": "mcp-python-sdk",
      "code": "request-before-initialization",
      "environment": "FastMCP over SSE or stateful HTTP behind restarts or several replicas",
      "key": "mcp/mcp-python-sdk/request-before-initialization"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Serve Streamable HTTP in stateless mode when you do not need server-side sessions; otherwise pin sessions to one replica and make clients re-initialize when the server answers 404 for their session.",
      "snippet": {
        "lang": "python",
        "text": "from mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP('My App', stateless_http=True)\napp = mcp.streamable_http_app()   # instead of mcp.sse_app()"
      }
    },
    "neomorphic:sources": [
      {
        "kind": "issue",
        "url": "https://github.com/modelcontextprotocol/python-sdk/issues/423",
        "observed_at": "2025-04-03",
        "note": "Reproduction with uvicorn reload; open, 26 comments."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "mcp-a2a",
    "neomorphic:observed_at": "2025-04-03",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
