---
title: "Perplexity：Claude、Cursor、Codex 配置指南 · DotsAgent"
description: "通过 Perplexity Sonar API 提供有依据的网页问答、搜索和深度研究；需在本地运行。 在 13 个 MCP 客户端中配置 Perplexity。"
url: https://dotsagent.io/zh/mcp/servers/perplexity
---

搜索与文档 · Perplexity

# 配置 Perplexity

通过 Perplexity Sonar API 提供有依据的网页问答、搜索和深度研究；需在本地运行。

- **发布者**: Perplexity 官方
- **本地运行**: `npx -y @perplexity-ai/mcp-server`
- **传输方式**: stdio
- **身份验证**: 在 PERPLEXITY_API_KEY 中设置 Perplexity API 密钥。
- **环境变量**: `PERPLEXITY_API_KEY`
- **可访问内容**: 只读。
- **许可证**: MIT
- **源码**: [github.com/perplexityai/modelcontextprotocol](https://github.com/perplexityai/modelcontextprotocol)
- **状态**: 活跃

## 安装

此服务器会在你的本机上作为客户端的子进程运行。你需要安装其命令所用的运行时，例如 npx 需要 Node.js、uvx 需要 uv，或者使用 Docker；还需要设置 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"]
```

[其他客户端的配置 →](https://dotsagent.io/zh/mcp/config#add=perplexity)

## 搜索与文档 中的其他服务器

- [Fetch](https://dotsagent.io/zh/mcp/servers/fetch): 抓取网页并将其转换为 Markdown，供模型读取。属于 MCP 项目的参考服务器集。

- [AWS Knowledge](https://dotsagent.io/zh/mcp/servers/aws-knowledge): 由 AWS 托管的搜索服务，可搜索 AWS 文档、博客文章、What's New 条目和区域可用性信息。

- [Microsoft Learn](https://dotsagent.io/zh/mcp/servers/microsoft-learn): 搜索并获取 Microsoft 和 Azure 官方文档及代码示例。

- [Brave Search](https://dotsagent.io/zh/mcp/servers/brave-search): Brave 自有服务器，通过 Brave Search API 提供网页、新闻、图片、视频和本地搜索。

- [Exa](https://dotsagent.io/zh/mcp/servers/exa): 为 agent 提供神经网络网页搜索、页面内容和代码上下文搜索；可由 Exa 托管，也可使用 API 密钥在本地运行。

- [Tavily](https://dotsagent.io/zh/mcp/servers/tavily): 通过 Tavily 面向 agent 的搜索 API 搜索、提取、抓取和映射网站；可托管运行，也可在本地运行。

## 来源

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

为 AI agent 开发者提供的独立参考资料。与此处提及的任何厂商均无关联。

© 2026 DotsAgent · 事实核查日期：2026年10月1日
