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:
- Install dependencies:
- Create a
.env
file with your API key: - Test the server:
Option 2: Install Globally
- Clone and navigate to the repository as above
- Install globally:
- Now you can run the server from anywhere:
Claude Desktop Configuration
Add this configuration to your claude_desktop_config.json
file:
Standard Configuration
Global Installation Configuration
NVM Users
If you're using Node Version Manager (NVM), you need absolute paths:
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.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A custom Model Context Protocol implementation that integrates Perplexity AI with Claude Desktop, allowing users to access Perplexity's AI models for both single questions and multi-turn conversations.
Related MCP Servers
- AsecurityFlicenseAqualityProvides a standardized way to integrate Perplexity AI's features like chat, search, and documentation access into MCP-based systems.Last updated -5JavaScript
- AsecurityFlicenseAqualityA Node.js implementation that enables Claude to interact with Perplexity AI's language models through Anthropic's Model Context Protocol, providing tools for advanced chat completions and quick queries.Last updated -26TypeScript
- -securityAlicense-qualityProvides access to Perplexity AI models through two tools: ask\_perplexity for expert programming assistance and chat\_perplexity for maintaining ongoing conversations with context preservation.Last updated -PythonMIT License
- -security-license-qualityInterfaces with the Perplexity AI API to provide advanced question answering capabilities through the standardized Model Context Protocol, supporting multiple Perplexity models.Last updated -JavaScript