Common Issues
This guide helps you resolve common problems when using the Perplexity MCP Server.API Key Issues
API Key Issues
Symptoms:
- Error: “PERPLEXITY_API_KEY environment variable is required”
- 401 Unauthorized errors
- Authentication failures
- Verify your API key is set correctly in your configuration file
- Check that there are no extra spaces or quotes around the key
- Ensure you’re using a valid API key from the Perplexity API Portal
- Try regenerating your API key if it may have been revoked
Connection Errors
Connection Errors
Symptoms:
- “Network error while calling Perplexity API”
- Connection timeout
- DNS resolution failures
- Check your internet connection
- Verify that
api.perplexity.aiis accessible from your network - If behind a corporate firewall, configure proxy settings (see Proxy Issues)
- Check if your firewall or antivirus is blocking the connection
- Verify DNS resolution:
nslookup api.perplexity.ai
Tool Not Found
Tool Not Found
Symptoms:
- MCP client reports “Tool not found” or “Server not available”
- Perplexity tools don’t appear in your client
- Verify the package is installed correctly:
- Check that the command path in your configuration is correct
- Ensure
npxis available in your PATH - Try clearing the npx cache:
- Restart your MCP client after making configuration changes
For Cursor, Claude Desktop, and similar clients, the configuration file must be valid JSON with no syntax errors.
Timeout Errors
Timeout Errors
Symptoms:
- “Request timeout: Perplexity API did not respond within Xms”
- Long-running research queries fail
- Increase the timeout value by setting
PERPLEXITY_TIMEOUT_MS(default: 300000ms / 5 minutes): - For
perplexity_research, consider setting timeout to 10+ minutes (600000ms) - Check your network stability - intermittent connections can cause timeouts
The
perplexity_research tool using sonar-deep-research model typically takes 30+ seconds to complete.Proxy Issues
Proxy Issues
Symptoms:
- Connection errors when behind a corporate firewall
- Proxy authentication failures
- SSL/TLS certificate errors
- Set the
PERPLEXITY_PROXYenvironment variable: - For authenticated proxies, include credentials:
- Alternatively, use standard proxy environment variables:
HTTPS_PROXYorHTTP_PROXY - Ensure
api.perplexity.aiis not blocked by your firewall - Verify your proxy settings with your IT department
The server checks proxy settings in this order:
PERPLEXITY_PROXY → HTTPS_PROXY → HTTP_PROXY. URLs must include the protocol (https://).EOF / Initialize Errors
EOF / Initialize Errors
Symptoms:
- “Unexpected EOF” during server initialization
- “Failed to initialize” errors
- MCP client can’t connect to server
- Some strict MCP clients fail because
npxwrites installation messages to stdout - Use
npx -yq(quiet mode) instead ofnpx -y: - Clear the npx cache:
npx clear-npx-cache - Ensure you have the latest version of Node.js and npm
Debugging Tips
Enable Debug Logging
Set the log level to see detailed error information:DEBUG, INFO, WARN, ERROR (default: ERROR)
Check Server Logs
Most MCP clients store server logs in a specific location:- Cursor: Check the output panel or logs directory
- Claude Desktop:
~/Library/Logs/Claude/(macOS) or%APPDATA%\Claude\logs\(Windows) - VS Code: Check the MCP extension output panel
Verify API Connectivity
Test the Perplexity API directly:Check Network Configuration
Verify your network setup:Getting Help
If you’re still experiencing issues:- Community Support: Visit community.perplexity.ai to ask questions and share solutions
- GitHub Issues: Report a bug or search for existing issues
- Documentation: Review the Configuration and Tools sections
- Your MCP client name and version
- Your configuration (with API key redacted)
- Error messages and logs
- Steps to reproduce the issue