Perplexity

by daniel-lxs

49 stars
31.1k downloads
Not rated
GitHub

About

Integrates with Perplexity API to provide expert programming assistance and persistent chat capabilities for developers and teams.

Details

Author
daniel-lxs
Repository
daniel-lxs/mcp-perplexity
GitHub stars
49
Downloads
31,093
License
MIT License
Categories
Productivity, Developer Tools, Design, Workplace, AI, Community, Communication, API
Tags
#integration

- 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.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Perplexity
    Command (node, npx, python, etc.) uvx
    Arguments
    • Argument 1 mcp-perplexity
    Environment
    • DB_PATH chats.db
    • PERPLEXITY_MODEL sonar-pro
    • PERPLEXITY_API_KEY your-api-key

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure your MCP client with the command uvx mcp-perplexity and set the required environment variable PERPLEXITY_API_KEY. Optionally set PERPLEXITY_MODEL, DB_PATH, and other variables. You can also use Smithery CLI: npx -y @smithery/cli@latest run @daniel-lxs/mcp-perplexity --config "{\"perplexityApiKey\":\"pplx-abc\",\"perplexityModel\":\"sonar-pro\"}".

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.

list_chats_perplexity

Lists all available chat conversations with Perplexity AI. Returns chat IDs, titles, and creation dates (displayed in relative time format, e.g., '5 minutes ago', '2 days ago'). Results are paginated with 50 chats per page.

read_chat_perplexity

Retrieves the complete conversation history for a specific chat. Returns the full chat history with all messages and their timestamps. No API calls are made to Perplexity - this only reads from local storage.

- 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.
- list_chats_perplexity: Lists all available chat conversations with Perplexity AI. Returns chat IDs, titles, and creation dates (displayed in relative time format, e.g., "5 minutes ago", "2 days ago"). Results are paginated with 50 chats per page.
- read_chat_perplexity: Retrieves the complete conversation history for a specific chat. Returns the full chat history with all messages and their timestamps. No API calls are made to Perplexity - this only reads from local storage.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "perplexity": {
            "env": {
                "DB_PATH": "chats.db",
                "PERPLEXITY_MODEL": "sonar-pro",
                "PERPLEXITY_API_KEY": "your-api-key"
            },
            "args": [
                "mcp-perplexity"
            ],
            "command": "uvx"
        }
    }
}

Linux

{
    "env": {
        "DB_PATH": "chats.db",
        "PERPLEXITY_MODEL": "sonar-pro",
        "PERPLEXITY_API_KEY": "your-api-key"
    },
    "args": [
        "mcp-perplexity"
    ],
    "command": "uvx"
}

Macos

{
    "env": {
        "DB_PATH": "chats.db",
        "PERPLEXITY_MODEL": "sonar-pro",
        "PERPLEXITY_API_KEY": "your-api-key"
    },
    "args": [
        "mcp-perplexity"
    ],
    "command": "uvx"
}

Windows

{
    "env": {
        "DB_PATH": "chats.db",
        "PERPLEXITY_MODEL": "sonar-pro",
        "PERPLEXITY_API_KEY": "your-api-key"
    },
    "args": [
        "mcp-perplexity"
    ],
    "command": "uvx"
}

Perplexity Chat MCP Server

The Perplexity MCP Server provides a Python-based interface to the Perplexity API, offering tools for querying responses, maintaining chat history, and managing conversations. It supports model configuration via environment variables and stores chat data locally. Built with Python and setuptools, it's designed for integration with development environments.

The MCP Server is desined to mimick how users interact with the Perplexity Chat on their browser by allowing your models to ask questions, continue conversations, and list all your chats.

smithery badge Release and Publish

<a href="https://glama.ai/mcp/servers/0nggjl0ohi">

</a>

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.
- list_chats_perplexity: Lists all available chat conversations with Perplexity AI. Returns chat IDs, titles, and creation dates (displayed in relative time format, e.g., "5 minutes ago", "2 days ago"). Results are paginated with 50 chats per page.
- read_chat_perplexity: Retrieves the complete conversation history for a specific chat. Returns the full chat history with all messages and their timestamps. No API calls are made to Perplexity - this only reads from local storage.

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

Prerequisites

Before using this MCP server, ensure you have:

- Python 3.10 or higher
- uvx package manager installed

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.