This MCP server enables large language models (LLMs) like Claude to access the Perplexity search API through the Model Context Protocol, allowing real-time web searches with results and citations directly within conversations.
query
(string, required): The search querysearch_recency_filter
(string, optional): Filter results by time (month
, week
, day
, hour
)max_tokens
(integer, optional): Maximum number of tokens to returntemperature
(number, optional, default: 0.2): Controls randomness in responsetop_p
(number, optional, default: 0.9): Nucleus sampling thresholdsearch_domain_filter
(array, optional): List of domains to limit search resultsreturn_images
(boolean, optional): Include image links in resultsreturn_related_questions
(boolean, optional): Include related questionstop_k
(number, optional, default: 0): Number of tokens for top-k filteringstream
(boolean, optional): Stream response incrementallypresence_penalty
(number, optional, default: 0): Adjust likelihood of new topicsfrequency_penalty
(number, optional, default: 1): Reduce repetitionweb_search_options
(object, optional): Configuration options for web searchThe easiest way to install Perplexity Search MCP for Claude Desktop is via Smithery:
npx -y @smithery/cli install @chenxilol/perplexity-mcp-go --client claude
git clone https://github.com/chenxilol/perplexity-mcp-go.git
cd perplexity-mcp-go
go build -o perplexity-search-mcp
export PERPLEXITY_API_KEY="your-api-key-here"
./perplexity-search-mcp
docker build -t perplexity-search-mcp:latest .
docker run -i --rm -e PERPLEXITY_API_KEY=your-api-key-here perplexity-search-mcp:latest
Copy the Claude configuration file to your Claude configuration directory:
%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Edit the configuration file to include your API key:
{
"mcpServers": {
"perplexity-search": {
"command": "/path/to/perplexity-search-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}
}
Once configured, Claude can use the perplexity_search tool via MCP. Here's an example of search parameters:
{
"query": "latest AI research developments",
"search_recency_filter": "week",
"temperature": 0.5,
"return_related_questions": true,
"web_search_options": {
"search_context_size": "high"
}
}
If you encounter issues:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "perplexity-search" '{"command":"/path/to/perplexity-search-mcp","env":{"PERPLEXITY_API_KEY":"your-api-key-here"}}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"perplexity-search": {
"command": "/path/to/perplexity-search-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"perplexity-search": {
"command": "/path/to/perplexity-search-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect