MCP Server for the Perplexity API.
Reason this release was yanked:
Failing to run with uvc
Project description
Perplexity MCP Server
MCP Server for the Perplexity API.
Components
Tools
- ask_perplexity: Request expert programming assistance through Perplexity. Focuses on coding solutions, error debugging, and technical explanations. Returns responses with source citations and alternative suggestions.
- chat_perplexity: Maintains ongoing conversations with Perplexity AI. Creates new chats or continues existing ones with full history context. Returns chat ID for future continuation.
Key Features
-
Model Configuration via Environment Variable: Allows you to specify the Perplexity model using the
PERPLEXITY_MODELenvironment variable for flexible model selection.You can also specify
PERPLEXITY_MODEL_ASKandPERPLEXITY_MODEL_CHATto use different models for theask_perplexityandchat_perplexitytools, respectively.These will override
PERPLEXITY_MODEL. You can check which models are available on the Perplexity documentation. -
Persistent Chat History: The
chat_perplexitytool maintains ongoing conversations with Perplexity AI. Creates new chats or continues existing ones with full history context. Returns chat ID for future continuation. -
Streaming Responses with Progress Reporting: Uses progress reporting to prevent timeouts on slow responses.
Quickstart
Installation
Prerequisites
- Python 3.10+
- uvx (recommended)
Installing uvx
Windows Installation
Open PowerShell as Administrator and run:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Windows Installation Notes:
- Ensure Python 3.10+ is installed and added to PATH
Unix Installation (Linux/MacOS)
Run the following command in your terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh
Unix Installation Notes:
- The script will install uvx to ~/.cargo/bin by default
- You may need to restart your terminal session after installation
Configure your MCP Client
To use this MCP server, you need to configure your MCP client to connect to it. The configuration method will vary depending on your specific client.
Below is an example configuration in JSON format:
"mcpServers": {
"mcp-perplexity": {
"command": "uvx",
"args": [
"mcp-perplexity"
],
"env": {
"PERPLEXITY_API_KEY": "your-perplexity-api-key",
"PERPLEXITY_MODEL": "sonar-pro",
"PERPLEXITY_MODEL_ASK": "sonar-pro",
"PERPLEXITY_MODEL_CHAT": "sonar-reasoning-pro",
"DB_PATH": "path/to/custom.db"
}
}
}
Important notes:
- Replace
"your-perplexity-api-key"with your actual Perplexity API key - Environment variables configuration:
PERPLEXITY_MODEL: Default model for both toolsPERPLEXITY_MODEL_ASK: Overrides default model forask_perplexitytoolPERPLEXITY_MODEL_CHAT: Overrides default model forchat_perplexitytoolDB_PATH: Custom path for SQLite chat history database (default: chats.db)
- Consult the Perplexity model docs for available models
- Use the mcp-starter script to easily add this MCP server to Cursor IDE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_perplexity-0.3.0.tar.gz.
File metadata
- Download URL: mcp_perplexity-0.3.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c548b41dc93695d2e99f7c7ba118eb0da37498b53a78bc75818c2b7287e74a3f
|
|
| MD5 |
cb173756adb509b76acb268022b3bacf
|
|
| BLAKE2b-256 |
23083eb09db1ac9513cf75848c1467bcc282b4e5c6e89f9beb8642a4cf0536d6
|
Provenance
The following attestation bundles were made for mcp_perplexity-0.3.0.tar.gz:
Publisher:
pypi-publish.yml on daniel-lxs/mcp-perplexity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_perplexity-0.3.0.tar.gz -
Subject digest:
c548b41dc93695d2e99f7c7ba118eb0da37498b53a78bc75818c2b7287e74a3f - Sigstore transparency entry: 170071770
- Sigstore integration time:
-
Permalink:
daniel-lxs/mcp-perplexity@90173bf4a1e5ffa887fc0002c8a7837e20eda758 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniel-lxs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@90173bf4a1e5ffa887fc0002c8a7837e20eda758 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mcp_perplexity-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mcp_perplexity-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d468acf282a78544ba9a1da6e579de9bdf6859c22f216cc53f98d4ade2692a9
|
|
| MD5 |
0036bff45e22c9f5389f24ee4fea1733
|
|
| BLAKE2b-256 |
ea99c53744d92a4dc2e26deccf971eb8dad1e5fdd25d4d097f63ff086dfa4912
|
Provenance
The following attestation bundles were made for mcp_perplexity-0.3.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on daniel-lxs/mcp-perplexity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_perplexity-0.3.0-py3-none-any.whl -
Subject digest:
8d468acf282a78544ba9a1da6e579de9bdf6859c22f216cc53f98d4ade2692a9 - Sigstore transparency entry: 170071772
- Sigstore integration time:
-
Permalink:
daniel-lxs/mcp-perplexity@90173bf4a1e5ffa887fc0002c8a7837e20eda758 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/daniel-lxs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@90173bf4a1e5ffa887fc0002c8a7837e20eda758 -
Trigger Event:
workflow_dispatch
-
Statement type: