Perplexity MCP Server

Perplexity MCP Server

Connects AI assistants to Perplexity AI's search API, enabling natural language web search with fine-grained control over recency, citations, images, and model parameters directly from MCP clients like Claude.

Category
Visit Server

README

<!-- mcp-server: perplexity | tools: 1 | transport: stdio | auth: api_key -->

<h1 align="center">Perplexity MCP Server</h1>

<p align="center"> <a href="https://www.npmjs.com/package/@jschuller/perplexity-mcp"><img src="https://img.shields.io/npm/v/@jschuller/perplexity-mcp?color=CB3837&label=npm" alt="npm"></a> <a href="https://www.npmjs.com/package/@jschuller/perplexity-mcp"><img src="https://img.shields.io/npm/dm/@jschuller/perplexity-mcp?color=CB3837&label=downloads" alt="Downloads"></a> <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-18+-339933" alt="Node.js"></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-SDK%201.x-5436DA" alt="MCP SDK"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue" alt="License"></a> <a href="https://github.com/jschuller/perplexity-mcp/actions/workflows/ci.yml"><img src="https://github.com/jschuller/perplexity-mcp/actions/workflows/ci.yml/badge.svg" alt="CI"></a> </p>

<p align="center"> Search the web from Claude Desktop, Claude Code, or any MCP client using Perplexity AI —<br> with fine-grained control over recency, citations, images, and model parameters. </p>


What This Does

This MCP server connects AI assistants to Perplexity AI's search API. Ask questions in natural language and get grounded, cited answers from the live web — directly inside Claude or any MCP-compatible client.

One tool, full control: perplexity_search_web exposes the complete Perplexity API — recency filtering, model selection, temperature, top_k/top_p, citation/image toggles, and streaming.

Getting Started

1. Get a Perplexity API Key

Sign up at perplexity.ai and generate an API key from your account settings.

2. Install & Configure

Claude Code (Recommended)

claude mcp add perplexity -- npx -y @jschuller/perplexity-mcp

Then set your API key:

export PERPLEXITY_API_KEY=pplx-your-key-here

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": ["-y", "@jschuller/perplexity-mcp"],
      "env": {
        "PERPLEXITY_API_KEY": "pplx-your-key-here"
      }
    }
  }
}

Config location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

From Source

git clone https://github.com/jschuller/perplexity-mcp.git
cd perplexity-mcp
npm install && npm run build

3. Verify

Ask Claude: "Search the web for the latest developments in quantum computing from the last week"

Tool Reference

perplexity_search_web

Parameter Type Default Description
query string (required) Search query
recency day | week | month | year month Filter results by time period
model string sonar Perplexity model (model cards)
temperature number — Randomness (0 = deterministic, 2 = creative)
max_tokens integer — Maximum tokens to generate
top_k integer — Limit high-probability token pool (0 = disable)
top_p number — Nucleus sampling threshold
frequency_penalty number — Penalize repeated tokens
presence_penalty number — Encourage topic variety
return_citations boolean true Include source citations
return_images boolean false Include relevant images
stream boolean false Stream response incrementally

Environment Variables

Variable Required Default Description
PERPLEXITY_API_KEY Yes — Your Perplexity API key
PERPLEXITY_MODEL No sonar Default model for all queries

Available Models

  • sonar — Standard model (default)
  • sonar-pro — Enhanced capabilities
  • See full list: Perplexity Model Cards

Security

  • API key stays in your local environment — never sent anywhere except the Perplexity API
  • The server communicates only with api.perplexity.ai over HTTPS
  • No data is stored or logged beyond the API request lifecycle
  • See SECURITY.md for vulnerability reporting

Troubleshooting

Issue Fix
PERPLEXITY_API_KEY is required Set the env var in your MCP client config or shell
400 invalid_request_error Update to v2.1.0+ (fixes JSON Schema validation with Claude Code)
Server not found Verify npx @jschuller/perplexity-mcp runs without error
Connection timeout Check internet connectivity and Perplexity API status

Contributing

Contributions welcome — see CONTRIBUTING.md.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured