Skip to main content

Perplexity MCP Server

Project description

Perplexity MCP Server

A Model Context Protocol (MCP) server that provides web search and reasoning functionality using Perplexity AI's API. Works with the Anthropic Claude desktop client.

Features

  • Web search using Perplexity AI
  • Recency filtering (day/week/month/year)
  • Multiple model support (sonar/sonar-pro/sonar-reasoning)
  • Citations support for search results

Installation

Prerequisites

  1. Python 3.11 or higher
  2. UV package manager:
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

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

User Installation (PyPI)

For users who want to use the MCP server:

uv pip install perplexity-mcp-server

Developer Installation (Local)

For developers who want to modify the server:

# Clone the repository
git clone https://github.com/felores/perplexity-mcp-server.git
cd perplexity-mcp-server

# Create and activate virtual environment
uv venv .venv
.\.venv\Scripts\activate  # Windows
source .venv/bin/activate # Unix

# Install in development mode
uv pip install -e .

Configuration

Claude Desktop Setup

  1. Get your API key from Perplexity AI

  2. Edit Claude's config file:

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

For Users (PyPI Installation)

{
  "perplexity-reasoning": {
    "env": {
      "PERPLEXITY_API_KEY": "your-api-key-here",
      "PERPLEXITY_MODEL": "sonar"
    },
    "command": "uv",
    "args": ["run", "perplexity-mcp-server"]
  }
}

For Developers (Local Installation)

{
  "perplexity-reasoning": {
    "env": {
      "PERPLEXITY_API_KEY": "your-api-key-here",
      "PERPLEXITY_MODEL": "sonar",
      "PYTHONPATH": "path/to/your/project/src"
    },
    "command": "python",
    "args": ["path/to/your/project/src/perplexity_mcp/run.py"]
  }
}

Available Models

  • sonar: Standard model (127k context)
  • sonar-pro: Advanced model (200k context)
  • sonar-reasoning: Chain of Thought model (127k context)

If no model is specified, defaults to sonar.

Usage

  1. Open Claude desktop client
  2. Try a prompt like: "Search the web for recent news about AI"
  3. Click "Allow for this chat" when prompted

Development

For development instructions, see DEVELOPMENT.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perplexity_mcp_server-0.2.0.tar.gz (138.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perplexity_mcp_server-0.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file perplexity_mcp_server-0.2.0.tar.gz.

File metadata

  • Download URL: perplexity_mcp_server-0.2.0.tar.gz
  • Upload date:
  • Size: 138.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for perplexity_mcp_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e90c22ba7c87a21b4dfbe73dc49f132a372397cbbdf55d41b906f22a5f72514f
MD5 efb5148a94bd23733680b238acf31abd
BLAKE2b-256 1101e7639aa2346a707238698eff4993d8e5ef61226720b8b1bff45b2a80cc61

See more details on using hashes here.

File details

Details for the file perplexity_mcp_server-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for perplexity_mcp_server-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ab576eecdc83eb6610c915357ad7ef5a8d2788d4a363f057d77004662f291c9
MD5 da4e3e708fc80c73ab8ce73ecbcb39be
BLAKE2b-256 f76a3c931a5483bbe0e6579071fa9cc44a8f0f4ad63a5d9c15f4377e5a4e3bd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page