Files
google-mcp/main.py
Vincent Demay f163ffbd30 Fix: wire WORKSPACE_MCP_STATELESS_MODE to FastMCP's stateless_http parameter
WORKSPACE_MCP_STATELESS_MODE=true was already read, validated, and used to
configure the OAuth layer — but was never passed to server.run(). FastMCP
therefore always ran in stateful mode, keeping session state in memory.

On pod/process restart all in-memory sessions are lost, causing clients to
receive {"code":-32600,"message":"Session not found"} on their next request.

Passes stateless_http=is_stateless_mode() to server.run() so FastMCP drops
session tracking when stateless mode is configured, matching what the env var
already advertises.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 12:47:51 +01:00

20 KiB