
使用你现有的 Perplexity 订阅配合 MCP——无需 API 费用。Web 包装器 + MCP 服务器用于编码代理(Claude Code、Cursor、Windsurf 等)
概览
Perplexity AI 网页界面的非官方 Python 包装器,提供 MCP(模型上下文协议)服务器和 Python 客户端,用于与编码代理集成。 —— 无需 API 费用。该包装器使用您的 Perplexity 网络会话 Cookie,因此所有查询都使用您现有的 Pro 订阅,而非付费的 Perplexity API。 如果你已经订阅了 Perplexity Pro(每月 20 美元),这个封装功能让你无需额外 API 成本,就能将 Perplexity 集成到你的编码工作流程中。 不需要安装——你的MCP配置会自动通过UVX运行服务器。 MCP服务器通过浏览器的Perplexity会话Cookie进行身份验证。你需要导出一次(过期后重新导出)。 1. 安装 Cookie-Editor 浏览器扩展(Chrome、Firefox)2.进入 perplexity.ai 并访问您的账户 3.点击 Cookie-Editor 扩展图标 4.点击(左下角)→将 JSON 复制到剪贴板 5。将剪贴板内容保存为文件: 1. 去 perplexity.ai 2.
概述(AI 翻译)
Perplexity AI 网页界面的非官方 Python 包装器,提供 MCP(模型上下文协议)服务器和 Python 客户端,用于与编码代理集成。
使用您现有的 Perplexity 订阅 — 无需 API 费用。该封装器使用您的 Perplexity 网络会话 Cookie,因此所有查询都使用您现有的 Pro 订阅,而非付费的 Perplexity API。
为什么是这个包装纸?
| 方法 | 成本 | 速率限制 |
|---|---|---|
| 这个包装器(网页会话) | $0(使用你现有的订阅) | 你的订阅限制 |
| 复杂度 API | 5/1000 请求(声纳),每月 200 美元(专业级) | API 级别限制 |
如果你已经订阅了 Perplexity Pro(每月 20 美元),这个封装功能让你无需额外 API 成本,就能将 Perplexity 集成到你的编码工作流程中。
快速启动
无需安装——你的MCP配置会自动通过uvx运行服务器。
Prerequisites: uv 和 Python 3.10+
1.获取你的困惑饼干
MCP服务器通过浏览器的Perplexity会话Cookie进行身份验证。你需要导出一次(过期后重新导出)。
选项A:Cookie编辑器扩展(推荐)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Perplexity Subscription MCP
Unofficial Python wrapper for Perplexity AI’s web interface, providing an MCP (Model Context Protocol) server and Python client for integration with coding agents.
Use your existing Perplexity subscription — no API costs. This wrapper uses your Perplexity web session cookies, so all queries use your existing Pro subscription instead of the paid Perplexity API.
Why This Wrapper?
| Approach | Cost | Rate Limits |
|---|---|---|
| This wrapper (web session) | $0 (uses your existing subscription) | Your subscription limits |
| Perplexity API | $5/1000 requests (sonar), $200/month (pro tier) | API tier limits |
If you already have a Perplexity Pro subscription ($20/month), this wrapper lets you integrate Perplexity into your coding workflow without additional API costs.
Quick Start
No install needed — your MCP config runs the server via uvx automatically.
Prerequisites: uv and Python 3.10+
1. Get Your Perplexity Cookies
The MCP server authenticates using your browser’s Perplexity session cookies. You need to export them once (and re-export when they expire).
Option A: Cookie-Editor Extension (Recommended)
- Install the Cookie-Editor browser extension (Chrome, Firefox)
- Go to perplexity.ai and log in to your account
- Click the Cookie-Editor extension icon
- Click Export (bottom-left) → copies JSON to clipboard
- Save the clipboard content to a file:
# Create the config directory mkdir -p ~/.config/perplexity # Paste your clipboard into this file # macOS: pbpaste > ~/.config/perplexity/cookies.json # Linux: xclip -selection clipboard -o > ~/.config/perplexity/cookies.json # Windows (PowerShell): Get-Clipboard | Out-File -Encoding utf8 ~/.config/perplexity/cookies.json # Or just create the file manually and paste the JSON content
This gives you an array format like:
[
{"domain": ".perplexity.ai", "name": "__Secure-next-auth.session-token", "value": "eyJ...", ...},
{"domain": ".perplexity.ai", "name": "pplx.visitor-id", "value": "...", ...}
]
Option B: Browser DevTools (Manual)
- Go to perplexity.ai and log in
- Open DevTools (
F12orCmd+Opt+I/Ctrl+Shift+I) - Go to Application tab (Chrome) or Storage tab (Firefox)
- Click Cookies →
https://www.perplexity.ai - Copy cookie names and values into a JSON file:
{
"__Secure-next-auth.session-token": "eyJ...",
"pplx.visitor-id": "...",
"__cf_bm": "..."
}
Save as ~/.config/perplexity/cookies.json.
安装
uvx --from perplexity-subscription-mcp perplexity-mcp配置
{
"mcpServers": {
"perplexity": {
"command": "uvx",
"args": ["--from", "perplexity-subscription-mcp", "perplexity-mcp"],
"env": {
"PERPLEXITY_COOKIES_PATH": "YOUR_ABSOLUTE_PATH/.config/perplexity/cookies.json"
}
}
}
}