Perplexity MCP Server (Python)
Provides tools for web-grounded Q&A, deep multi-source research, and step-by-step reasoning using Perplexity's models and search capabilities.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Perplexity MCP Server (Python)research the latest breakthroughs in fusion energy from the past month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Perplexity MCP Server — Python Port
Python conversion of the official perplexityai/modelcontextprotocol Node.js/TypeScript server.
File mapping
TypeScript (original) | Python (this port) | Notes |
|
| Dataclasses replace TS interfaces |
|
| Pydantic models replace Zod schemas |
|
| Direct translation |
|
| Core MCP tools + API logic |
|
| STDIO entry point |
|
| HTTP entry point (FastAPI + uvicorn) |
Dependencies
Node.js | Python |
|
|
|
|
|
|
|
|
Node.js built-ins | Python stdlib ( |
Installation
pip install -e .Usage
STDIO (for Claude Desktop, Cursor, VS Code…)
export PERPLEXITY_API_KEY=your_key_here
python -m perplexity_mcp
# or after pip install:
perplexity-mcpClaude Desktop / Cursor mcpServers config:
{
"mcpServers": {
"perplexity": {
"command": "perplexity-mcp",
"env": { "PERPLEXITY_API_KEY": "your_key_here" }
}
}
}HTTP server
export PERPLEXITY_API_KEY=your_key_here
python -m perplexity_mcp.http_server
# or after pip install:
perplexity-mcp-httpThe server listens on http://0.0.0.0:8080/mcp by default.
Environment variables
Variable | Description | Default |
| Perplexity API key (required) | — |
| Custom API base URL |
|
| Request timeout in ms |
|
| Proxy URL | — |
| Fallback proxy env vars | — |
|
|
|
| HTTP server port |
|
| HTTP bind address |
|
| CORS origins (comma-separated) |
|
Available tools
Tool | Model | Description |
|
| Quick Q&A with web grounding |
|
| Deep multi-source research (30s+) |
|
| Step-by-step reasoning + web |
| Search API | Raw ranked URL results |
Related MCP Connectors
Real-time web search, reasoning, and research through Perplexity's API
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.