perplexity-web-api-mcp
by mishamyrt·★ 72·综合分 46
一个无需 API 密钥的 MCP 服务器,通过会话令牌提供 Perplexity AI 搜索和推理功能。
概述
这个 MCP 服务器使开发者能够将 Perplexity AI 强大的搜索、研究和推理功能直接集成到他们的 AI 应用程序中。它支持多种认证模式,包括带会话令牌的完全认证和无令牌模式的基本功能。该服务器使用 Rust 构建,提供多种安装选项,包括直接 npm 安装、Docker,以及为 Claude Desktop、Cursor 和 VS Code 等各种 AI 客户端的配置。它提供了四个主要工具:perplexity_search(仅网络链接)、perplexity_ask(全面答案)、perplexity_reason(高级推理)和 perplexity_research(深入分析)。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
当您想要访问 Perplexity 的搜索功能而不想为他们的 API 付费时,尤其是如果您已经有 Perplexity 账户。
什么时候不要选它
如果您需要高容量商业用途或需要稳定的 API 访问,请避免使用,因为它依赖于网络抓取,可能会因 UI 更改而中断。
此 server 暴露的工具
从 README 抽取出 4 个工具perplexity_searchQuick web search returning links, titles, and snippets
perplexity_askAsk Perplexity AI a question and get a comprehensive answer with citations
perplexity_reasonAdvanced reasoning and problem-solving with step-by-step analysis
perplexity_researchDeep, comprehensive research using sonar-deep-research model
可对比工具
安装
安装
**NPM 安装(推荐)**
npm install -g perplexity-web-api-mcp**Docker**
docker run -d -p 8080:8080 -e PERPLEXITY_SESSION_TOKEN="您的令牌" mishamyrt/perplexity-web-api-mcp**Claude Desktop 配置** 添加到 claude_desktop_config.json:
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "perplexity-web-api-mcp"],
"env": {
"PERPLEXITY_SESSION_TOKEN": "您的会话令牌",
"PERPLEXITY_CSRF_TOKEN": "您的 CSRF 令牌"
}
}
}
}**无令牌模式**:省略上述环境变量以使用基本功能而不进行身份验证。
FAQ
- 我需要 Perplexity Pro 订阅才能使用此 MCP 服务器吗?
- 不需要,您可以使用免费的 Perplexity 账户或 Pro 订阅。该服务器通过会话令牌使用您现有的账户,因此您无需单独为 API 访问付费。
- 如何获取身份验证令牌?
- 在浏览器中登录 perplexity.ai,打开开发者工具(F12),转到应用程序 → Cookie → https://www.perplexity.ai,并复制 __Secure-next-auth.session-token 和 next-auth.csrf-token 的值。
- 无令牌模式和认证模式有什么区别?
- 在无令牌模式下,只有 perplexity_search 和 perplexity_ask(使用 turbo 模型)可用。认证模式授予访问 perplexity_research、perplexity_reason、模型选择和文件附件的权限。
perplexity-web-api-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。