Perplexity Sonar
MCP server for Perplexity API integration with Claude Desktop and other MCP clients
What is Perplexity Sonar?
Perplexity Sonar is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for perplexity api integration with claude desktop and other mcp clients
MCP server for Perplexity API integration with Claude Desktop and other MCP clients
This server falls under the APIs and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for Perplexity API integration with Claude Deskto
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx perplexity-sonarConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Perplexity Sonar
The Perplexity Sonar MCP Server integrates Perplexity's Sonar API with Claude Desktop and other MCP clients, providing real-time web search with cited sources directly within AI conversations. It exposes a single perplexity-chat tool supporting multiple Sonar models (sonar, sonar-pro, sonar-reasoning, sonar-deep-research) with controls for recency filtering, domain restriction, temperature, and related question generation.
Prerequisites
- Node.js 18.0.0 or higher installed
- Perplexity API key obtained from perplexity.ai/account/api
- Active Perplexity API subscription with Sonar access
- MCP-compatible client such as Claude Desktop
Obtain a Perplexity API key
Sign in at perplexity.ai, navigate to Account > API, and generate an API key. Keep this key secure — it will be passed as an environment variable.
Add the server to Claude Desktop configuration
Edit your Claude Desktop config file to register the Perplexity Sonar MCP server. On macOS the config lives at ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"perplexity-sonar": {
"command": "npx",
"args": ["-y", "perplexity-sonar-mcp"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-api-key-here"
}
}
}
}Restart Claude Desktop
Fully quit and reopen Claude Desktop to load the MCP server. The perplexity-chat tool should now be available in your conversations.
Run in standalone mode (optional)
The server can also be run as a standalone process with environment variables, optionally on a custom port.
PERPLEXITY_API_KEY=pplx-your-api-key-here perplexity-sonar-mcp
# With custom port:
PERPLEXITY_API_KEY=pplx-your-api-key-here PORT=8080 perplexity-sonar-mcpBuild from source (development)
Clone and build the project locally for development or customization.
git clone https://github.com/felores/perplexity-sonar-mcp.git
cd perplexity-sonar-mcp
npm install
npm run build
npm run devPerplexity Sonar Examples
Client configuration
Claude Desktop configuration for the Perplexity Sonar MCP server. Config file on macOS: ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"perplexity-sonar": {
"command": "npx",
"args": ["-y", "perplexity-sonar-mcp"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-api-key-here"
}
}
}
}Prompts to try
Example prompts that leverage different Sonar models and filtering options.
- "Search for the latest news on AI regulation in the EU from the past week"
- "Use sonar-pro to find recent research papers on CRISPR gene editing with citations"
- "Search only on arxiv.org for papers about diffusion models published this month"
- "Use sonar-deep-research to give me a comprehensive overview of the current state of fusion energy"
- "What are the latest developments in quantum computing? Include related questions I should explore next"Troubleshooting Perplexity Sonar
401 Unauthorized error when calling perplexity-chat
Verify the PERPLEXITY_API_KEY in your MCP config is correct and has not expired. Test the key directly with: curl -H 'Authorization: Bearer YOUR_KEY' https://api.perplexity.ai/chat/completions. Regenerate the key at perplexity.ai/account/api if needed.
perplexity-sonar-mcp package not found when using npx
The exact npm package name is perplexity-sonar-mcp. Verify this in your args array. Clear the npx cache with npx clear-npx-cache and try again. You can also verify the package exists by running npm info perplexity-sonar-mcp.
sonar-deep-research model times out or returns no response
The sonar-deep-research model performs extensive web research and can take significantly longer than other models. Increase any client-side timeout settings if possible. For time-sensitive queries, use the sonar or sonar-pro models instead and narrow your query scope.
Frequently Asked Questions about Perplexity Sonar
What is Perplexity Sonar?
Perplexity Sonar is a Model Context Protocol (MCP) server that mcp server for perplexity api integration with claude desktop and other mcp clients It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Perplexity Sonar?
Follow the installation instructions on the Perplexity Sonar GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Perplexity Sonar?
Perplexity Sonar works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Perplexity Sonar free to use?
Yes, Perplexity Sonar is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Perplexity Sonar Alternatives — Similar APIs Servers
Looking for alternatives to Perplexity Sonar? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Perplexity Sonar 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 Sonar?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.