Perplexity MCP Server
Provides tools for performing web searches using Perplexity AI, with control over recency, model, citations, images, and other parameters.
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 Serverwhat are the latest breakthroughs in fusion energy?"
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.
What This Does
This MCP server connects AI assistants to Perplexity AI's search API. Ask questions in natural language and get grounded, cited answers from the live web — directly inside Claude or any MCP-compatible client.
One tool, full control: perplexity_search_web exposes the complete Perplexity API — recency filtering, model selection, temperature, top_k/top_p, citation/image toggles, and streaming.
Related MCP server: Perplexity Web MCP
Getting Started
1. Get a Perplexity API Key
Sign up at perplexity.ai and generate an API key from your account settings.
2. Install & Configure
Claude Code (Recommended)
claude mcp add perplexity -- npx -y @jschuller/perplexity-mcpThen set your API key:
export PERPLEXITY_API_KEY=pplx-your-key-hereClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "@jschuller/perplexity-mcp"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-key-here"
}
}
}
}Config location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
From Source
git clone https://github.com/jschuller/perplexity-mcp.git
cd perplexity-mcp
npm install && npm run build3. Verify
Ask Claude: "Search the web for the latest developments in quantum computing from the last week"
Tool Reference
perplexity_search_web
Parameter | Type | Default | Description |
| string | (required) | Search query |
|
|
| Filter results by time period |
| string |
| Perplexity model (model cards) |
| number | — | Randomness (0 = deterministic, 2 = creative) |
| integer | — | Maximum tokens to generate |
| integer | — | Limit high-probability token pool (0 = disable) |
| number | — | Nucleus sampling threshold |
| number | — | Penalize repeated tokens |
| number | — | Encourage topic variety |
| boolean |
| Include source citations |
| boolean |
| Include relevant images |
| boolean |
| Stream response incrementally |
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your Perplexity API key |
| No |
| Default model for all queries |
Available Models
sonar— Standard model (default)sonar-pro— Enhanced capabilitiesSee full list: Perplexity Model Cards
Security
API key stays in your local environment — never sent anywhere except the Perplexity API
The server communicates only with
api.perplexity.aiover HTTPSNo data is stored or logged beyond the API request lifecycle
See SECURITY.md for vulnerability reporting
Troubleshooting
Issue | Fix |
| Set the env var in your MCP client config or shell |
| Update to v2.1.0+ (fixes JSON Schema validation with Claude Code) |
Server not found | Verify |
Connection timeout | Check internet connectivity and Perplexity API status |
Contributing
Contributions welcome — see CONTRIBUTING.md.
License
MIT
Available Tools
1 toolperplexity_search_webB
Search the web using Perplexity AI with recency filtering
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | The name of the model to use for generating completions. Options include sonar, sonar-pro, and other models listed at https://docs.perplexity.ai/guides/model-cards | |
| query | Yes | Search query | |
| top_k | No | Limits the number of high-probability tokens to consider for generation. Set to 0 to disable. | |
| top_p | No | Nucleus sampling threshold, controlling the token selection pool based on cumulative probability. | |
| stream | No | Whether to stream the response incrementally using server-sent events. | |
| recency | No | Filter results by recency | month |
| max_tokens | No | The maximum number of tokens to generate. Sum of max_tokens and prompt tokens should not exceed the model's context window limit. | |
| temperature | No | Controls generation randomness, with 0 being deterministic and values approaching 2 being more random. | |
| return_images | No | Whether to include images in the model's response. | |
| presence_penalty | No | Penalty for new tokens based on their current presence in the text, encouraging topic variety. Mutually exclusive with the frequency_penalty parameter. | |
| return_citations | No | Whether to include citations in the model's response. | |
| frequency_penalty | No | Multiplicative penalty for new tokens based on their frequency in the text to avoid repetition. Mutually exclusive with the presence_penalty parameter. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, and it discloses almost nothing beyond purpose. It does not state authentication requirements, rate limits, cost, latency, or the shape of the response (citations, images, streaming), and 'recency filtering' merely restates a schema parameter.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler, which is efficient. However, given a 12-parameter tool with no annotations, the extreme brevity leaves too much unsaid rather than being appropriately sized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 12-parameter tool with no annotations and no output schema, the definition does very little work. It never explains output format (citations, images), streaming behavior, or credential requirements that an agent would need to invoke it confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all 12 parameters are already documented in the schema, making 3 the baseline. The description adds no parameter-level meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Search) and resource (the web) and adds the mechanism (Perplexity AI) plus a modifier (recency filtering). It is clear but there are no sibling tools to differentiate from, so it lands just below the top tier.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'Search the web' but there is no explicit when-to-use, when-not-to-use, or alternative tool guidance. Nothing tells the agent when this is preferable to other retrieval approaches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v2.1.1- First observed
perplexity_search_web
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusing it with another. Its purpose—web search via Perplexity with recency filtering—is unambiguous.
The single name perplexity_search_web follows a clear namespace_verb_noun pattern that would scale predictably. With only one tool no convention is actually demonstrated, so it cannot be a perfect 5.
A single tool is thin for a search server; the apparent scope (recency filtering, query modes, content retrieval) suggests more than one operation could earn a place. One tool feels underspecified rather than deliberately minimal.
Core capability (web search) is present, but there is no way to fetch full page content, retrieve citations/sources, or run structured/multi-query searches. Notable gaps an agent would hit when it needs more than a summary result.
Maintenance
Related MCP Connectors
Real-time web search, reasoning, and research through Perplexity's API
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAllows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information using the Perplexity API, with features for filtering results by time period.8-
- AlicenseBqualityAmaintenanceEnables AI agents and users to query Perplexity AI's premium models (GPT-5.4, Claude 4.6 Opus, Gemini 3.1 Pro, etc.) via MCP tools, CLI, or API, with support for deep research, model council, and multi-turn conversations.30161 PyPI187MIT
- 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