Perplexity
A Perplexity API MCP server that unlocks Perplexity's search-augmented AI capabilities for LLM agents. Features robust error handling, secure input validation, and transparent reasoning with the showThinking parameter.
What is Perplexity?
Perplexity is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to perplexity api mcp server that unlocks perplexity's search-augmented ai capabilities for llm agents. features robust error handling, secure input validation, and transparent reasoning with the showthi...
A Perplexity API MCP server that unlocks Perplexity's search-augmented AI capabilities for LLM agents. Features robust error handling, secure input validation, and transparent reasoning with the showThinking parameter.
This server falls under the Search & Data Extraction and APIs categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ask_perplexity
Use Cases
Maintainer
Works with
Installation
NPM
npx -y mcp-server-perplexityManual Installation
npx -y mcp-server-perplexityConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Perplexity
The Perplexity MCP Server brings Perplexity's search-augmented generation capabilities directly into your MCP-compatible AI client, exposing two tools: `perplexity_search` for fast, real-time web-grounded queries and `perplexity_deep_research` for exhaustive multi-source investigations on complex topics. It is built with TypeScript, supports both stdio and HTTP transports, and includes optional JWT authentication for secure deployments. This server is the right choice when you need an AI assistant that can answer questions with up-to-date web sources rather than relying solely on training data.
Prerequisites
- Node.js 18.0.0 or higher installed
- A Perplexity API key — obtain one at perplexity.ai under API settings
- git to clone the repository (no npm package installation path available)
- An MCP-compatible client such as Claude Desktop, Cline, or Claude Code
Clone the repository and install dependencies
The server is distributed as source code. Clone it and install Node.js dependencies before building.
git clone https://github.com/cyanheads/perplexity-mcp-server.git
cd perplexity-mcp-server
npm installBuild the TypeScript source
Compile the TypeScript source into JavaScript. The output goes to the `dist/` directory.
npm run buildSet your Perplexity API key
Obtain your API key from the Perplexity account settings page. You will pass it as an environment variable in the MCP client configuration — no .env file is required.
# Obtain from: https://www.perplexity.ai/settings/api
# Key format: pplx-...
export PERPLEXITY_API_KEY=pplx-your-key-hereAdd the server to your MCP client configuration
Add an entry to your MCP client's configuration file pointing to the built `dist/index.js`. The PERPLEXITY_API_KEY environment variable is required; all other variables are optional.
{
"mcpServers": {
"perplexity-mcp-server": {
"command": "node",
"args": ["/absolute/path/to/perplexity-mcp-server/dist/index.js"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-key-here"
}
}
}
}Restart your MCP client
Restart Claude Desktop or reload your editor. The `perplexity_search` and `perplexity_deep_research` tools should now be available.
Perplexity Examples
Client configuration
Complete Claude Desktop configuration for the Perplexity MCP server using stdio transport.
{
"mcpServers": {
"perplexity-mcp-server": {
"command": "node",
"args": ["/path/to/perplexity-mcp-server/dist/index.js"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-key-here",
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Prompts to try
Example prompts that leverage both the fast search and deep research tools.
- "Search for the latest news on the EU AI Act enforcement timeline"
- "What are the current Python 3.13 performance benchmarks compared to 3.12?"
- "Do a deep research on the long-term effects of microplastics on human health"
- "Search for recent academic papers on RAG vs fine-tuning for domain-specific LLMs"
- "What are the best practices for Kubernetes cost optimization in 2025?"Troubleshooting Perplexity
Tool calls return a 401 Unauthorized error
Verify that the PERPLEXITY_API_KEY environment variable is correctly set in your MCP client config and that the key is active. Keys look like `pplx-...` and can be checked at perplexity.ai/settings/api.
perplexity_deep_research times out before returning results
Deep research can take 3+ minutes for complex queries. Increase your MCP client's tool timeout to at least 180 seconds. In Claude Desktop, this can be set in advanced settings.
npm run build fails with TypeScript errors
Ensure you are running Node.js 18.0.0 or higher (`node --version`). Run `npm install` again to ensure all dev dependencies including the TypeScript compiler are present.
Frequently Asked Questions about Perplexity
What is Perplexity?
Perplexity is a Model Context Protocol (MCP) server that perplexity api mcp server that unlocks perplexity's search-augmented ai capabilities for llm agents. features robust error handling, secure input validation, and transparent reasoning with the showthinking parameter. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Perplexity?
Install via npm with the command: npx -y mcp-server-perplexity. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Perplexity?
Perplexity works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Perplexity free to use?
Yes, Perplexity is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Perplexity Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to Perplexity? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Perplexity in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Perplexity?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.