-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Description
When attempting to run the Exa MCP server via npx for a local stdio connection, the execution fails because npm cannot locate or link the binary.
Error Messages:
npm error could not determine executable to run
Claude Code CLI
❯ 1. exa ✘ failed · Enter to view details
※ Tip: Run claude --debug to see logs inline, or view log files in
/Users/trentrobbins/Library/Caches/claude-cli-nodejs/-Users-trentrobbins-code-flatagents
MCP Config locations (by scope):
• User config (available in all your projects):
• /Users/trentrobbins/.claude.json
• Project config (shared via .mcp.json):
• /Users/trentrobbins/code/flatagents/.mcp.json (file does not exist)
• Local config (private to you in this project):
• /Users/trentrobbins/.claude.json [project: /Users/trentrobbins/code/flatagents]
Root Cause
The package.json for exa-mcp-server defines the binary path using a hidden directory:
"bin": {
"exa-mcp-server": ".smithery/stdio/index.cjs"
}
Standard npm behavior often fails to create the appropriate symlink in node_modules/.bin/ when the target path resides within a dot-prefixed (hidden) folder like .smithery. This prevents npx from identifying the correct entry point.
Impact
Users following the standard MCP setup for local stdio (e.g., in Claude Desktop or Cursor) will encounter failures when using the recommended npx -y exa-mcp-server command.
Steps to Reproduce
- Run
npx -y exa-mcp-serverin a terminal. - Observe the
npm error could not determine executable to runerror.
Suggested Fix
Move the production entry point out of the hidden .smithery directory to a standard location, such as dist/ or build/, and update the bin field accordingly:
"bin": {
"exa-mcp-server": "dist/index.cjs"
}
Workaround
npm install -g exa-mcp-server
claude mcp add exa -e EXA_API_KEY=YOUR_KEY -- node "$(npm root -g)/exa-mcp-server/.smithery/stdio/index.cjs"