Ability to pass headers to MCP servers #7155
Replies: 4 comments 5 replies
-
It’s already possible but needs to be documented will work on that soon. |
Beta Was this translation helpful? Give feedback.
-
https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/mcp_servers#headers |
Beta Was this translation helpful? Give feedback.
-
We have an issue with the headers not being passed in the initial call to the MCP server. This seems to be due to this code in The common headers do not include the headers from There are a few solutions:
|
Beta Was this translation helpful? Give feedback.
-
@danny-avila I see that headers can now be dynamic, but from where should we explicitly pass them from the framework? In my case we want to pass the Bearer token of the current user to the tool, does that require modifications or should be picked up by your changes? In meanwhile created feature support: #7240 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@danny-avila Can we give opportunity to pass certain headers, like Authorization tokens or others from Librechat MCP Client to the MCP servers?
Main reason is to add an extra layer of authorization to the MCP servers so that they dont rely on API keys only and on hardcoded long-lived credentials in env files.
Or maybe is already possible? Thanks
Beta Was this translation helpful? Give feedback.
All reactions