Perplexity Chat MCP Server

Provides a Python interface to the Perplexity API for querying responses and managing conversations.

Local serverstdioPython★ 66

What is the Perplexity Chat MCP Server?

Provides a Python interface to the Perplexity API for querying responses and managing conversations.

What you get

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.

  • Model Configuration via Environment Variable: — Allows you to specify the Perplexity model using the PERPLEXITY_MODEL environment variable for flexible model selection
  • 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

Configuration and credentials

Before using this MCP server, ensure you have: - Python 3.10 or higher - uvx package manager installed Note: Installation instructions for uvx are available here.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
ask_perplexityRequest expert programming assistance through Perplexity. Focuses on coding solutions, error debugging, and technical explanations. Returns responses with source citations and alternative suggestions.
chat_perplexityMaintains ongoing conversations with Perplexity AI. Creates new chats or continues existing ones with full history context. Returns chat ID for future continuation.
list_chats_perplexityLists 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 pa
read_chat_perplexityRetrieves 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.

How to install the Perplexity Chat MCP Server

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

Maintainer configuration example. Replace example paths and credential placeholders before connecting.

Configuration

Before using this MCP server, ensure you have: - Python 3.10 or higher - uvx package manager installed Note: Installation instructions for uvx are available here.

VariableDescriptionRequired
PERPLEXITY_API_KEYCredential the server authenticates with.Yes
PERPLEXITY_MODELConfiguration value read at startup.Optional
DB_PATHFilesystem location the server is allowed to use.Optional
WEB_UI_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • “Use Perplexity Chat to ask perplexity.”
  • “Use Perplexity Chat to chat perplexity.”
  • “Use Perplexity Chat to list chats perplexity.”

Frequently asked questions

It's a Python interface to the Perplexity API, offering tools for querying responses, maintaining chat history, and managing conversations with Perplexity AI. It allows you to integrate Perplexity's capabilities into your Python applications.