I am using an MCP which requires token in the form of bearer authorization. I don’t see a way of updating the bearer authorization header of an existing MCP. Seems like I need to add a new MCP with the updated bearer authorization token.
How do I do this without having a user interruption?
Doesn’t the agent reread the MCP and use tokens for this?
No, the MCP is not reread. My first idea would be to generate the AgentSession dynamically (if you need to update the token mid-conversation, you could then hand off to this new agent), but we don’t have any examples for that. I’m interested if others have better ideas
I think it’s a good use case, but since (I don’t think) most MCPs work this way, it likely got overlooked. If this is more common than I realise, it might be worth raising a feature request in the agents repo.