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`.
11 lines
335 B
TypeScript
11 lines
335 B
TypeScript
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,
|
|
}
|