Prerequisites
Bug Description
I have configured the EXA_API_KEY in my environment variables, but oh-my-opencode seems to ignore it when establishing the connection to the Exa MCP server.
As a result, I am receiving a "free MCP rate limit" error from Exa. According to the error message and the Exa documentation, the API key must be passed via the exaApiKey query parameter in the URL (e.g., ?exaApiKey=YOUR_EXA_API_KEY), but the current implementation in src/mcp/websearch.ts does not seem to append this parameter automatically when the environment variable is present.
Steps to Reproduce
- Export a valid Exa API Key in the environment:
export EXA_API_KEY=your_key_here.
- Run
opencode.
- Perform a web search action that triggers the Exa MCP.
- (After sufficient usage) Observe that the request fails with a rate limit error, indicating the key was not used.
Expected Behavior
When EXA_API_KEY is present in the environment, the application should automatically append ?exaApiKey=${process.env.EXA_API_KEY} to the Exa MCP server URL so that the request is authenticated and uses the user's quota.
Actual Behavior
The application connects to the default Exa MCP URL without the API key, resulting in the following error:
Error: Streamable HTTP error: Error POSTing to endpoint: {
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "You've hit Exa's free MCP rate limit. To continue using without limits, create your own Exa API key.\n\nFix: Create API key at https://dashboard.exa.ai/api-keys , and then update Exa MCP URL to this https://mcp.exa.ai/mcp?exaApiKey=YOUR_EXA_API_KEY"
},
"id": null
}
Doctor Output
$ bunx oh-my-opencode doctor
oMoMoMoMo... Doctor
Installation
────────────────────────────────────────
✓ OpenCode Installation → 1.1.53
✓ Plugin Registration → Registered (pinned: latest)
Configuration
────────────────────────────────────────
✓ Configuration Validity → Valid JSONC config
✓ Model Resolution → 10 agents, 8 categories (18 overrides), 2449 available
Authentication
────────────────────────────────────────
✓ Anthropic (Claude) Auth → Auth plugin available
○ OpenAI (ChatGPT) Auth → Auth plugin not installed
○ Google (Gemini) Auth → Auth plugin not installed
Dependencies
────────────────────────────────────────
✓ AST-Grep CLI → installed
✓ AST-Grep NAPI → installed
⚠ Comment Checker → Not installed (optional)
Tools & Servers
────────────────────────────────────────
✓ GitHub CLI → 2.86.0 - authenticated as imbytecat
⚠ LSP Servers → No LSP servers detected
✓ Built-in MCP Servers → 2 built-in servers enabled
○ User MCP Configuration → No user MCP configuration found
○ MCP OAuth Tokens → No OAuth tokens configured
Updates
────────────────────────────────────────
⚠ Version Status → Update available: 3.2.3 -> 3.3.0
Summary
────────────────────────────────────────
9 passed, 0 failed, 3 warnings, 4 skipped
Total: 16 checks in 2355ms
⚠ All systems operational with warnings.
Error Logs
Configuration
Additional Context
Operating System
Linux
OpenCode Version
1.1.53
Prerequisites
Bug Description
I have configured the
EXA_API_KEYin my environment variables, butoh-my-opencodeseems to ignore it when establishing the connection to the Exa MCP server.As a result, I am receiving a "free MCP rate limit" error from Exa. According to the error message and the Exa documentation, the API key must be passed via the
exaApiKeyquery parameter in the URL (e.g.,?exaApiKey=YOUR_EXA_API_KEY), but the current implementation insrc/mcp/websearch.tsdoes not seem to append this parameter automatically when the environment variable is present.Steps to Reproduce
export EXA_API_KEY=your_key_here.opencode.Expected Behavior
When
EXA_API_KEYis present in the environment, the application should automatically append?exaApiKey=${process.env.EXA_API_KEY}to the Exa MCP server URL so that the request is authenticated and uses the user's quota.Actual Behavior
The application connects to the default Exa MCP URL without the API key, resulting in the following error:
Doctor Output
Error Logs
Configuration
Additional Context
src/mcp/websearch.tsOperating System
Linux
OpenCode Version
1.1.53