Perplexity MCP Server
Adds Perplexity AI as a tool provider for Claude Desktop.
Perplexity MCP Server
A custom Model Context Protocol (MCP) implementation that adds Perplexity AI as a tool provider for Claude Desktop.
Features
- Seamless integration with Claude Desktop through MCP
- Access to Perplexity's powerful AI models
- Support for both single questions and multi-turn conversations
- Customizable model selection
Installation
Prerequisites
- Node.js (v16 or higher)
- Claude Desktop (latest version)
- Perplexity API key
Option 1: Clone and Run Locally
-
Clone this repository:
git clone https://github.com/Family-IT-Guy/perplexity-mcp.git cd perplexity-mcp
-
Install dependencies:
npm install
-
Create a
.env
file with your API key:PERPLEXITY_API_KEY=your_api_key_here
-
Test the server:
node server.js
Option 2: Install Globally
-
Clone and navigate to the repository as above
-
Install globally:
npm install -g .
-
Now you can run the server from anywhere:
perplexity-mcp
Claude Desktop Configuration
Add this configuration to your claude_desktop_config.json
file:
Standard Configuration
{
"mcpServers": {
"perplexity": {
"command": "node",
"args": [
"/absolute/path/to/perplexity-mcp/server.js"
],
"env": {
"PERPLEXITY_API_KEY": "your_perplexity_api_key"
}
}
}
}
Global Installation Configuration
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": [
"perplexity-mcp"
],
"env": {
"PERPLEXITY_API_KEY": "your_perplexity_api_key"
}
}
}
}
NVM Users
If you're using Node Version Manager (NVM), you need absolute paths:
{
"mcpServers": {
"perplexity": {
"command": "/Users/username/.nvm/versions/node/v16.x.x/bin/node",
"args": [
"/Users/username/path/to/perplexity-mcp/server.js"
],
"env": {
"PERPLEXITY_API_KEY": "your_perplexity_api_key"
}
}
}
}
Available Tools
Once configured, Claude will have access to these tools:
-
perplexity_ask - Send a single question to Perplexity
- Parameters:
query
(required): The question to askmodel
(optional): Model name (default:llama-3.1-sonar-small-128k-online
)
- Parameters:
-
perplexity_chat - Have a multi-turn conversation
- Parameters:
messages
(required): Array of conversation messagesmodel
(optional): Model name (default:mixtral-8x7b-instruct
)
- Parameters:
Troubleshooting
- Check logs:
cat ~/.claude/logs/perplexity.log
- Ensure your API key is valid
- Verify your claude_desktop_config.json format
- Enable verbose logging by adding
"DEBUG": "1"
to the env section
How It Works
This implementation uses the Model Context Protocol (MCP) created by Anthropic to extend Claude Desktop's capabilities. It:
- Creates an MCP server that communicates with Claude via stdio
- Registers Perplexity tools with Claude
- Proxies requests from Claude to the Perplexity API
- Returns responses back to Claude for display
License
This project is licensed under the ISC License - see the LICENSE file for details.
Related Servers
Brave Search
A server for Brave Search, enabling web search capabilities via its API.
Exa
Exa AI Search API
Google Maps MCP Server
Integrates Google Maps for route planning, traffic analysis, and cost estimation.
NCBI Literature Search
Search NCBI databases, including PubMed, for scientific literature. Tailored for researchers in life sciences, evolutionary biology, and computational biology.
Hermes Search
Provides full-text and semantic search over structured and unstructured data using Azure Cognitive Search.
MCP RAG
A managed Retrieval-Augmented Generation (RAG) server using MCP, integrated with knowledge bases and OpenSearch.
CryptoPanic News
Provides the latest cryptocurrency news to AI agents, powered by the CryptoPanic API.
Finviz MCP Server
Provides stock screening and fundamental analysis using Finviz data. Requires a Finviz Elite subscription.
Semantic Scholar
Search for academic papers, authors, and citations using the Semantic Scholar API.
Tavily Search
AI-powered web search using the Tavily Search API.