
balakumardev/perplexity-web-wrapper
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Use your existing Perplexity subscription with MCP - no API costs. Web wrapper + MCP server for coding agents (Claude Code, Cursor, Windsurf, etc.)
개요
Unofficial Python wrapper for Perplexity AI's web interface, providing an MCP (Model Context Protocol) server and Python client for integration with coding agents. — 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. If you already have a Perplexity Pro subscription ($20/month), this wrapper lets you integrate Perplexity into your coding workflow without additional API costs. No install needed — your MCP config runs the server via uvx automatically. The MCP server authenticates using your browser's Perplexity session cookies. You need to export them once (and re-export when they expire). 1. Install the Cookie-Editor browser extension (Chrome, Firefox) 2. Go to perplexity.ai and to your account 3. Click the Cookie-Editor extension icon 4. Click (bottom-left) → copies JSON to clipboard 5. Save the clipboard content to a file: 1. Go to perplexity.ai and 2.
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"
}
}
}
}