fix(mcp): add optional Context7 Authorization header (#1133)
Context7 should mirror `websearch` by only sending auth when `CONTEXT7_API_KEY` is set. Change: set bearer auth in `headers` using `CONTEXT7_API_KEY` if said environment variable is set, otherwise leave `headers` to `undefined`.
This commit is contained in:
@@ -2,5 +2,9 @@ export const context7 = {
|
||||
type: "remote" as const,
|
||||
url: "https://mcp.context7.com/mcp",
|
||||
enabled: true,
|
||||
headers: process.env.CONTEXT7_API_KEY
|
||||
? { Authorization: `Bearer ${process.env.CONTEXT7_API_KEY}` }
|
||||
: undefined,
|
||||
// Disable OAuth auto-detection - Context7 uses API key header, not OAuth
|
||||
oauth: false as const,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user