Perplexity MCP Server

An MCP server that connects to Perplexity's Sonar API, enabling real-time web-wide research in conversational AI.

Remote serverstreamable-http

What is the Perplexity MCP server?

If you want an AI assistant working directly with Perplexity, the perplexity mcp server is the bridge. An MCP server that connects to Perplexity's Sonar API, enabling real-time web-wide research in conversational AI.

What Perplexity does

The official MCP server implementation for the Perplexity API Platform, providing AI assistants with real-time web search, reasoning, and research capabilities through the Agent API and the Search API.

Tools it exposes

Once connected, the assistant can call this tool directly:

  • Codex — The Codex tool exposed by this server

Installing the perplexity mcp server

The server is distributed via npm as @perplexity-ai/mcp-server, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 4 environment variables: PERPLEXITY_API_KEY, PERPLEXITY_PROXY, YOUR_API_KEY, PERPLEXITY_BASE_URL. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Perplexity sits in that group, and the shape of its toolset — Codex — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This is a hosted server — you point your client at an endpoint rather than running a local process, so there is nothing to keep updated on your machine.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the perplexity mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
CodexThe Codex tool exposed by this server.

How to install the Perplexity MCP server

{
  "mcpServers": {
    "modelcontextprotocol": {
      "command": "npx",
      "args": ["-y", "@perplexity-ai/mcp-server"],
      "env": {
        "PERPLEXITY_API_KEY": "your-value",
        "PERPLEXITY_PROXY": "your-value",
        "YOUR_API_KEY": "your-value",
        "PERPLEXITY_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
PERPLEXITY_API_KEYCredential the server authenticates with.Yes
PERPLEXITY_PROXYConfiguration value read at startup.Optional
YOUR_API_KEYCredential the server authenticates with.Yes
PERPLEXITY_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Perplexity to Codex.

Frequently asked questions

It connects Perplexity to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Codex) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Perplexity directly.