Configure and pass dynamic headers in mcp configuration #329
Unanswered
kaustubh-lgtm
asked this question in
Q&A
Replies: 2 comments 1 reply
|
The MCP SDK takes the headers when you connect to the Server, so we either need to:
Option 1 is the most sensible; if you need to do this programmatically, the best way to go is to use the AgentConfig class directly and dynamically create the servers. There's some code in The other alternative is that 0.3.0 will break out the tool calling loop to make it easier to manage your own tool calls if you want. That should be ready fairly soon. |
0 replies
|
This was just merged in. I'm using this feature in lieu of per request headers |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to pass header value dynamically to mcp server? So basically I need to pass bearer token for user to mcp server as each user might have different one
From what I see in documentation, mcp server configuration is loaded once and there seems to be no way to modify header information when invoking it
There is way to populate header through environment variable but its loaded only at startup and it can't be modified per request basis
Is there any other way to do this? or support needs to be added for this?
All reactions