perplexity-user-mcp
Perplexity AI search, reasoning, research, and compute - MCP server, dashboard, and multi-IDE auto-config for VS Code.
README
<div align="center">
<p align="center"> <img alt="Perplexity MCP" src="./packages/extension/media/icon.png" height="120"> </p>
Perplexity MCP for 15+ IDEs
Long‑lived Perplexity browser session, auto‑config for 15+ IDEs, and a VS Code extension – all in one monorepo.
<p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=Nskha.perplexity-vscode"><img src="https://vsmarketplacebadges.dev/version-short/Nskha.perplexity-vscode.svg?style=for-the-badge&label=VS%20Code&colorB=007ACC" alt="VS Code version" /></a> <a href="https://www.npmjs.com/package/perplexity-user-mcp"><img src="https://img.shields.io/npm/v/perplexity-user-mcp?style=for-the-badge&logo=npm&logoColor=white&label=npm&color=CB3837" alt="npm version" /></a> <a href="https://registry.modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP%20Registry-Listed-1D4ED8?style=for-the-badge" alt="MCP Registry listing" /></a> </p>
<p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=Nskha.perplexity-vscode"><img src="https://vsmarketplacebadges.dev/installs-short/Nskha.perplexity-vscode.svg?style=for-the-badge&label=VS%20Code%20Installs&colorB=1E8CBE" alt="VS Code installs" /></a> <a href="https://www.npmjs.com/package/perplexity-user-mcp"><img src="https://img.shields.io/npm/dw/perplexity-user-mcp?style=for-the-badge&logo=npm&logoColor=white&label=npm%20Downloads%2FWeek&color=F43F5E" alt="npm downloads per week" /></a> <a href="https://github.com/Automations-Project/VSCode-Perplexity-MCP/stargazers"><img src="https://img.shields.io/github/stars/Automations-Project/VSCode-Perplexity-MCP?style=for-the-badge&logo=github&logoColor=white&label=GitHub%20Stars&color=FBBF24" alt="GitHub stars" /></a> </p>
<p align="center"> <a href="https://github.com/Automations-Project/VSCode-Perplexity-MCP/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Automations-Project/VSCode-Perplexity-MCP/ci.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=CI" alt="CI status" /></a> <a href="https://github.com/Automations-Project/VSCode-Perplexity-MCP/releases/latest"><img src="https://img.shields.io/github/v/release/Automations-Project/VSCode-Perplexity-MCP?style=for-the-badge&logo=github&logoColor=white&label=Latest%20Release&color=10B981" alt="Latest release" /></a> <a href="https://github.com/Automations-Project/VSCode-Perplexity-MCP/commits/main"><img src="https://img.shields.io/github/last-commit/Automations-Project/VSCode-Perplexity-MCP?style=for-the-badge&logo=github&logoColor=white&label=Last%20Commit&color=6366F1" alt="Last commit" /></a> <a href="LICENSE"><img src="https://img.shields.io/github/license/Automations-Project/VSCode-Perplexity-MCP?style=for-the-badge&logo=opensourceinitiative&logoColor=white&label=License&color=22C55E" alt="License" /></a> </p>
<br />
Not affiliated with Perplexity AI, Inc. This is a community-maintained project.
Experimental — This project is under active development and not intended for production use. APIs, tools, and behavior may change without notice.
</div>
Install the Extension
<div align="center">
</div>
TL;DR – what lives here?
A monorepo that ships the Perplexity MCP runtime two ways:
perplexity-vscode– native VS Code extension with an embedded MCP daemon, webview dashboard, and auto‑config for 15+ MCP‑capable IDEs.[^ver]perplexity-user-mcp– the same MCP server as a standalone npm package for Cursor, Claude Desktop, Claude Code, Windsurf, Cline, Amp, Codex CLI, and any other MCP client that talks stdio.
Both wrap a long‑lived patchright browser session against your existing Perplexity account, so the tools consume your logged‑in plan (Free / Pro / Max) instead of an API key.[^runtime]
[^ver]: See CHANGELOG.md for current version and release notes. [^runtime]: Browser and profile details: packages/mcp-server and Architecture notes.
Who should use what?
<table> <thead> <tr> <th align="left">You want to…</th> <th align="left">Use</th> <th align="left">How</th> </tr> </thead> <tbody> <tr> <td>Use Perplexity inside VS Code with a dashboard, login flows, and auto‑config for other IDEs.</td> <td><strong><code>perplexity-vscode</code></strong> (extension)</td> <td>Install the VSIX or from Marketplace, run <code>Perplexity: Login</code>, optionally enable auto‑config.</td> </tr> <tr> <td>Run the MCP server standalone for Cursor / Claude Desktop / Windsurf / Cline / Amp / Codex CLI.</td> <td><strong><code>perplexity-user-mcp</code></strong> (npm CLI)</td> <td><code>npm install -g perplexity-user-mcp</code> or <code>npx perplexity-user-mcp</code>, point your MCP client at it.</td> </tr> <tr> <td>Keep a long‑lived HTTP MCP daemon with tunnels (Cloudflare Quick Tunnels / ngrok).</td> <td><strong>Daemon mode</strong> (mcp‑server <code>daemon/</code>)</td> <td>Use the daemon entrypoint & tunnel providers under <code>packages/mcp-server/src/daemon/</code>.</td> </tr> </tbody> </table>
Repo shape
Four npm workspaces under <a href="./packages/">packages/</a>. Almost every aggregate task builds shared first because the extension host and the webview both import its contracts from source.[^shape]
packages/shared– message contracts,IdeTarget/DashboardStatetypes, and thePERPLEXITY_RULES_SECTION_START/ENDmarkers used by auto‑config.packages/mcp-server– Perplexity MCP runtime. Ships standalone asperplexity-user-mcpand is bundled into the extension’sdist/mcp/server.mjs(ESM only).packages/webview– React 19 + Vite + Tailwind v4 + zustand dashboard. Built assets copied intopackages/extension/media/webview/.packages/extension– VS Code extension host (CommonJS via tsup,target: node20). Registers the bundled MCP server viamcpServerDefinitionProviders, owns the webview, auto‑config, and the embedded daemon.
[^shape]: See tsconfig.base.json and vitest.config.ts for workspace wiring and test globs.
Quick start
Prerequisites:
- Node.js 20+
- npm (workspaces enabled)
- A Perplexity account (Free / Pro / Max)
git clone https://github.com/Automations-Project/VSCode-Perplexity-MCP.git
cd VSCode-Perplexity-MCP
npm install
npm run build # shared → mcp-server → webview → extension (in that order)
npm test # vitest across all packages
npm run package:vsix # produces packages/extension/perplexity-vscode-<version>.vsix
Install the unpacked extension into VS Code:
code --install-extension packages/extension/perplexity-vscode-<version>.vsix
Build order matters.
packages/sharedmust build before the other three. The root scripts enforce this; keep that invariant when adding new scripts.
Browser support matrix
The MCP server automates a real Chromium browser via patchright to survive Cloudflare and serve Perplexity.[^browser]
<table> <thead> <tr> <th align="left">Priority</th> <th align="left">Runtime</th> <th align="left">Env hints</th> <th align="left">Notes</th> </tr> </thead> <tbody> <tr> <td>#1</td> <td><strong>Google Chrome</strong></td> <td><code>PERPLEXITY_BROWSER_CHANNEL=chrome</code></td> <td>Recommended, best Cloudflare compatibility.</td> </tr> <tr> <td>#2</td> <td><strong>Microsoft Edge</strong></td> <td><code>PERPLEXITY_BROWSER_CHANNEL=msedge</code></td> <td>All three platforms, works like Chrome.</td> </tr> <tr> <td>#3</td> <td><strong>System Chromium</strong></td> <td><code>PERPLEXITY_BROWSER_CHANNEL=chromium</code></td> <td>Mainly Linux; good for headless servers.</td> </tr> <tr> <td>#4</td> <td><strong>Brave</strong></td> <td>auto‑detected</td> <td>Chromium‑based; works with no special flags.</td> </tr> <tr> <td>#5</td> <td><strong>Patchright’s bundled Chromium</strong></td> <td> <code>npx patchright install chromium</code><br> then auto‑detected </td> <td>Fallback when nothing else is present.</td> </tr> </tbody> </table>
Extra overrides:
PERPLEXITY_BROWSER_PATH– absolute browser executable path (wins over detection).PERPLEXITY_CHROME_PATH– legacy alias forPERPLEXITY_BROWSER_PATH.PERPLEXITY_CONFIG_DIR– overrides~/.perplexity-mcp(profiles, vault, daemon state).
First run, profiles, and the vault
Perplexity serves a Cloudflare Turnstile on first run; the server opens a headed browser for you to log in, then caches cf_clearance + session in ~/.perplexity-mcp/.[^login]
- Profiles live under
~/.perplexity-mcp/profiles/<name>/. - Cookies are encrypted into
vault.enc(keytar with passphrase fallback). - Any process that mutates profile state touches a
.reinitsentinel, which running MCP servers watch and hot‑reload from (no restart required).
Delete ~/.perplexity-mcp/ to start over completely, or use PERPLEXITY_HEADLESS_ONLY=1 once a valid clearance is cached.
Supported IDEs / MCP clients
Auto‑config writes MCP configs and rulesets for 15+ IDEs and agents; the same server also runs everywhere else.[^ide]
<table> <thead> <tr> <th align="left">Client</th> <th align="left">How it’s wired</th> <th align="left">Config artifact</th> </tr> </thead> <tbody> <tr> <td><strong>VS Code</strong></td> <td>Native extension, embedded daemon, webview dashboard.</td> <td><code>settings.json</code>, <code>Perplexity: Login</code>, agent MCP config.</td> </tr> <tr> <td><strong>Cursor</strong></td> <td>Auto‑written MCP settings + rules section.</td> <td><code>.cursor/rules/.mdc</code>, <code>mcp.json</code>.</td> </tr> <tr> <td><strong>Claude Desktop / Claude Code</strong></td> <td>Config + rules docs, upsert between markers.</td> <td><code>claude_desktop_config.json</code>, <code>CLAUDE.md</code>.</td> </tr> <tr> <td><strong>Windsurf, Cline, Amp, Codex CLI</strong></td> <td>MCP config and rules files per target.</td> <td><code>mcp_config.json</code>, <code>.rules</code>, <code>.github/instructions/</code>, etc.</td> </tr> </tbody> </table>
Auto‑config uses IDE_METADATA in packages/shared/src/constants.ts and upserts PERPLEXITY-MCP-START / PERPLEXITY-MCP-END sections without touching hand‑written content.
Commands
All commands run from the repo root.
npm install
npm run build # shared → mcp-server → webview → extension
npm run typecheck # tsc --noEmit across all four packages
npm test # builds shared, then runs vitest
npm run test:coverage # vitest with v8 coverage; enforces per-file thresholds
npm run package:vsix # full build + vendored deps + vsce package
npm run dev:webview # Vite dev server for dashboard
npm run dev:extension # tsup --watch for extension host
npm run clean # rm dist + media/webview across packages
Single‑file / single‑test runs:
npx vitest run packages/mcp-server/test/redact.test.js
npx vitest run packages/extension/tests/auth-manager.login.test.ts
npx vitest run -t "resolves .reinit sentinel"
Coverage thresholds are enforced: e.g., redact.js / vault.js ≥ 95%, profiles.js / cli.js ≥ 85%.
Architecture notes
A few cross‑cutting pieces that matter:
-
Bundled MCP with curated externals.
packages/extension/package.jsonbuild:mcptsupspackages/mcp-server/src/index.tsintodist/mcp/server.mjs, renamesindex.mjs → server.mjs, and copies the mcp‑serverpackage.jsonnext to it. Externals (patchright,got-scraping,tough-cookie,gray-matter,express,@ngrok/ngrok,helmet,keytar, …) are deliberately left out of the bundle and vendored intodist/node_modules/bypackages/extension/scripts/prepare-package-deps.mjs. -
Daemon + pluggable tunnels.
packages/mcp-server/src/daemon/runs a long‑lived HTTP MCP server with OAuth 2.1 (via@modelcontextprotocol/sdk’smcpAuthRouter) and pluggable tunnels underdaemon/tunnel-providers/(cf-quickandngrok). Daemon state lives in<configDir>/daemon.lock,daemon.token,tunnel-settings.json, andngrok.json. -
Browser detection & download manager.
packages/extension/src/browser/browser-detect.tsprobes Chrome → Edge → system Chromium → Brave → patchright’s Chromium, withBrowserDownloadManagermanagingpatchright install chromiuminto VS Code’s globalStorage andAuthManagersyncing env to the detached daemon.
For deeper internals, see:
Find Us
<div align="center">
| Registry | Link |
|---|---|
| VS Code Marketplace | Nskha.perplexity-vscode |
| npm | perplexity-user-mcp |
| MCP Registry | io.github.Automations-Project/perplexity-user-mcp |
</div>
Support This Project
This project is built and maintained with the help of AI coding tools. If you find it useful and want to support continued development (new tools, updates, bug fixes), you can contribute by gifting Claude Code credits — the primary tool used to build this project.
Interested? Open an issue or reach out to discuss feature requests and sponsorship.
Contributing
Contributions are welcome! Conventions:
- Branch from
mainand open a PR (protected). - Run the smoke‑test checklist in
docs/smoke-tests.mdon Windows 11, macOS 14+, and Ubuntu 22+ before tagging a release. - Version
packages/extensionandpackages/mcp-servertogether and add a CHANGELOG entry that follows Keep a Changelog + SemVer. - Avoid hand‑editing auto‑managed blocks between
PERPLEXITY-MCP-START/PERPLEXITY-MCP-END.
License
The repository is licensed under the MIT License – see LICENSE.
Important notice
This project is an unofficial, community‑maintained integration for Perplexity. It is not affiliated with, endorsed by, or sponsored by Perplexity AI, Inc. in any way.
The MCP server works by automating a logged‑in Perplexity browser session on your local machine. This may be considered automated access / scraping / technical misuse under Perplexity’s Terms of Service and Acceptable Use Policy, and Perplexity may change or block this behaviour at any time.
By using this project, you are solely responsible for ensuring your use complies with Perplexity’s terms, policies, and any applicable law, and you accept the risk that your Perplexity account could be rate‑limited, suspended, or terminated.
This software is provided “as is”, on an experimental basis, without any warranty. Do not use it for anything where reliability, correctness, or policy compliance are critical.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。