Perplexity MCP Server
Official Perplexity MCP server providing real-time web search, conversational answers, deep research, and reasoning via the Sonar models and Search API.
The Perplexity MCP server is the official Model Context Protocol implementation maintained by Perplexity AI. It connects MCP-compatible clients (Claude Desktop, Cursor, VS Code, Codex, Windsurf) to Perplexity's Search API and Sonar family of models, giving agents real-time web search, conversational Q&A, deep research, and structured reasoning without leaving the chat.
The server exposes four tools: perplexity_search for ranked web results with titles, URLs, and snippets; perplexity_ask for quick conversational answers backed by live web search via sonar-pro; perplexity_research for comprehensive analysis with citations via sonar-deep-research; and perplexity_reason for systematic problem solving via sonar-reasoning-pro. The research and reasoning tools support an optional strip_thinking parameter to drop internal reasoning tags and save context tokens.
It is distributed as the npm package @perplexity-ai/mcp-server and runs via npx. Authentication uses a single PERPLEXITY_API_KEY environment variable obtained from the Perplexity API portal. Optional environment variables control timeout, base URL, log level, and proxy settings for enterprise deployments.
Tools
| Tool | Description |
|---|---|
perplexity_search |
Performs a web search and returns ranked results including titles, URLs, snippets, and metadata. |
perplexity_ask |
Conversational AI with real-time web search using the sonar-pro model. Good for straightforward questions needing live context. |
perplexity_research |
Comprehensive research and analysis with citations using the sonar-deep-research model. Best for complex, multi-source investigations. |
perplexity_reason |
Advanced problem solving and logical analysis using the sonar-reasoning-pro model. |
Prerequisites
- Node.js and npm (the server runs via
npx) - A Perplexity API key from the API portal
- An MCP-compatible client (Claude Desktop, Cursor, VS Code, Codex, Windsurf)
Quick install (Claude CLI)
claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server
Claude Desktop / Cursor config
Add this to your MCP client configuration file:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": {
"PERPLEXITY_API_KEY": "your_key_here"
}
}
}
}
For VS Code, use the same block but rename the top-level key from mcpServers to servers.
Optional environment variables
PERPLEXITY_API_KEY(required): your Perplexity API keyPERPLEXITY_TIMEOUT_MS: request timeout (default 5 minutes)PERPLEXITY_BASE_URL: custom API endpoint (defaulthttps://api.perplexity.ai)PERPLEXITY_LOG_LEVEL: logging verbosity (defaultERROR)PERPLEXITY_PROXY: corporate proxy URL if required
- Ground an agent's answers in real-time web data using
perplexity_askinstead of relying on stale training data - Run deep, citation-backed competitive or market research with
perplexity_researchand import the report into a doc - Use
perplexity_searchto fetch fresh URLs and snippets that downstream tools (scrapers, summarizers) can then process - Tackle multi-step reasoning problems (math, code logic, strategic analysis) with
perplexity_reason - Build research workflows inside Cursor or VS Code that pull current docs, changelogs, and Stack Overflow answers inline
- "Use perplexity_research to write a detailed report on the latest changes in the EU AI Act, with citations."
- "Search the web for the top 5 open-source vector databases released in the last 12 months and summarize their differences."
- "Ask Perplexity what the current Fed funds rate is and what the most recent FOMC statement said."
- "Use perplexity_reason to analyze whether migrating our Postgres workload to Aurora Serverless v2 makes sense given these constraints."
- "Find recent news about OpenAI's enterprise pricing changes and list the source URLs."
- Official, first-party implementation maintained by Perplexity AI
- Covers the full Sonar lineup: quick ask, deep research, reasoning, and raw search in one server
- Simple
npxinstall with a single required env var; one-click setup for Cursor and VS Code strip_thinkingoption lets you control context usage for reasoning models
- Requires a paid Perplexity API key; usage is metered and not free
- No built-in caching or rate-limit handling documented in the README
- Tool surface is limited to search and reasoning; no file, citation export, or Spaces management tools
- Exa MCP server for semantic web search with similar agent-friendly results
- Tavily MCP server focused on real-time search and extraction for AI agents
- Brave Search MCP server for privacy-focused web search