[BUG] Failed to validate request
[BUG] always got this error: Failed to validate request: Received request before initialization was complete
Can you send an error log and the code you are running? Have you confirmed that your DB is running and you have properly filled out environment variables?
Can you send an error log and the code you are running? Have you confirmed that your DB is running and you have properly filled out environment variables?
There is no such problem now
When I use Docker Desktop and click "start" to start the service, I encounter this problem:
2025-09-07 10:51:54,931 - root - WARNING - Failed to validate request: Received request before initialization was complete
When I use compose start, this issue doesn't occur.
This issue prevents the MCP service from being used in Claude.
Confirming this issue with MCP server in Docker
Platform: Linux x86_64 (Arch Linux)
Docker Compose: v2.39.2
Client: Claude Code (claude.ai/code)
Reproduction:
- Start services:
docker-compose up -d(also tested withdocker-compose create && docker-compose start) - Connect Claude Code to
http://localhost:8000/sse - Any tool invocation returns:
MCP error -32602: Invalid request parameters - Server logs show:
Failed to validate request: Received request before initialization was complete
Additional finding:
The docker-compose.yml line 37 (OPENAI_API_KEY=${OPENAI_API_KEY}) causes shell environment variables to override .env file values. When shell has a different OPENAI_API_KEY set, this causes API authentication failures with OpenRouter or other providers configured in .env.
Workaround attempted: None successful. The initialization error persists regardless of startup method.
This appears to be a blocking bug in the FastMCP implementation preventing MCP clients from using the server.
@yizhishang Is this still an issue? Please confirm within 14 days or this issue will be closed.
i do have this issue
any time i try to use the MCP i got Error executing MCP tool: │ │ MCP error -32602: Invalid request parameters
docker logs :
graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Graphiti client initialized successfully graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Using OpenAI model: openai/gpt-4.1 graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Using temperature: 0.0 graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Using group_id: default graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Custom entity extraction: disabled graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Using concurrency limit: 10 graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Setting MCP server host to: 0.0.0.0 graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Starting MCP server with transport: sse graphiti-mcp-neo4j-1 | 2025-10-30 09:22:35,023 - main - INFO - Running MCP server with SSE transport on 0.0.0.0:8000 graphiti-mcp-neo4j-1 | INFO: Started server process [116] graphiti-mcp-neo4j-1 | INFO: Waiting for application startup. graphiti-mcp-neo4j-1 | INFO: Application startup complete. graphiti-mcp-neo4j-1 | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:36560 - "GET /sse HTTP/1.1" 200 OK graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:36570 - "GET /sse HTTP/1.1" 200 OK graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:38722 - "POST /messages/?session_id=82ccf9349ad940389d8ffc6cea4fe2bc HTTP/1.1" 202 Accepted graphiti-mcp-neo4j-1 | 2025-10-30 09:25:31,929 - root - WARNING - Failed to validate request: Received request before initialization was complete graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:38730 - "POST /messages/?session_id=82ccf9349ad940389d8ffc6cea4fe2bc HTTP/1.1" 202 Accepted graphiti-mcp-neo4j-1 | 2025-10-30 09:25:39,361 - root - WARNING - Failed to validate request: Received request before initialization was complete graphiti-mcp-neo4j-1 | 2025-10-30 09:29:04,464 - mcp.server.sse - WARNING - Received request without session_id graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:60672 - "POST /messages/ HTTP/1.1" 400 Bad Request graphiti-mcp-neo4j-1 | 2025-10-30 09:29:21,047 - mcp.server.sse - WARNING - Received invalid session ID: test-session-123 graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:50646 - "POST /messages/?session_id=test-session-123 HTTP/1.1" 400 Bad Request graphiti-mcp-neo4j-1 | INFO: 172.18.0.1:38850 - "POST /messages/?session_id=82ccf9349ad940389d8ffc6cea4fe2bc HTTP/1.1" 202 Accepted graphiti-mcp-neo4j-1 | 2025-10-30 09:37:57,837 - root - WARNING - Failed to validate request: Received request before initialization was complete
i do debug CURL request (that the invalid session)
@yizhishang Is this still an issue? Please confirm within 14 days or this issue will be closed.