Perplexity Chat is an MCP server that connects Model Context Protocol clients directly to the Perplexity API for web-augmented answers and persistent conversation management. Software developers, technical researchers, and automated coding assistants use this server to fetch live web search citations, debug programming code, and maintain context across long-running interactions. The server provides tools to handle one-off queries through ask_perplexity, which focuses on debugging and technical explanations, as well as multi-turn dialogues through chat_perplexity using persistent chat identifiers. It records conversations locally in an SQLite database without resending previous messages across API calls, and supports local inspection using read_chat_perplexity and list_chats_perplexity. Users can configure distinct Perplexity models such as sonar-pro for standalone queries and conversational tasks via environment variables. By streaming responses with progress reporting, the server prevents connection timeouts during complex web searches and multi-step technical inquiries. It also provides an optional built-in web interface for directly browsing and managing stored chat sessions on a local host.
Category: AI & LLM Tooling
Tags: conversational-ai, llm, perplexity, search
uvx package manager are installed. 2. Obtain an API key from Perplexity AI. 3. Add mcp-perplexity to your MCP client configuration file: json "mcpServers": { "mcp-perplexity": { "command": "uvx", "args": ["mcp-perplexity"], "env": { "PERPLEXITY_API_KEY": "your-api-key", "PERPLEXITY_MODEL": "sonar-pro", "DB_PATH": "chats.db" } } } 4. Replace "your-api-key" with your Perplexity API key. 5. Restart your MCP client to load the tools.Part of MCP Servers
Perplexity Chat connects your MCP client to the Perplexity API. It enables you to ask technical and programming questions, debug code with real-time web citations, run continuous multi-turn conversations tracked by chat identifiers, and review conversation logs stored locally in an SQLite database. It also includes an optional local web user interface for inspecting chats.
You install and run Perplexity Chat using uvx by adding it to your MCP client configuration under mcpServers. Specify uvx as the command and mcp-perplexity as the argument, and define your PERPLEXITY_API_KEY in the environment section. Alternatively, you can run it via the Smithery CLI or install it locally in editable mode using pip.
Perplexity Chat works with any Model Context Protocol compliant client that supports local stdio command execution, including Claude Desktop and Cursor. As long as the client can launch uvx or Python processes and supply the required environment variables, it can register and use the tools.
No, reading chat history does not make external calls to Perplexity. The read_chat_perplexity and list_chats_perplexity tools retrieve stored messages, roles, and timestamps directly from your local SQLite database file specified by DB_PATH, avoiding external API requests and preserving your API credits when reviewing previous conversation context.
Yes, Perplexity Chat is open-source software distributed under the MIT License. The project repository is hosted on GitHub, allowing developers to inspect the source code, contribute bug fixes or improvements, and build custom setups using Python and setuptools without licensing restrictions.