An MCP server that connects to Perplexity's Sonar API, enabling real-time web-wide research in conversational AI.
An MCP server implementation that integrates the Sonar API to provide Claude with unparalleled real-time, web-wide research.
Please refer to the official DeepWiki page for assistance with implementation.
Credits: DeepWiki powered by Devin
messages
(array): An array of conversation messages.
role
(string): The role of the message (e.g., system
, user
, assistant
).content
(string): The content of the message.Clone this repository:
git clone git@github.com:ppl-ai/modelcontextprotocol.git
Navigate to the perplexity-ask
directory and install the necessary dependencies:
cd modelcontextprotocol/perplexity-ask && npm install
PERPLEXITY_API_KEY
.Download Claude desktop here.
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"perplexity-ask": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PERPLEXITY_API_KEY",
"mcp/perplexity-ask"
],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
{
"mcpServers": {
"perplexity-ask": {
"command": "npx",
"args": [
"-y",
"server-perplexity-ask"
],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
You can access the file using:
vim ~/Library/Application\ Support/Claude/claude_desktop_config.json
Docker build:
docker build -t mcp/perplexity-ask:latest -f Dockerfile .
Let's make sure Claude for Desktop is picking up the two tools we've exposed in our perplexity-ask
server. You can do this by looking for the hammer icon:
After clicking on the hammer icon, you should see the tools that come with the Filesystem MCP Server:
If you see both of these this means that the integration is active. Congratulations! This means Claude can now ask Perplexity. You can then simply use it as you would use the Perplexity web app.
Currently, the search parameters used are the default ones. You can modify any search parameter in the API call directly in the index.ts
script. For this, please refer to the official API documentation.
The Claude documentation provides an excellent troubleshooting guide you can refer to. However, you can still reach out to us at api@perplexity.ai for any additional support or file a bug.
You can also use our MCP with Cursor (or any other app that supports this). To use Sonar with Cursor, you can follow the following steps.
And click on Add new global MCP server
This is the same configuration you would use for any other application that supports MCP.
You should then see the application being part of your available tools like this:
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Search campgrounds around the world on campertunity, check availability, and provide booking links.
Search and book from over 2 million hotels with shopping and booking capabilities.
Production-ready RAG out of the box to search and retrieve data from your own documents.
Query your local `mu` mail index for fast, structured mail search from MCP clients.
Performs web searches using the Gemini Web Search Tool via the local gemini-cli.
Analyzes user search keyword intent for SEO support using the AI Search Intent API.
Query 24-hour weather forecasts and city information by city name or coordinates.
Performs deep web searches for information using the Tavily API.
An MCP server for web and similarity search, designed for Claude Desktop. It integrates with various external embedding and API services.
A Model Context Protocol Server for SearXNG