-
Notifications
You must be signed in to change notification settings - Fork 270
Closed
Description
The recommended configuration uses npx -y @perplexity-ai/mcp-server. npx often writes installation logs ("Need to install the following packages...") or update checks to stdout. Since the MCP protocol requires stdout to be reserved exclusively for JSON-RPC messages, this extra text breaks the handshake, resulting in an immediate initialize: EOF error.
The Workaround: The reliable fix is to install the package locally (npm install @perplexity-ai/mcp-server) and point the config directly to the node executable and the script, bypassing the npx wrapper entirely.
** Before (Cursor/NPX style):**
{
"perplexity": {
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": { "PERPLEXITY_API_KEY": "..." }
}
}** After (Antigravity/Direct Execution style):**
{
"perplexity": {
"command": "/usr/local/bin/node",
"args": [
"/absolute/path/to/project/node_modules/@perplexity-ai/mcp-server/dist/index.js"
],
"env": { "PERPLEXITY_API_KEY": "..." }
}
}[The above is a summary of my troubleshooting session with Gemini Pro 3, generated by Gemini Pro 3]
Metadata
Metadata
Assignees
Labels
No labels