graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

[BUG] Failed to validate request

Open yizhishang opened this issue 4 months ago • 7 comments

[BUG] always got this error: Failed to validate request: Received request before initialization was complete

yizhishang avatar Aug 16 '25 05:08 yizhishang

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?

prasmussen15 avatar Aug 18 '25 14:08 prasmussen15

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

yizhishang avatar Aug 19 '25 13:08 yizhishang

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.

vvkkfwq avatar Sep 07 '25 11:09 vvkkfwq

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:

  1. Start services: docker-compose up -d (also tested with docker-compose create && docker-compose start)
  2. Connect Claude Code to http://localhost:8000/sse
  3. Any tool invocation returns: MCP error -32602: Invalid request parameters
  4. 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.

gebeer avatar Sep 12 '25 00:09 gebeer

@yizhishang Is this still an issue? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Oct 17 '25 00:10 claude[bot]

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)

aurelben avatar Oct 30 '25 10:10 aurelben

@yizhishang Is this still an issue? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Nov 17 '25 00:11 claude[bot]