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.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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…
Web search API and MCP server for developers building AI agents.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.