Perplexity Sonar

v1.0.0APIsstable

MCP server for Perplexity API integration with Claude Desktop and other MCP clients

perplexity-sonarmcpai-integration
Share:
9
Stars
0
Downloads
0
Weekly
0/5

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

Search the web using Perplexity's Sonar API.
Get AI-powered search results directly in Claude.
felores

Maintainer

LicenseMIT
Languagejavascript
Versionv1.0.0
UpdatedOct 19, 2025
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx perplexity-sonar

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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"
      }
    }
  }
}
3

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.

4

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-mcp
5

Build 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 dev

Perplexity 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.

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.

Quick Config Preview

{ "mcpServers": { "perplexity-sonar": { "command": "npx", "args": ["-y", "perplexity-sonar"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides