perplexity-mcp

This repository provides a Model Context Protocol (MCP) server, enabling web search functionality through Perplexity AI's API for the Anthropic Claude desktop client. It allows users to search the web

130
10

perplexity-mcp MCP server

smithery badge

This is a Model Context Protocol (MCP) server that integrates Perplexity AI's search capabilities with applications like the Anthropic Claude desktop client. It enables prompts such as "Search the web to find out what's new at Anthropic in the past week."

Example

Let's you use prompts like, "Search the web to find out what's new at Anthropic in the past week."

Glama Scores

<a href="https://glama.ai/mcp/servers/ebg0za4hn9"><img width="380" height="200" src="https://glama.ai/mcp/servers/ebg0za4hn9/badge" alt="Perplexity Server MCP server" /></a>

Components

Prompts

  • perplexity_search_web: Searches the web using Perplexity AI.
    • Requires a "query" argument.
    • Accepts an optional "recency" argument ('day', 'week', 'month', 'year').

Tools

  • perplexity_search_web: Searches the web using Perplexity AI.
    • Takes "query" as a required string argument
    • Optional "recency" parameter to filter results (day/week/month/year)
    • Returns search results from Perplexity's API

Installation

Installing via Smithery

npx -y @smithery/cli install perplexity-mcp --client claude

Requires UV (Fast Python package and project manager)

# Using Homebrew on macOS
brew install uv

or

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Environment Variables

  • PERPLEXITY_API_KEY: Your Perplexity AI API key
  • PERPLEXITY_MODEL: The Perplexity model to use (defaults to "sonar" if not specified)Available models:
    • sonar-deep-research: 128k context - Enhanced research capabilities
    • sonar-reasoning-pro: 128k context - Advanced reasoning with professional focus
    • sonar-reasoning: 128k context - Enhanced reasoning capabilities
    • sonar-pro: 200k context - Professional grade model
    • sonar: 128k context - Default model
    • r1-1776: 128k context - Alternative architecture

And updated list of models is avaiable (here)[https://docs.perplexity.ai/guides/model-cards]

Cursor & Claude Desktop Installation

  "perplexity-mcp": {
    "env": {
      "PERPLEXITY_API_KEY": "XXXXXXXXXXXXXXXXXXXX",
      "PERPLEXITY_MODEL": "sonar"
    },
    "command": "uvx",
    "args": [
      "perplexity-mcp"
    ]
  }

Cursor

  • On MacOS: /Users/your-username/.cursor/mcp.json
  • On Windows: C:\Users\your-username\.cursor\mcp.json

Claude Desktop

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

Repository

JS
jsonallen

jsonallen/perplexity-mcp

Created

December 27, 2024

Updated

March 27, 2025

Language

Python

Category

Search & Knowledge