Get the FREE Ultimate OpenClaw Setup Guide →

perplexity

An MCP server for the Perplexity for use with Claude Code and Claude Desktop, giving you enhanced search and reasoning capabilties.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alcova-ai-perplexity-mcp perplexity-mcp \
  --env PERPLEXITY_API_KEY="YOUR_PERPLEXITY_API_KEY"

How to use

Perplexity MCP Server acts as a bridge between AI assistants and the Perplexity API, enabling real-time web search and advanced reasoning within familiar interfaces such as Claude and Cursor. It exposes two primary capabilities: a web search tool powered by Perplexity's Sonar Pro model (perplexity_ask) for up-to-date information, and a reasoning tool powered by Sonar Reasoning Pro (perplexity_reason) for complex problem solving. With this server running, Claude Code/Desktop and Cursor can query Perplexity directly through MCP, receiving structured responses that integrate into conversations or workflows. The server emphasizes real-time information access and enhanced reasoning, making it possible to fetch current data and perform sophisticated analyses without leaving the host assistant’s environment.

How to install

Prerequisites:

  • A compatible environment with Go (for building from source) or a prebuilt perplexity-mcp binary.
  • An API key for Perplexity ( PERPLEXITY_API_KEY).

Install methods:

  1. Using Homebrew (macOS and Linux):

    • brew tap alcova-ai/tap
    • brew install perplexity-mcp
  2. From Source (build from Git):

  3. From Binary Releases (any platform):

Configuration:

  • Set your Perplexity API key in the environment variable PERPLEXITY_API_KEY before running the server.
  • Example: export PERPLEXITY_API_KEY=your-api-key-here

Run the server (example):

  • perplexity-mcp

Note: The server supports the stdio MCP protocol. If you’re integrating with Claude or Cursor, configure the MCP client in their settings to point at this server with the appropriate model options as described in the Usage section.

Additional notes

Tips and notes:

  • Ensure PERPLEXITY_API_KEY is set in the environment where the server runs.
  • You can customize which Perplexity models to use by providing model and reasoning-model options when configuring the MCP client in the host app (default model: sonar-pro, default reasoning model: sonar-reasoning-pro).
  • When using Claude Desktop, you’ll typically add the server as an MCP endpoint under the mcpServers section with command perplexity-mcp and the appropriate --model and --reasoning-model (or rely on defaults).
  • If you encounter authentication issues, verify that the Perplexity API key has the necessary permissions and that the key is correctly exported in the environment where the server runs.
  • The server is designed to be simple to install and integrate; for production deployments, consider securing the API key and restricting access to the MCP endpoint as appropriate.

Related MCP Servers

Sponsor this space

Reach thousands of developers