Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,39 @@ SSE_KEEPALIVE_ENABLED=true
# How often to send keepalive events when SSE_KEEPALIVE_ENABLED=true
SSE_KEEPALIVE_INTERVAL=30

# Streaming HTTP Configuration
# Enable stateful sessions (stores session state server-side)
# Options: true, false (default)
# false: Stateless mode (better for scaling)
#####################################
# Session Persistence Configuration
#####################################

# Enable stateful sessions for streamable HTTP transport
# When enabled, single client workflow reuses one MCP session
USE_STATEFUL_SESSIONS=false

# Enable session pooling for SSE/WebSocket transports
# Default: false (maintains current per-request behavior)
SESSION_POOLING_ENABLED=false

# Session pooling strategy
# - user-server: Pool sessions per user+server combination (recommended)
# - global: Single global session pool (not recommended for multi-tenant)
# - disabled: Force disable pooling
SESSION_POOL_STRATEGY=user-server

# Session pool time-to-live in seconds (default: 1800 = 30 minutes)
SESSION_POOL_TTL=1800

# Maximum pooled sessions per user (default: 10)
SESSION_POOL_MAX_PER_USER=10

# Maximum idle time before session cleanup (default: 300 = 5 minutes)
SESSION_POOL_MAX_IDLE_TIME=300

# Session pool cleanup task interval (default: 60 = 1 minute)
SESSION_POOL_CLEANUP_INTERVAL=60

# Session pool metrics collection (default: true)
SESSION_POOL_METRICS_ENABLED=true

# Enable JSON response format for streaming HTTP
# Options: true (default), false
# true: Return JSON responses, false: Return SSE stream
Expand Down
Loading
Loading