Perplexity MCP Server

Provides access to the Perplexity AI API via the MCP protocol, offering coding assistance and conversational AI.

Local serverstdioPython

What is the Perplexity MCP server?

Perplexity MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Provides access to the Perplexity AI API via the MCP protocol, offering coding assistance and conversational AI.

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

What the assistant can call

Once Perplexity is connected, these are the calls the assistant has available:

  • ask_perplexity — Request expert programming assistance through Perplexity. Focuses on coding solutions, error debugging, and technical explanations. Returns responses
  • chat_perplexity — Maintains ongoing conversations with Perplexity AI. Creates new chats or continues existing ones with full history context. Returns chat ID for
  • 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
  • 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
  • Tools — The Tools tool exposed by this server
  • Prerequisites — Note: Installation instructions for uvx are available here
  • Features — The Features tool exposed by this server
  • Screenshots — The Screenshots tool exposed by this server

Setting it up

The server ships on npm as @smithery/cli, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Configuration and credentials

You will need 4 environment variables: PERPLEXITY_API_KEY, PERPLEXITY_MODEL, DB_PATH, WEB_UI_HOST. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

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.

Choosing this one

Plenty of file and storage access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Perplexity's toolset — ask_perplexity, chat_perplexity, list_chats_perplexity and 5 more — is a fair guide to whether it matches your workflow. It is maintained by sengokudaikon; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the perplexity mcp server does with a few real requests.

Available tools

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.
ToolsThe Tools tool exposed by this server.
PrerequisitesNote: Installation instructions for uvx are available [here](https://docs.astral.sh/uv/#installation).
FeaturesThe Features tool exposed by this server.
ScreenshotsThe Screenshots tool exposed by this server.

How to install the Perplexity 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"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

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 to ask perplexity.
  • Use Perplexity to chat perplexity.
  • Use Perplexity to list chats perplexity.

Frequently asked questions

The server offers `ask_perplexity` for expert coding assistance and `chat_perplexity` for persistent conversational AI, allowing for continuous discussions with full context.