Skip to main content

MCP Server for the Perplexity API.

Project description

Perplexity MCP Server

MCP Server for the Perplexity API.

smithery badge

PyPI Publish

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_MODEL environment variable for flexible model selection. You can also specify PERPLEXITY_MODEL_ASK and PERPLEXITY_MODEL_CHAT to use different models for the ask_perplexity and chat_perplexity tools, respectively. These will override PERPLEXITY_MODEL. You can check which models are available on the Perplexity documentation.
  • Persistent Chat History: The chat_perplexity tool 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

Installing via Smithery

To install Perplexity MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @daniel-lxs/mcp-perplexity --client claude

Prerequisites

How to install uvx on Windows: 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
  • The installation script will handle uvx setup
  • Your MCP client will manage package installation via the provided configuration

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": {
  "Perplexity": {
    "command": "uvx",
    "args": [
      "mcp-perplexity"
    ],
    "env": {
      "PERPLEXITY_API_KEY": "your-perplexity-api-key",
      "PERPLEXITY_MODEL": "sonar-pro"
    }
  }
}

Important notes:

  • Replace "your-perplexity-api-key" with your actual Perplexity API key.
  • You can also set PERPLEXITY_MODEL_ASK and PERPLEXITY_MODEL_CHAT to override PERPLEXITY_MODEL for the individual tools.
  • Consult your MCP client's documentation for details on where to place this configuration and any client-specific settings.
  • Use the mcp-starter script to easily add this MCP server to Cursor IDE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_perplexity-0.2.1.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_perplexity-0.2.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_perplexity-0.2.1.tar.gz.

File metadata

  • Download URL: mcp_perplexity-0.2.1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mcp_perplexity-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b29fdc446e43adb7ee75a9219724482e3e1ada1274575c2ebbf8701794796adf
MD5 7b1c9a0b62beabbc4f0b794573c1ac58
BLAKE2b-256 b31f971d0d0c7a46d242a219b3c4b4c4b4c8a709d637c5f22976eb2824682563

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_perplexity-0.2.1.tar.gz:

Publisher: pypi-publish.yml on daniel-lxs/mcp-perplexity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_perplexity-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mcp_perplexity-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mcp_perplexity-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f0baeb7fe90ef4c2d471e1979f04fe9d799732a83d7cd1fc066523119f98794
MD5 aa1e7c9cdbf32c36f4a419da40ac7b68
BLAKE2b-256 c905624961168f50b877d83fd2d7b27aab6f2d4e70a5726d8abfb1e5eaed29e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_perplexity-0.2.1-py3-none-any.whl:

Publisher: pypi-publish.yml on daniel-lxs/mcp-perplexity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page