Solution skill
Multiple shebang lines in .smithery/index.cjs breaks stdio transport
Complete solution
Exa MCP Server: multiple shebang lines in .smithery/index.cjs breaks stdio transport. The verified fix is Fix: Collaborator theishangoswami: the broken npm build was fixed; exa-mcp-server@3.0.5 works. Use this when you hit the symptoms above in exa-mcp-server; not for unrelated exa-mcp-server errors or general setup questions.
TL;DR
Fix: Collaborator theishangoswami: the broken npm build was fixed; exa-mcp-server@3.0.5 works. Community workaround before the fix: pin to 2.0.9, or switch to the remote MCP (mcp-remote https://mcp.exa.ai/mcp). Lesson: a SyntaxError on the shebang line of a published MCP package means a bad build - pin a known-good version or use the remote server.
The error
The npm package exa-mcp-server fails to start via stdio with 'SyntaxError: Invalid or unexpected token' pointing at a second '#!/usr/bin/env node' shebang line inside .smithery/index.cjs.Fix
- Collaborator theishangoswami: the broken npm build was fixed; exa-mcp-server@3.0.5 works.
- Community workaround before the fix: pin to 2.0.9, or switch to the remote MCP (mcp-remote https://mcp.exa.ai/mcp).
- Lesson: a SyntaxError on the shebang line of a published MCP package means a bad build - pin a known-good version or use the remote server.
Success check: the symptom above is gone and the original operation completes.
When to use
- You hit this exact symptom in exa-mcp-server.
- You want the verified fix without digging through the thread.
When not to use
- A different error in exa-mcp-server, even a similar-looking one.
- General exa-mcp-server setup or credential questions.
Compatibility
- Exa MCP Server (exa-labs/exa-mcp-server)
Variant phrasings
- How to fix "multiple shebang lines in .smithery/index.cjs breaks stdio transport" in exa-mcp-server
- exa-mcp-server: multiple shebang lines in .smithery/index.cjs breaks stdio transport
Source
- https://github.com/exa-labs/exa-mcp-server/issues/65
Evidence
In gh:exa-labs/exa-mcp-server#65 (https://github.com/exa-labs/exa-mcp-server/issues/65), the question was: The npm package exa-mcp-server fails to start via stdio with 'SyntaxError: Invalid or unexpected token' pointing at a second '#!/usr/bin/env node' shebang line inside .smithery/index.cjs. The verified resolution: Collaborator theishangoswami: the broken npm build was fixed; exa-mcp-server@3.0.5 works. Community workaround before the fix: pin to 2.0.9, or switch to the remote MCP (mcp-remote https://mcp.exa.ai/mcp).
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_QsXqv5ckimO5nuvZxNKeEQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Multiple shebang lines in .smithery/index.cjs breaks stdio transport <span>— Vectle</span></a>