- Home
- MCP servers
- Perplexity
Perplexity
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"windsornguyen-sonar": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PERPLEXITY_API_KEY",
"mcp/perplexity-ask"
],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You deploy a focused MCP server that integrates the Sonar API to enable real-time, web-wide research within Claude. This server exposes a dedicated tool that you can enable in your MCP client to perform live searches and fetch up-to-date information during conversations.
How to use
You connect to the perplexity_ask MCP server from your MCP client to perform live web searches via the Sonar API. After starting the server, you will see a tool named perplexity_ask available in Claude. Use this tool to send a sequence of messages that represents your conversation with the Sonar API, including system prompts, user queries, and assistant responses.
Basic usage pattern in your conversations:
- Open Claude and enable the perplexity_ask tool in your MCP client.
- Initiate a chat and structure your messages as an array of messages with roles such as system, user, and assistant.
- Provide the content you want researched in the user messages; the tool will query the Sonar API for live results and return them in the conversation.
- Refine searches by including follow-up messages and clarifying questions based on initial results.
How to install
Prerequisites you need before starting include Node.js/npm (for NPX workflows) or Docker (for container-based runs). Ensure you have a compatible runtime and your environment is ready to run either method described below.
Choose a connection method and follow the steps for that method. You will set your API key in the environment to authorize Sonar access.
Method A: Docker run (recommended if you want an isolated container per tool)
{
"mcpServers": {
"perplexity_dock": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PERPLEXITY_API_KEY",
"mcp/perplexity-ask"
],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Method B: NPX run (no Docker required)
{
"mcpServers": {
"perplexity_npx": {
"command": "npx",
"args": [
"-y",
"server-perplexity-ask"
],
"env": {
"PERPLEXITY_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
Run and test the integration
After you configure either Docker or NPX, start Claude Desktop and load the MCP configuration you created. Open Claude, locate the perplexity_ask tool, and verify it appears as an available tool alongside other MCP tools.
Test by initiating a chat and asking for live research. If the tool returns results and you can use them in the conversation, the integration is active and ready for practical use.
Advanced parameters
The search parameters used by the underlying API can be adjusted in the source where the API call is defined. If you need more control, modify those parameters directly in the API call to tailor relevance, freshness, or scope of the results.
Troubleshooting
If you encounter issues, verify that your PERPLEXITY_API_KEY environment variable is set correctly in the server configuration and that the key is active. Check that the server process starts without errors and that Claude detects the perplexity_ask tool among its available MCP tools. If problems persist, reach out to support with details of your environment, logs, and the exact steps you took.
Notes
You can run multiple MCP servers in parallel if you want to separate tools or experiments. Each server can be started using its own runtime (Docker or NPX) and its own environment configuration.
Cursor integration
This MCP server can also be used with Cursor or other applications that support MCP by adding the server configuration to their MCP directory or global MCP settings. After adding the configuration, you will see perplexity_ask listed as an available tool in your application.
License
This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.
Available tools
perplexity_ask
Engage in a conversation with the Sonar API for live web searches. Accepts a messages array with system, user, and assistant roles to drive real-time research results.