-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add apiKey field to mcpServers block schema for Bearer token auth #8120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add apiKey field to sseOrHttpMcpServerSchema in packages/config-yaml - Update MCPConnection.ts to merge apiKey as Bearer token in Authorization header - Update CLI MCPService to merge apiKey as Bearer token in Authorization header - Add apiKey to InternalSseMcpOptions and InternalStreamableHttpMcpOptions types - Update yamlToContinueConfig converter to pass through apiKey field Fixes CON-4281 Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]> Co-authored-by: nate <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 5 files
|
🎉 This PR is included in version 1.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.24.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR adds an
apiKeyfield to themcpServersblock schema inpackages/config-yamland implements it as a Bearer token in the Authorization header across both the core MCP connection and the CLI MCP service.Changes
apiKeyfield tosseOrHttpMcpServerSchemainpackages/config-yaml/src/schemas/mcp/index.tsMCPConnection.tsto mergeapiKeyasAuthorization: Bearer <apiKey>header in both SSE and HTTP transportsMCPService.tsto mergeapiKeyasAuthorization: Bearer <apiKey>header in both SSE and HTTP transportsapiKey?: stringtoInternalSseMcpOptionsandInternalStreamableHttpMcpOptionsincore/index.d.tsyamlToContinueConfig.tsto pass through theapiKeyfieldUsage Example
Users can now specify an
apiKeydirectly in their mcpServers config instead of needing to userequestOptions.headers:This will automatically set the
Authorization: Bearer sk-1234567890abcdefheader.Fixes CON-4281
This agent session was co-authored by nate and Continue.
Summary by cubic
Add apiKey to the mcpServers schema and automatically send it as a Bearer token in Authorization headers for SSE and streamable HTTP transports. This simplifies MCP auth configuration and fulfills CON-4281.
New Features
Migration