The Perplexity MCP Server is an intelligent research assistant powered by Perplexity's specialized AI models. It automatically detects query complexity to route requests to the most appropriate model for optimal results, and provides search capabilities for all tasks.
Add the server to your MCP settings file with one of these methods:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": [
"-y",
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "your_api_key"
}
}
}
}
{
"mcpServers": {
"perplexity": {
"command": "node",
"args": ["/path/to/perplexity-server/build/index.js"],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
},
"disabled": false,
"autoApprove": []
}
}
}
Best for straightforward questions that need concise, direct answers.
const result = await use_mcp_tool({
server_name: "perplexity",
tool_name: "search",
arguments: {
query: "What is the capital of France?",
force_model: false // Optional: force using this model even if query seems complex
}
});
Perfect for explanations, comparisons, and problem-solving that require detailed analysis.
const result = await use_mcp_tool({
server_name: "perplexity",
tool_name: "reason",
arguments: {
query: "Compare and contrast REST and GraphQL APIs, explaining their pros and cons",
force_model: false // Optional: force using this model even if query seems simple
}
});
Ideal for in-depth analysis of complex topics and comprehensive research reports.
const result = await use_mcp_tool({
server_name: "perplexity",
tool_name: "deep_research",
arguments: {
query: "The impact of quantum computing on cryptography",
focus_areas: [
"Post-quantum cryptographic algorithms",
"Timeline for quantum threats",
"Practical mitigation strategies"
],
force_model: false // Optional: force using this model even if query seems simple
}
});
Note: The Deep Research tool may timeout with some tools like Cline due to implementation differences, but works well with other tools like Cursor.
The server automatically analyzes query complexity to route requests to the most appropriate model:
Simple Queries → Sonar Pro
Complex Queries → Sonar Reasoning Pro
Research Queries → Sonar Deep Research
You can override the automatic selection using force_model: true
in any tool's arguments.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.