Perplexity Ask MCP Server
by james-pplx
A Model Context Protocol Server connector for Perplexity API, to enable web search without leaving the MCP ecosystem.
What is Perplexity Ask MCP Server
Perplexity Ask MCP Server
An MCP server implementation that integrates the Sonar API to provide Claude with unparalleled real-time, web-wide research.
Tools
- perplexity_ask
- Engage in a conversation with the Sonar API for live web searches.
- Inputs:
messages
(array): An array of conversation messages.- Each message must include:
role
(string): The role of the message (e.g.,system
,user
,assistant
).content
(string): The content of the message.
- Each message must include:
Configuration
Step 1:
Clone this repository:
git clone [email protected]:ppl-ai/modelcontextprotocol.git
Navigate to the perplexity-ask
directory and install the necessary dependencies:
cd modelcontextprotocol/perplexity-ask && npm install
Step 2: Get a Sonar API Key
- Sign up for a Sonar API account.
- Follow the account setup instructions and generate your API key from the developer dashboard.
- Set the API key in your environment as
PERPLEXITY_API_KEY
.
Step 3: Configure Claude Desktop
-
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"
}
}
}
}
NPX
{
"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
Step 4: Build the Docker Image
Docker build:
docker build -t mcp/perplexity-ask:latest -f Dockerfile .
Step 5: Testing
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.
Step 6: Advanced parameters
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.
Troubleshooting
The Claude documentation provides an excellent troubleshooting guide you can refer to. However, you can still reach out to us at [email protected] for any additional support or file a bug.
License
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.
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
21st.dev Magic AI Agent
It's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
Requirements:
A Model Context Protocol Server for connecting with Adfin APIs
AgentQL MCP Server
Model Context Protocol server that integrates AgentQL's data extraction capabilities.
AgentRPC
A universal RPC layer for AI agents. Connect to any function, any language, any framework, in minutes.
Aiven MCP Server
Model Context Protocol server for Aiven
IoTDB MCP Server
Apache IoTDB MCP Server
Apify Model Context Protocol (MCP) Server
Model Context Protocol (MCP) Server for Apify's Actors
APIMatic Validator MCP Server
APIMatic Validator MCP Server for validating OpenAPI specs via APIMatic's API with MCP
๐ Audiense Insights MCP Server
Audiense Insights MCP Server is a server based on the Model Context Protocol (MCP) that allows Claude and other MCP-compatible clients to interact with your Audiense Insights account
Bankless Onchain MCP Server
Bringing the bankless onchain API to MCP
Submit Your MCP Server
Share your MCP server with the community
Submit Now