---
title: "Perplexity: setup for Claude, Cursor, Codex · DotsAgent"
description: "Grounded web answers, search and deep research through the Perplexity Sonar API, run locally. Set up Perplexity in 13 MCP clients."
url: https://dotsagent.io/mcp/servers/perplexity
---

Search and docs · Perplexity

# Set up Perplexity

Grounded web answers, search and deep research through the Perplexity Sonar API, run locally.

- **Publisher**: Perplexity Official
- **Run locally**: `npx -y @perplexity-ai/mcp-server`
- **Transports**: stdio
- **Authentication**: A Perplexity API key in PERPLEXITY_API_KEY.
- **Environment**: `PERPLEXITY_API_KEY`
- **What it can touch**: Read-only.
- **Licence**: MIT
- **Source**: [github.com/perplexityai/modelcontextprotocol](https://github.com/perplexityai/modelcontextprotocol)
- **Status**: Active

## Install

This server runs on your machine as a child process of the client. You need the runtime its command uses, such as Node.js for npx, uv for uvx or Docker, plus any variables listed under Environment.

### Claude Code

`shell`

```
claude mcp add --scope project --env PERPLEXITY_API_KEY='<PERPLEXITY_API_KEY>' perplexity -- npx -y @perplexity-ai/mcp-server
```

### Cursor

`.cursor/mcp.json`

```
{
  "mcpServers": {
    "perplexity": {
      "command": "npx",
      "args": [
        "-y",
        "@perplexity-ai/mcp-server"
      ],
      "env": {
        "PERPLEXITY_API_KEY": "${env:PERPLEXITY_API_KEY}"
      }
    }
  }
}
```

### Codex

`~/.codex/config.toml`

```
[mcp_servers.perplexity]
command = "npx"
args = ["-y", "@perplexity-ai/mcp-server"]
env_vars = ["PERPLEXITY_API_KEY"]
```

[Config for other clients →](https://dotsagent.io/mcp/config#add=perplexity)

## Other servers in search and docs

- [Fetch](https://dotsagent.io/mcp/servers/fetch): Fetches a web page and converts it to Markdown so the model can read it. Part of the MCP project's reference set.

- [AWS Knowledge](https://dotsagent.io/mcp/servers/aws-knowledge): AWS-hosted search over AWS documentation, blog posts, What's New entries and regional availability.

- [Microsoft Learn](https://dotsagent.io/mcp/servers/microsoft-learn): Search and fetch official Microsoft and Azure documentation and code samples.

- [Brave Search](https://dotsagent.io/mcp/servers/brave-search): Brave's own server for web, news, image, video and local search through the Brave Search API.

- [Exa](https://dotsagent.io/mcp/servers/exa): Neural web search, page contents and code-context search for agents, hosted by Exa or run locally with an API key.

- [Tavily](https://dotsagent.io/mcp/servers/tavily): Search, extract, crawl and map websites through Tavily's agent-oriented search API, hosted or run locally.

## Sources

1. [github.com](https://github.com/perplexityai/modelcontextprotocol)/perplexityai/modelcontextprotocol

Independent reference for people who build AI agents. Not affiliated with any vendor named here.

© 2026 DotsAgent · Facts checked October 1, 2026
