Data as of

Perplexity API Platform MCP Server for Claude Code: Setup

The Perplexity API Platform MCP Server gives Claude Code web search, conversational answers, research, and reasoning tools.

What you can do with Perplexity API Platform in Claude Code

Pick it for Perplexity search, Sonar answers, deep research, and reasoning in a single MCP integration.

  • Retrieve ranked web search results with metadata.
  • Handle analytical questions using sonar-reasoning-pro.

Before you start: Perplexity API Platform in Claude Code

  • A Perplexity API key
  • npm/npx tooling for the local command
  • An MCP-compatible client
  • Network access to the configured Perplexity API endpoint

Use the package named in the README rather than the older config_hint package. HTTP deployment is also documented. PERPLEXITY_TIMEOUT_MS adjusts timeouts, and npx -yq is suggested for clients affected by installation output.

Perplexity API Platform Claude Code configuration

  1. Choose Claude Code configuration scope

    For Perplexity API Platform MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add Perplexity API Platform MCP Server to Claude Code

    Use the modelcontextprotocol entry below in mcpServers. Keep Perplexity API Platform MCP Server's documented stdio connection fields and your other Claude Code entries.

  3. Check Perplexity API Platform MCP Server in Claude Code

    Perplexity API Platform MCP Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "modelcontextprotocol": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@perplexity-ai/mcp-server"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "<Perplexity API key>"
      }
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'modelcontextprotocol' '{"type":"stdio","command":"npx","args":["-y","@perplexity-ai/mcp-server"],"env":{"PERPLEXITY_API_KEY":"<Perplexity API key>"}}'

Perplexity API Platform tools available to Claude Code

Perplexity API Platform's stored tool list documents 4 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

perplexity_search

For Perplexity API Platform's perplexity_search, review the permission request and arguments in Claude Code before approval.

Return ranked web results and metadata from the Search API.

perplexity_ask

For Perplexity API Platform's perplexity_ask, review the permission request and arguments in Claude Code before approval.

perplexity_research

For Perplexity API Platform's perplexity_research, review the permission request and arguments in Claude Code before approval.

perplexity_reason

For Perplexity API Platform's perplexity_reason, review the permission request and arguments in Claude Code before approval.

Handle analytical reasoning with sonar-reasoning-pro.

Perplexity API Platform: full stored tool descriptions

Troubleshooting Perplexity API Platform in Claude Code

  • If Perplexity API Platform MCP Server fails to start, check npx @perplexity-ai/mcp-server (Node.js/npm), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Perplexity API Platform MCP Server: check PERPLEXITY_API_KEY; keep credentials out of shared .mcp.json.
  • Perplexity API Platform MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires a Perplexity API key and connectivity to the API.
  • Known limitation: Long research requests can need higher timeout settings.
  • Known limitation: Some strict clients need quieter npx output to initialize successfully.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

Perplexity API Platform MCP Server — details. Claude Code guide

Frequently asked questions

Register Perplexity API Platform MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

Claude Code's modelcontextprotocol example uses stdio.

Perplexity API Platform MCP Server's Claude Code configuration invokes npx @perplexity-ai/mcp-server (Node.js/npm).

Claude Code's Perplexity API Platform MCP Server example references PERPLEXITY_API_KEY. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.

Perplexity API Platform MCP Server's stored list contains 4 tools, including perplexity_search, perplexity_ask, perplexity_research. Compare those names with Claude Code's connected tool list; the stored list is not a live check.

No. The README identifies the project as the Perplexity API Platform MCP Server.

The documented precedence is PERPLEXITY_PROXY, then HTTPS_PROXY, then HTTP_PROXY. Without them it connects directly.