Perplexity Chat MCP Server logo

Perplexity Chat MCP Server

by daniel-lxs

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's designed for integration with development environments, allowing models to interact with Perplexity Chat.

View on GitHub

Last updated: N/A

What is Perplexity Chat MCP Server?

The Perplexity MCP Server is a Python-based interface to the Perplexity API that allows you to query responses, maintain chat history, and manage conversations with Perplexity AI. It mimics user interaction with Perplexity Chat, enabling models to ask questions and continue conversations.

How to use Perplexity Chat MCP Server?

To use the MCP server, configure your client with the provided settings, including the Perplexity API key, model, and database path. You can then use the provided tools (ask_perplexity, chat_perplexity, list_chats_perplexity, read_chat_perplexity) to interact with the Perplexity API. The server can be run using uvx mcp-perplexity after configuring the environment variables.

Key features of Perplexity Chat MCP Server

  • Model Configuration via Environment Variable

  • Persistent Chat History

  • Streaming Responses with Progress Reporting

  • Web UI for chat management

Use cases of Perplexity Chat MCP Server

  • Expert programming assistance

  • Ongoing conversations with AI

  • Debugging and research

  • Chat history management

FAQ from Perplexity Chat MCP Server

What is the purpose of the ask_perplexity tool?

The ask_perplexity tool is used for specific questions and doesn't maintain a chat history. Every request is treated as a new chat.

How does the chat_perplexity tool work?

The chat_perplexity tool maintains ongoing conversations and stores the chat history. It returns a chat ID for future continuation of the conversation.

What does the list_chats_perplexity tool do?

The list_chats_perplexity tool lists all available chat conversations, showing the chat ID, title, and creation time in a paginated format.

Does the read_chat_perplexity tool make API calls?

No, the read_chat_perplexity tool only reads from the local database and retrieves the complete conversation history for a given chat ID without making any API calls to Perplexity.

How do I enable the web UI?

Set the WEB_UI_ENABLED environment variable to true. The web UI will then be available at http://WEB_UI_HOST:WEB_UI_PORT (default: http://127.0.0.1:8050).