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 |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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…
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Web search API and MCP server for developers building AI agents.