Perplexity MCP Server
Provides tools to perform web searches and deep research using Perplexity's Sonar models, returning answers with citations and search results.
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 summarize the latest space exploration news"
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 MCP server that exposes Perplexity Sonar Chat Completions to any MCP client (Cursor, Claude Desktop, custom agents).
Tools
Tool | Default model | Purpose |
|
| General web search |
|
| Comprehensive synthesis |
Both tools accept optional Sonar parameters and return JSON:
{
"answer": "...",
"citations": ["https://..."],
"search_results": [],
"model": "sonar-pro",
"usage": {}
}Optional parameters
Parameter | Values / format | When to use |
|
| Lower = more focused; raise only for more varied phrasing |
|
| Cap answer length; omit for API default |
|
| News / “latest” questions; omit for evergreen topics |
|
| Absolute start of publication window |
|
| Absolute end of publication window |
| up to 20 domains; allowlist or | Trusted sources only, or exclude noisy sites |
|
| Papers ( |
|
| Override tool default only when you need a different speed/depth tradeoff |
Prefer date filters over search_recency_filter when the window is known exactly. Queries are capped at 4,000 characters. The API key is never logged or returned in tool output.
Related MCP server: perplexity-mcp
Setup
Copy env template and add your Perplexity API key:
cp .env.example .envInstall with uv:
uv syncRun locally (stdio)
uv run mcp-perplexityCursor / Claude Desktop
Add to your MCP config (adjust the project path):
{
"mcpServers": {
"perplexity": {
"command": "uv",
"args": ["--directory", "C:/Users/KozakJ/git/mcp_perplexity", "run", "mcp-perplexity"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-api-key-here"
}
}
}
}Or rely on a .env file in the project directory (PERPLEXITY_API_KEY=...).
Cursor / Claude Desktop (container, stdio)
Rebuild after image changes, then only the API key is required — other settings use the same defaults as local runs:
{
"mcpServers": {
"perplexity": {
"command": "podman",
"args": [
"run", "-i", "--rm",
"-e", "PERPLEXITY_API_KEY",
"mcp-perplexity"
],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-api-key-here"
}
}
}
}Override any setting the same way (-e MCP_PORT, etc.) only when you need non-defaults.
Run with Podman (streamable HTTP)
podman compose needs a compose provider (podman-compose or Docker Compose). On a plain Podman install, use build + run:
podman build -t mcp-perplexity .
podman run --rm -p 8000:8000 --env-file .env ^
-e MCP_TRANSPORT=streamable-http ^
-e MCP_HOST=0.0.0.0 ^
-e MCP_PORT=8000 ^
--name mcp-perplexity mcp-perplexity(On bash/zsh, replace ^ with \.)
If you have a compose provider installed (pip install podman-compose, or Docker Compose):
podman compose up --buildEndpoint: http://localhost:8000/mcp (Streamable HTTP). Bind to trusted networks only — this image does not add HTTP auth.
Configuration
Variable | Default | Description |
| (required) | Perplexity API key |
|
|
|
|
| HTTP bind host |
|
| HTTP bind port |
|
| Soft client-side requests/minute limit |
|
| Max concurrent API calls |
|
| Search timeout (seconds) |
|
| Deep research timeout (seconds) |
|
| Retries on 429/5xx and transport errors |
Retries use exponential backoff (honors Retry-After when present). Logging goes to stderr only so stdio JSON-RPC stays clean.
Available Tools
2 toolsperplexity_deep_researchA
Comprehensive synthesis via Perplexity Sonar Deep Research.
Returns JSON with answer, citations, and optional search_results/usage.
Uses a longer timeout suitable for exhaustive research.
When to use optional filters:
- search_recency_filter: current events / "latest" questions (hour|day|week|month|year).
- search_after/before_date_filter: absolute windows as MM/DD/YYYY; prefer over recency when exact.
- search_domain_filter: trusted sources (allowlist) or exclude noise (denylist with '-'); one mode only.
- search_mode: 'academic' for papers, 'sec' for SEC filings; omit for general web.
- Leave filters unset for broad evergreen queries.
Inputs: query (required), model, max_tokens, search_mode, +5 more. Returns: object
perplexity_searchA
General web search via Perplexity Sonar (default model: sonar-pro).
Returns JSON with answer, citations, and optional search_results/usage.
When to use optional filters:
- search_recency_filter: current events / "latest" questions (hour|day|week|month|year).
- search_after/before_date_filter: absolute windows as MM/DD/YYYY; prefer over recency when exact.
- search_domain_filter: trusted sources (allowlist) or exclude noise (denylist with '-'); one mode only.
- search_mode: 'academic' for papers, 'sec' for SEC filings; omit for general web.
- Leave filters unset for broad evergreen queries.
Inputs: query (required), model, max_tokens, search_mode, +5 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Both tools target web search via Perplexity with nearly identical descriptions, differing only in timeout and 'deep research' label. An agent may struggle to choose between them without clear use-case differentiation.
Both tool names follow a consistent pattern: 'perplexity_search' and 'perplexity_deep_research' use the same prefix and verb_noun structure, making them clearly identifiable.
With only 2 tools, the set is minimal but arguably covers the server's purpose (search and deep research). However, the overlap reduces the value of having two separate tools.
The set only provides two search variants, lacking any additional functionalities like result filtering, history, or configuration. Important search UX features are missing, making the surface incomplete for a comprehensive search server.
Maintenance
Related MCP Connectors
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Real-time web search, reasoning, and research through Perplexity's API
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI assistants to perform real-time web and academic searches using Perplexity's Sonar API.2-
- AlicenseBqualityDmaintenanceEnables web search using Perplexity AI's API, allowing users to search the web with optional recency filters and integration with Claude, Cursor, and other MCP clients.1MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform web searches and retrieve real-time information using Perplexity AI's Sonar models, with support for multiple search modes and easy integration with MCP clients.51MIT
- AlicenseAqualityBmaintenanceConnects AI assistants to Perplexity AI's search API, enabling natural language web search with fine-grained control over recency, citations, images, and model parameters directly from MCP clients like Claude.1172 npm6MIT