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 "Install 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 |
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ctosmsa/perplexity_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server