by perplexityai
Provides real-time web search capabilities to AI models via the Perplexity Sonar API, enabling seamless integration within the Model Context Protocol ecosystem.
Enables Claude and other MCP‑compatible AI agents to perform live, web‑wide research by calling the Perplexity Sonar API. The server exposes a perplexity_ask tool that accepts a standard message array and returns search‑augmented responses.
git clone git@github.com:ppl-ai/modelcontextprotocol.git
cd modelcontextprotocol/perplexity-ask && npm install
PERPLEXITY_API_KEY
in your environment.npx
:
{
"mcpServers": {
"perplexity-ask": {
"command": "npx",
"args": ["-y", "server-perplexity-ask"],
"env": { "PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE" }
}
}
}
Alternatively, you can build and run the Docker image:
docker build -t mcp/perplexity-ask:latest -f Dockerfile .
docker run -i --rm -e PERPLEXITY_API_KEY=$PERPLEXITY_API_KEY mcp/perplexity-ask
claude_desktop_config.json
or the corresponding MCP settings.index.ts
for custom search behavior.Q: Where do I get the API key?
A: Sign up at the Perplexity Sonar API page, generate a key in the developer dashboard, and set it as PERPLEXITY_API_KEY
.
Q: Can I customize the search parameters?
A: Yes. Edit the API call in index.ts
to modify temperature, top‑p, or other Perplexity options.
Q: Which command is preferred for running the server?
A: The npx
command (npx -y server-perplexity-ask
) is the most convenient, but Docker is also supported.
Q: What models can use this server? A: Any MCP‑compatible model (e.g., Claude Desktop) that can call MCP tools.
Q: How do I debug issues?
A: Consult the troubleshooting guide linked in the README or contact api@perplexity.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.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "perplexity-ask": { "command": "npx", "args": [ "-y", "server-perplexity-ask" ], "env": { "PERPLEXITY_API_KEY": "<YOUR_API_KEY>" } } } }
Discover more MCP servers with similar functionality and use cases
by exa-labs
Provides a Model Context Protocol server that enables AI assistants to perform real‑time web searches via the Exa AI Search API, with optional company research, LinkedIn lookup, and deep research workflows.
by brightdata
Provides real‑time web access, bypasses geo‑restrictions, handles bot detection, and offers browser automation for LLMs and AI agents via the Model Context Protocol.
by mamertofabian
mcp-everything-search is a cross-platform MCP server that provides fast and flexible file searching capabilities. It leverages native system tools to efficiently locate files and folders across Windows, macOS, and Linux.
by kagisearch
Provides web search and video summarization capabilities via the Model Context Protocol, integrating with Claude and other AI tools.
by apify
mcp-server-rag-web-browser is an MCP server for the RAG Web Browser Actor, enabling AI agents and LLMs to perform web searches and extract information from web pages.
by fatwang2
Provides web and news search, URL crawling, sitemap extraction, reasoning, and trending tools via Search1API, exposed as an MCP server for seamless integration with clients such as LibreChat, Claude Desktop, Cursor, and other MCP‑compatible tools.
by meilisearch
Enables LLMs to manage Meilisearch indexes, perform searches, and handle documents through natural‑language conversations via a Model Context Protocol server.
by ihor-sokoliuk
mcp-searxng is an MCP (Model Context Protocol) server that integrates with SearXNG to provide web search capabilities for AI models and applications.
by adityak74
mcp-scholarly is a MCP server designed to facilitate the search for accurate academic articles, initially supporting arXiv and with plans to integrate more scholarly vendors.