fix(mcp): restore x-api-key header for EXA websearch alongside query param

The header-based auth was removed during refactoring; some MCP server
implementations require it. Now sends both query param and header.
This commit is contained in:
YeonGyu-Kim
2026-02-11 00:44:04 +09:00
parent 6694082a7e
commit 17c56d8814
2 changed files with 6 additions and 4 deletions
+1
View File
@@ -35,6 +35,7 @@ export function createWebsearchConfig(config?: WebsearchConfig): RemoteMcpConfig
? `https://mcp.exa.ai/mcp?tools=web_search_exa&exaApiKey=${encodeURIComponent(process.env.EXA_API_KEY)}`
: "https://mcp.exa.ai/mcp?tools=web_search_exa",
enabled: true,
...(process.env.EXA_API_KEY ? { headers: { "x-api-key": process.env.EXA_API_KEY } } : {}),
oauth: false as const,
}
}