fix: add EXA_API_KEY header support for websearch_exa MCP (#499)

The remote MCP endpoint https://mcp.exa.ai/mcp requires API key authentication
via x-api-key header. Without this, the connection times out waiting for auth.

This change:
- Reads EXA_API_KEY from environment variable
- Passes it as x-api-key header when available
- Updates RemoteMcpConfig type to support optional headers

Co-authored-by: Junho Yeo <i@junho.io>
This commit is contained in:
Ruirui Wan
2026-01-06 14:12:22 -07:00
committed by GitHub
parent 3de6984e4c
commit 9ccb4a750d
2 changed files with 12 additions and 2 deletions
+3
View File
@@ -2,4 +2,7 @@ export const websearch = {
type: "remote" as const,
url: "https://mcp.exa.ai/mcp?tools=web_search_exa",
enabled: true,
headers: process.env.EXA_API_KEY
? { "x-api-key": process.env.EXA_API_KEY }
: undefined,
}