feat(mcp): allow updating headers on MCPServerHTTP#5559
Conversation
Expose headers as a property with a setter that propagates updates to the active httpx.AsyncClient. This enables refreshing short-lived bearer tokens without recreating the MCP connection. Closes #5542
theomonnom
left a comment
There was a problem hiding this comment.
Lg! but let's deprecate MCPServer in favor of MCPToolset anyyway
I think we'll deprecate MCPServer for AgentSession but we still need to pass it to the MCPToolset right? |
|
This is an automated Claude Code Routine created by @toubatbrian. Right now it is in experimentation stage. The automation will start porting this PR into agents-js automatically. Triage result: skipping port This PR adds a Porting this incremental enhancement in isolation isn't actionable without first porting the underlying MCP server infrastructure (transport selection between SSE / streamable HTTP, client lifecycle, tool listing/invocation, etc.), which is well beyond the scope of a single PR port. No cc @toubatbrian @livekit/agent-devs Generated by Claude Code |
Summary
MCPServerHTTP.headersas a property with a setter that propagates updates to the activehttpx.AsyncClient.Closes #5542
Usage