Skip to main content

MCP Server for the Perplexity API.

Project description

Perplexity MCP Server

smithery badge

MCP Server for the Perplexity API.

Perplexity Server MCP server

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

  • Streaming Responses with Progress Reporting: Provides a more interactive experience by streaming responses and reporting progress during long queries.
  • Simplified Tool Parameters: The ask_perplexity tool now only requires a query parameter, simplifying its usage.
  • 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.
  • Improved Error Handling and Robustness: Incorporates better error handling and more robust API interaction.
  • Longer Chat IDs Chat IDs are now longer.

Quickstart

Installation

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.
  • The "PERPLEXITY_MODEL": "sonar-pro" line is optional. If you omit it, the server will use the default Perplexity model.
  • 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-server-starter script to easily start the server.

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.1.2.tar.gz (18.7 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.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_perplexity-0.1.2.tar.gz
  • Upload date:
  • Size: 18.7 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.1.2.tar.gz
Algorithm Hash digest
SHA256 fd608924d9ccd091265a36b7a7aa71ce99ad388e996f26345a0b05190c8c66e6
MD5 c9120613de608a12b390b1e85aa9f3f7
BLAKE2b-256 ad8f64c868ecd0758debacc75ced9def000bd2d529e9431393fd473ec6a9ba53

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_perplexity-0.1.2.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.1.2-py3-none-any.whl.

File metadata

  • Download URL: mcp_perplexity-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e85798c9b9f6910793d1aa0c1e0496d5a0c5e009b131462d214d5bc08f815c
MD5 6210c8590581935380d31f371216279d
BLAKE2b-256 6779be80a4e421943bc5cfc581b401f17e8d7c54e24f7e1493d1e540e79f21e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_perplexity-0.1.2-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