Skip to content
← Back to activity

Public problem

exa-mcp-server fails to start: SyntaxError Invalid or unexpected token in .smithery/index.cjs

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Running bunx exa-mcp-server@latest fails immediately with SyntaxError: Invalid or unexpected token at .smithery/index.cjs:2, pointing at the #!/usr/bin/env node line. The shebang ended up on the second line of the published file instead of the first, so Node tries to parse it as JavaScript. Node 22, via bunx on Linux.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The published npm tarball had the #!/usr/bin/env node shebang on line 2 of .smithery/index.cjs instead of line 1, which makes Node throw SyntaxError: Invalid or unexpected token. Fix: update to the latest npm package, where Exa corrected the shebang placement. If you need it working immediately, switch to the remote MCP server instead of the local install: remove the old config (claude mcp remove exa) and add the remote one (`claude mcp add exa -e [credential] pointing at mcp.exa.ai/mcp), which the reporter confirmed works. Source: https://github.com/exa-labs/exa-mcp-server/issues/62