📮 feat: Custom OAuth Headers Support for MCP Server Config (#10014)
Some checks failed
Sync Locize Translations & Create Translation PR / Sync Translation Keys with Locize (push) Waiting to run
Sync Locize Translations & Create Translation PR / Create Translation PR on Version Published (push) Blocked by required conditions
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Has been cancelled
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile, librechat-dev, node) (push) Has been cancelled
Docker Dev Images Build / build (Dockerfile.multi, librechat-dev-api, api-build) (push) Has been cancelled

* add oauth_headers field to mcp options

* wrap fetch to pass oauth headers

* fix order

* consolidate headers passing

* fix tests
This commit is contained in:
Federico Ruggi 2025-10-11 17:17:12 +02:00 committed by GitHub
parent cbd217efae
commit 5ce67b5b71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 304 additions and 35 deletions

View file

@ -142,6 +142,7 @@ export class MCPConnectionFactory {
serverName: metadata.serverName,
clientInfo: metadata.clientInfo,
},
this.serverConfig.oauth_headers ?? {},
this.serverConfig.oauth,
);
};
@ -161,6 +162,7 @@ export class MCPConnectionFactory {
this.serverName,
data.serverUrl || '',
this.userId!,
config?.oauth_headers ?? {},
config?.oauth,
);
@ -358,6 +360,7 @@ export class MCPConnectionFactory {
this.serverName,
serverUrl,
this.userId!,
this.serverConfig.oauth_headers ?? {},
this.serverConfig.oauth,
);