Perplexity Ai MCP Server

The official TypeScript library for the Perplexity API

Local serverstdioTypeScript

What is the Perplexity Ai MCP server?

Perplexity Ai MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. The official TypeScript library for the Perplexity API.

What you get

This library provides convenient access to the Perplexity REST API from server-side TypeScript or JavaScript.

Setting it up

The server ships on npm as @perplexity-ai/perplexity_ai, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What the assistant can call

Once Perplexity Ai is connected, these are the calls the assistant has available:

  • Retries — Certain errors will be automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network
  • Timeouts — Requests time out after 15 minutes by default. You can configure this with a timeout option:
  • Logging — The Logging tool exposed by this server

Configuration and credentials

You will need one environment variable: PERPLEXITY_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

TypeScript >= 5.0 is supported.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the perplexity ai mcp server does with a few real requests.

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Perplexity Ai's toolset — Retries, Timeouts, Logging — is a fair guide to whether it matches your workflow. It is maintained by GitHub Actions; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
RetriesCertain errors will be automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit
TimeoutsRequests time out after 15 minutes by default. You can configure this with a timeout option:
LoggingThe Logging tool exposed by this server.

How to install the Perplexity Ai MCP server

{
  "mcpServers": {
    "perplexity-ai": {
      "command": "npx",
      "args": ["-y", "@perplexity-ai/perplexity_ai"],
      "env": {
        "PERPLEXITY_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

TypeScript >= 5.0 is supported.

VariableDescriptionRequired
PERPLEXITY_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Perplexity Ai to Retries.
  • Use Perplexity Ai to Timeouts.
  • Use Perplexity Ai to Logging.

Frequently asked questions

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