
balakumardev/perplexity-web-wrapper
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
既存の Perplexity サブスクリプションを MCP - API コストなしで使用してください。 ウェブラッパー+ MCPサーバー(クロードコード、カーソル、ウィンドサーフィンなど)
概要
Perplexity AI の Web インターフェイス用の非公式な Python ラッパーで、MCP (Model Context Protocol) サーバと Python クライアントをプログラミングエージェントと統合します。 — API の費用はかかりません。 この wrapper は Perplexity の Web セッション Cookie を使用するので、すべてのクエリは有料の Perplexity API の代わりに、既存の Pro サブスクリプションを使用します。 すでにPerplexity Proサブスクリプション($ 20 /月)を持っている場合、このラッパーは、追加のAPIコストなしで、Perplexityをコーディングワークフローに統合できます。 インストール不要 — MCP config は、自動的に uvx 経由でサーバーを実行します。 お使いのブラウザのPerplexityセッションクッキーを使用してMCPサーバーが認証されます。 一度にエクスポートする必要があります(有効期限が切れると再エクスポート)。 1。 Cookie-Editorブラウザ拡張(Chrome、Firefox)2をインストールします。 perplexity.ai とアカウント 3 に移動します。 Cookie-Editor拡張アイコン4をクリックします。 クリック(左下)→JSONをクリップボード5にコピーします。 クリップボードコンテンツをファイルに保存します。 1. perplexity.ai と 2. に行く.
概要(AI 翻訳)
Perplexity AI の Web インターフェイス用の非公式な Python ラッパーで、MCP (Model Context Protocol) サーバと Python クライアントをプログラミングエージェントと統合します。
既存の Perplexity サブスクリプションを使用 — API の費用はかかりません。 この wrapper は Perplexity の Web セッション Cookie を使用するので、すべてのクエリは有料の Perplexity API の代わりに、既存の Pro サブスクリプションを使用します。
#このWrapperの理由
| アプローチ | コスト | レート制限 | お問い合わせ |このラッパー(ウェブセッション) | $0(既存のサブスクリプションを使用する) | サブスクリプションの制限 | | パープレクチャリティ API | $5/1000 リクエスト (sonar), $200/月 (pro tier) | API ティアリミット |
すでにPerplexity Proサブスクリプション($ 20 /月)を持っている場合、このラッパーは、追加のAPIコストなしで、Perplexityをコーディングワークフローに統合できます。
クイックスタート
インストール不要 — MCP config が自動的に uvx] でサーバーを実行します。
前提条件: uv と Python 3.10+
##1. あなたの永続性クッキーを取得する
お使いのブラウザのPerplexityセッションクッキーを使用してMCPサーバーが認証されます。 一度にエクスポートする必要があります(有効期限が切れると再エクスポート)。
###Option A:クッキー編集拡張(推奨)
このページは 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"
}
}
}
}