Multi-player sessions – support updating MCP server headers mid-session

Status Closed — not planned
Maintainer reply None cached
Activity 4 comments · opened May 22, 2026 · 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 server
  • mcp_toggle – enable/disable a server

But there's no equivalent for updating headers on a running server.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗