Documentation Index Fetch the complete documentation index at: https://mintlify.com/perplexityai/modelcontextprotocol/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Perplexity MCP Server works with multiple MCP clients. This guide shows you how to configure each supported client.
Quick Install Options
One-Click Installation
Several clients support one-click installation:
Cursor Install directly in Cursor
VS Code Install directly in VS Code
Client-Specific Configuration
Claude Code
Cursor
Claude Desktop
Windsurf
VS Code
Codex
Command Line Installation claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server
Plugin Installation export PERPLEXITY_API_KEY = "your_key_here"
claude
# Then run: /plugin marketplace add perplexityai/modelcontextprotocol
# Then run: /plugin install perplexity
The plugin installation method requires setting the API key as an environment variable before launching Claude.
One-Click Install (Recommended) Use the install badge at the top of the README for the easiest setup. Manual Configuration Edit ~/.cursor/mcp.json: {
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
If you encounter EOF or Initialize errors, replace "-y" with "-yq" in the args array to suppress npx output.
Configuration File Edit claude_desktop_config.json: {
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
The location of claude_desktop_config.json varies by platform. Check the Claude Desktop documentation for your operating system.
Configuration File Edit ~/.codeium/windsurf/mcp_config.json: {
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
One-Click Install (Recommended) Use the install badge at the top of the README for the easiest setup. Manual Configuration Create or edit .vscode/mcp.json in your workspace: {
"servers" : {
"perplexity" : {
"type" : "stdio" ,
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
VS Code uses a different configuration format with a servers wrapper and type field.
Command Line Installation codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server
Different clients use different configuration formats:
mcpServers Format (Cursor, Claude Desktop, Windsurf)
servers Format (VS Code)
CLI Format (Claude Code, Codex)
{
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
Additional Environment Variables
You can add any environment variable to the env object in your configuration:
{
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-y" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here" ,
"PERPLEXITY_TIMEOUT_MS" : "600000" ,
"PERPLEXITY_LOG_LEVEL" : "INFO"
}
}
}
}
Troubleshooting
EOF / Initialize Errors
Some strict MCP clients fail because npx writes installation messages to stdout.
Solution : Use npx -yq instead of npx -y to suppress output:
{
"mcpServers" : {
"perplexity" : {
"command" : "npx" ,
"args" : [ "-yq" , "@perplexity-ai/mcp-server" ],
"env" : {
"PERPLEXITY_API_KEY" : "your_key_here"
}
}
}
}
Check :
Ensure the package is installed correctly
Verify the command path is correct
Try running npx @perplexity-ai/mcp-server manually to test
API Key Issues
Check :
Ensure PERPLEXITY_API_KEY is set correctly in the env object
Verify your API key is valid at the API Portal
Make sure there are no extra spaces or quotes in the key
Connection Errors
Check :
Your internet connection
Your API key validity
If behind a corporate firewall, see Proxy Setup
Other MCP Clients
Most MCP clients can be manually configured using the mcpServers wrapper format (like Cursor, Claude Desktop, and Windsurf). If your client doesn’t work with this format, check its documentation for the correct configuration wrapper.