Perplexity API Platform MCP Server
The Perplexity API Platform MCP Server provides AI assistants with real-time web search, reasoning, and research capabilities through Perplexity's Sonar models and Search API.
Web Search (
perplexity_search): Perform direct web searches returning ranked results with titles, URLs, and snippets. Supports filtering by country (ISO code), limiting results (1–20), and controlling token extraction per page (256–2048 tokens).Conversational AI with Search (
perplexity_ask): Ask general-purpose questions using thesonar-promodel, which combines conversational AI with real-time web search for quick, up-to-date answers.Deep Research (
perplexity_research): Conduct comprehensive research using thesonar-deep-researchmodel, returning detailed reports with citations. Supports an optionalstrip_thinkingparameter to remove internal reasoning tags and save context tokens.Advanced Reasoning (
perplexity_reason): Solve complex analytical problems using thesonar-reasoning-promodel. Also supports the optionalstrip_thinkingparameter.
The server can run locally or be deployed as an HTTP server for cloud/shared environments, with support for proxies, custom API endpoints, timeouts, and configurable log levels.
Provides real-time web search, deep research, and advanced reasoning capabilities through Perplexity's Sonar models and Search API, enabling AI assistants to access current information, conduct comprehensive research, and solve complex analytical problems.
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 API Platform MCP Serverresearch the latest advancements in quantum computing and summarize key breakthroughs"
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 API Platform MCP Server
The official MCP server implementation for the Perplexity API Platform, providing AI assistants with real-time web search, reasoning, and research capabilities through the Agent API and the Search API.
Remote MCP Server
The remote MCP server is hosted by Perplexity and is the easiest way to get started: same tools, nothing to install or update. The Cursor and VS Code buttons at the top of this page connect to it with one click. If your MCP client does not support remote servers yet, skip to the local server setup below. Connect over Streamable HTTP with your Perplexity API key:
https://api.perplexity.ai/mcpFor Claude Code:
claude mcp add --transport http perplexity https://api.perplexity.ai/mcp --header "Authorization: Bearer YOUR_API_KEY"See the MCP integration docs for manual Cursor/VS Code configuration, usage from the Anthropic API, and setup for other clients.
Related MCP server: Perplexity Ask MCP Server
Local MCP Server
Get Your API Key
Get your Perplexity API Key from the API Portal
Replace
your_key_herein the configurations below with your API key(Optional) Set timeout:
PERPLEXITY_TIMEOUT_MS=600000(default: 5 minutes)(Optional) Set custom base URL:
PERPLEXITY_BASE_URL=https://your-custom-url.com(default: https://api.perplexity.ai)(Optional) Set log level:
PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR(default: ERROR)
Claude Code
claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-serverOr install via plugin:
export PERPLEXITY_API_KEY="your_key_here"
claude
# Then run: /plugin marketplace add perplexityai/modelcontextprotocol
# Then run: /plugin install perplexityCodex
codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-serverOther MCP Clients
Most clients can be configured manually using the same mcpServers wrapper in their client config (as shown for Cursor). If a client has a different schema, check its docs for the exact wrapper format.
For manual setup, these clients all use the same mcpServers structure:
Client | Config File |
Cursor |
|
Claude Desktop |
|
Kiro |
|
Windsurf |
|
VS Code |
|
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": {
"PERPLEXITY_API_KEY": "your_key_here"
}
}
}
}Proxy Setup (For Corporate Networks)
If you are running this server at work—especially behind a company firewall or proxy—you may need to tell the program how to send its internet traffic through your network's proxy. Follow these steps:
1. Get your proxy details
Ask your IT department for your HTTPS proxy address and port.
You may also need a username and password.
2. Set the proxy environment variable
The easiest and most reliable way for Perplexity MCP is to use PERPLEXITY_PROXY. For example:
export PERPLEXITY_PROXY=https://your-proxy-host:8080If your proxy needs a username and password, use:
export PERPLEXITY_PROXY=https://username:password@your-proxy-host:80803. Alternate: Standard environment variables
If you'd rather use the standard variables, we support HTTPS_PROXY and HTTP_PROXY.
The server checks proxy settings in this order:PERPLEXITY_PROXY → HTTPS_PROXY → HTTP_PROXY. If none are set, it connects directly to the internet.
URLs must include https://. Typical ports are 8080, 3128, and 80.
Self-Hosted HTTP Mode
For cloud or shared deployments, run the server in HTTP mode.
Environment Variables
Variable | Description | Default |
| Your Perplexity API key | Required |
| Custom base URL for API requests |
|
| HTTP server port |
|
| Network interface to bind to. Defaults to loopback. Set to |
|
| CORS origins (comma-separated). Defaults to empty (no cross-origin browser requests). Set to an explicit allowlist (e.g. | (empty) |
| Additional | (loopback only) |
Docker
docker build -t perplexity-mcp-server .
docker run -p 8080:8080 -e PERPLEXITY_API_KEY=your_key_here perplexity-mcp-serverNode.js
export PERPLEXITY_API_KEY=your_key_here
npm install && npm run build && npm run start:httpThe server will be accessible at http://localhost:8080/mcp
Available Tools
perplexity_search
Direct web search using the Perplexity Search API. Returns ranked search results with metadata, perfect for finding current information. Supports recency filters (search_recency_filter) and domain restrictions (search_domain_filter).
perplexity_ask
General-purpose conversational AI with real-time web search, backed by the Agent API fast preset. Great for quick questions and everyday searches.
perplexity_research
Deep, comprehensive research backed by the Agent API high preset. Ideal for thorough analysis and detailed reports. Runs can take minutes; the server streams the run and reports progress to clients that request it.
perplexity_reason
Advanced reasoning and problem-solving backed by the Agent API medium preset. Perfect for complex analytical tasks.
Presets are managed configurations (model, search setup, step budget) that Perplexity keeps tuned over time; see thepresets guide. Earlier versions of this server called the legacy sonar-pro, sonar-reasoning-pro, and sonar-deep-research models and accepted strip_thinking / reasoning_effort parameters. Those parameters are no longer part of the tool schemas and are ignored if sent; the Agent API produces no <think> tags.
Use as a Library
The package also exports the server factory for embedding in your own Node process:
import { createPerplexityServer } from "@perplexity-ai/mcp-server";
// Single-tenant: reads PERPLEXITY_API_KEY from the environment.
const server = createPerplexityServer("my-service");
// Multi-tenant hosts resolve the key per call instead. When a provider is
// set, the environment variable is never consulted, and a provider that
// returns no key fails the call rather than falling back.
const tenantServer = createPerplexityServer("my-service", {
apiKey: () => currentRequestApiKey,
});Mount the returned server on any MCP transport (stdio, streamable HTTP, in-memory).
Troubleshooting
API Key Issues: Ensure
PERPLEXITY_API_KEYis set correctlyConnection Errors: Check your internet connection and API key validity
Tool Not Found: Make sure the package is installed and the command path is correct
Timeout Errors: For very long research queries, set
PERPLEXITY_TIMEOUT_MSto a higher valueProxy Issues: Verify your
PERPLEXITY_PROXYorHTTPS_PROXYsetup and ensureapi.perplexity.aiisn't blocked by your firewall.EOF / Initialize Errors: Some strict MCP clients fail because
npxwrites installation messages to stdout. Usenpx -yqinstead ofnpx -yto suppress this output.
For support, visit community.perplexity.ai or file an issue.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides AI-powered search, research, and reasoning capabilities through integration with Perplexity.ai, offering three specialized tools: general conversational AI, deep research with citations, and advanced reasoning.Last updated362MIT
- Alicense-qualityDmaintenanceIntegrates the Sonar API to provide Claude with real-time web-wide research capabilities. Enables conversational web searches through Perplexity's AI-powered search engine for up-to-date information retrieval.Last updated1,243MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform real-time web searches, company research, content crawling, LinkedIn searches, and deep research using the Exa AI Search API. Provides comprehensive web information retrieval capabilities in a safe and controlled manner.Last updated217,1461MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to perform real-time web and academic searches using Perplexity's Sonar API.Last updated2
Related MCP Connectors
The best web search for your AI Agent
LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.
Web search for AI agents — one tool across 6 engines, routed to the cheapest + cached.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/perplexityai/modelcontextprotocol'
If you have feedback or need assistance with the MCP directory API, please join our Discord server