Perplexity MCP server

OfficialPerplexityConfig last verified Jun 1, 2026

Perplexity's official Sonar MCP server: give your agent live web search, conversational answers, deep research, and reasoning.

The Perplexity MCP server is Perplexity's official integration that puts the Sonar API behind a coding agent's tool calls. Where a base model is frozen at its training cutoff, Perplexity's tools ground every answer in a live web search and return cited, present-tense results, so the agent can reason about today's documentation, release notes, prices, or news instead of guessing. It exposes four complementary tools: a raw ranked search, a conversational ask backed by sonar-pro, a deep multi-step research mode backed by sonar-deep-research, and an advanced reasoning mode backed by sonar-reasoning-pro.

The server runs locally over stdio via npx (@perplexity-ai/mcp-server) and authenticates with a PERPLEXITY_API_KEY obtained from the Perplexity API dashboard. It can also be deployed as an HTTP service (default port 8080) with Node.js or Docker when you want a shared endpoint for a team or an agent fleet. Optional environment variables tune the request timeout, the API base URL, the log level, and an outbound proxy for corporate networks. Because each tool is a thin, well-named wrapper over a Sonar model, it slots cleanly alongside docs and version-control servers without flooding the context window.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "-y",
        "@perplexity-ai/mcp-server"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "<PERPLEXITY_API_KEY>",
        "PERPLEXITY_BASE_URL": "<PERPLEXITY_BASE_URL>",
        "PERPLEXITY_TIMEOUT_MS": "<PERPLEXITY_TIMEOUT_MS>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add perplexity -- npx -y @perplexity-ai/mcp-server

Available tools

ToolDescription
perplexity_searchDirect web search via the Perplexity Search API, returning ranked results with metadata.
perplexity_askGeneral-purpose conversational answers with real-time web search, backed by the sonar-pro model.
perplexity_researchDeep, comprehensive multi-step research backed by the sonar-deep-research model.
perplexity_reasonAdvanced reasoning and problem-solving backed by the sonar-reasoning-pro model.

Required configuration

  • PERPLEXITY_API_KEYRequired

    Perplexity API key from the dashboard at perplexity.ai/account/api. Required.

  • PERPLEXITY_BASE_URLOptional

    Override the Sonar API base URL. Optional; defaults to https://api.perplexity.ai.

  • PERPLEXITY_TIMEOUT_MSOptional

    Per-request timeout in milliseconds. Optional; defaults to 5 minutes.

  • PERPLEXITY_LOG_LEVELOptional

    Log verbosity: DEBUG, INFO, WARN, or ERROR. Optional.

  • PERPLEXITY_PROXYOptional

    Outbound HTTP proxy for corporate networks. Optional.

What you can do with it

Ground answers in the live web

When a question depends on current facts the model can't have memorized, the agent calls perplexity_ask or perplexity_search to fetch cited, up-to-date results instead of hallucinating from stale training data.

Run deep research inside the agent loop

Hand off a broad question to perplexity_research and let sonar-deep-research compile a multi-source synthesis, then continue working with the findings without leaving the editor or chat.

FAQ

Is it free?
The MCP server itself is open source and free to run, but it calls the Perplexity Sonar API, which is paid and billed per request against your PERPLEXITY_API_KEY. Pricing depends on the Sonar model each tool uses.
Does it support remote/OAuth?
The canonical mode is local stdio with an API key. There is no OAuth flow; you can self-host the server over HTTP (default port 8080) with Node.js or Docker for a shared endpoint, but it still authenticates with the Perplexity API key.
← Browse all ai-ml servers