Perplexity Reasoning MCP Server
A Model Context Protocol (MCP) server that provides reasoning with deepseek R1, web search and citations functionality using Perplexity AI's API. Works with the Anthropic Claude desktop and compatible MCP clients.
Forked from jsonallen/perplexity-mcp and improved in several ways:
- Deepseek R1, Sonar and Sonar Pro Models
- You can change the model in the MCP client configuration file
- Increased the max output tokens to 8K
- Recency filter adjusted to be included only when the user specifies
- Citation URLs included in the output
Installation
Prerequisites
-
Python 3.11 or higher - Install from python.org or your system's package manager
- Windows users: Make sure to check "Add Python to PATH" during installation
- Linux/macOS users: Most systems come with Python, but you may need to install Python 3.11+
-
UV package manager (requires Python to be installed first):
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
User Installation (PyPI)
For users who want to use the MCP server:
uv pip install perplexity-mcp-server
Developer Installation (Local)
For developers who want to modify the server:
# Clone the repository
git clone https://github.com/felores/perplexity-mcp-server.git
cd perplexity-mcp-server
# Create and activate virtual environment
uv venv .venv
.\.venv\Scripts\activate # Windows
source .venv/bin/activate # Unix
# Install in development mode
uv pip install -e .
Configuration
Claude Desktop Setup
-
Get your API key from Perplexity AI
-
Edit Claude's config file:
- Windows:
%APPDATA%/Claude/claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
For Users (PyPI Installation)
{
"perplexity-reasoning": {
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here",
"PERPLEXITY_MODEL": "sonar-reasoning"
},
"command": "uv",
"args": ["run", "perplexity-mcp-server"]
}
}
For Developers (Local Installation)
{
"perplexity-reasoning": {
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here",
"PERPLEXITY_MODEL": "sonar-reasoning",
"PYTHONPATH": "path/to/your/project/src"
},
"command": "python",
"args": ["path/to/your/project/src/perplexity_mcp/run.py"]
}
}
Available Models
sonar: Standard model (127k context)sonar-pro: Advanced model (200k context)sonar-reasoning: Chain of Thought model (127k context)
If no model is specified, defaults to sonar.
Usage
- Open Claude desktop client
- Try a prompt like: "Search the web for recent news about AI"
- Click "Allow for this chat" when prompted
Development
For development instructions, see DEVELOPMENT.md
Metadata
Release files for perplexity-mcp-server 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| perplexity_mcp_server-0.2.3.tar.gz | 138.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| perplexity_mcp_server-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 146.5 kB
Release files / perplexity_mcp_server-0.2.3.tar.gz
| Download URL | perplexity_mcp_server-0.2.3.tar.gz |
|---|---|
| Size | 138.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28f69129d43204ea3ca1fe7e9f5c6e4076f3e24ff3054d5efd77e942410cd708
|
|
BLAKE2b-256 checksum How to use checksums |
695a3fb5c4a08b7d67f5b3b92ecd40aab20f9537a048f513cace7799187f0c56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / perplexity_mcp_server-0.2.3-py3-none-any.whl
| Download URL | perplexity_mcp_server-0.2.3-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64180883ff17712631420eadafa4c77f7a16bab3c00f63407a3d400d084232e4
|
|
BLAKE2b-256 checksum How to use checksums |
061aa9eb19fe64ef6a9a034a224a57d92aa165364bfab1976a0986053bcc1a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for perplexity-mcp-server 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.