by perplexityai
Enables Claude and other MCP‑compatible applications to perform real‑time web searches through the Perplexity (Sonar) API without leaving the MCP ecosystem.
Perplexity Ask provides an MCP server that bridges Claude, Cursor, and any MCP‑enabled client to the Perplexity Sonar API, allowing live, web‑wide research directly from the AI assistant.
git clone git@github.com:ppl-ai/modelcontextprotocol.git
cd modelcontextprotocol/perplexity-ask && npm install
PERPLEXITY_API_KEY in your environment.npx -y server-perplexity-ask
or use the provided 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 as shown in the README.perplexity_ask that accepts an array of messages with role and content fields.index.ts.PERPLEXITY_API_KEY.npx -y server-perplexity-ask) is the preferred method.index.ts according to the Perplexity API documentation.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>"
}
}
}
}claude mcp add perplexity-ask npx -y server-perplexity-askExplore related MCPs that share similar capabilities and solve comparable challenges
by exa-labs
Provides real-time web search capabilities to AI assistants via a Model Context Protocol server, enabling safe and controlled access to the Exa AI Search API.
by MicrosoftDocs
Provides semantic search and fetch capabilities for Microsoft official documentation, returning content in markdown format via a lightweight streamable HTTP transport for AI agents and development tools.
by elastic
Enables natural‑language interaction with Elasticsearch indices via the Model Context Protocol, exposing tools for listing indices, fetching mappings, performing searches, running ES|QL queries, and retrieving shard information.
by graphlit
Enables integration between MCP clients and the Graphlit platform, providing ingestion, extraction, retrieval, and RAG capabilities across a wide range of data sources and connectors.
by mamertofabian
Fast cross‑platform file searching leveraging the Everything SDK on Windows, Spotlight on macOS, and locate/plocate on Linux.
by cr7258
Provides Elasticsearch and OpenSearch interaction via Model Context Protocol, enabling document search, index management, cluster monitoring, and alias operations.
by kagisearch
Provides web search and video summarization capabilities through the Model Context Protocol, enabling AI assistants like Claude to perform queries and summarizations.
by liuyoshio
Provides natural‑language search and recommendation for Model Context Protocol servers, delivering rich metadata and real‑time updates.
by ihor-sokoliuk
Provides web search capabilities via the SearXNG API, exposing them through an MCP server for seamless integration with AI agents and tools.