Multi-player sessions – support updating MCP server headers mid-session
Resolved 💬 3 comments Opened May 22, 2026 by sonjaer Closed Jun 21, 2026
We use the Claude Code SDK to run hosted agent sessions. At session creation, we pass MCP servers with Authorization headers via ClaudeAgentOptions.mcp_servers. We need to update those headers per-turn as different users send messages. Today, headers are set once and can't be changed for the lifetime of the session.
Use cases this would unlock
- Multi-player sessions – multiple users sharing a session, each with their own MCP server credentials per turn
- Long-lived sessions – sessions that outlive token expiry, with no recovery path today
What exists today
The SDK already supports mid-session MCP operations via control messages:
mcp_reconnect– reconnect a failed servermcp_toggle– enable/disable a server
But there's no equivalent for updating headers on a running server.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗