Логотип VSCode Perplexity MCP

VSCode Perplexity MCP

Організація
Automations-Project

Perplexity AI search, reasoning, research, and compute - MCP server, dashboard, and multi-IDE auto-config for VS Code.

ВидавецьAutomations-Project
РепозиторійVSCode-Perplexity-MCP
МоваTypeScript
Форки
14
Зірки
75
Доступні інструменти
0
Тип транспортуstdio
ЛіцензіяMIT
Посилання
  • Підключайте інструменти до робочих процесів із ШІ

    VSCode Perplexity MCP надає можливості MCP, які можуть використовувати сумісні клієнтські ШІ-застосунки та агенти.

  • Доступні інструменти: 0

    Перегляньте нижче дії, які можна викликати, з назвами й описами, якщо сервер їх надає.

  • Готова конфігурація для копіювання

    Скористайтеся прикладами конфігурації, щоб налаштувати цей сервер у вибраному клієнті MCP.

  • Показники інтересу до відкритого коду

    Зірки: 75, форки: 14 — у пов’язаному репозиторії.

Perplexity MCP for 15+ IDEs

Long‑lived Perplexity browser session, auto‑config for 20+ IDEs, and a VS Code extension – all in one monorepo.

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.


Demo


Install the Extension

IDEInstall
Visual Studio CodeInstall in VS Code
VS Code InsidersInstall in VS Code Insiders
CursorInstall in Cursor
WindsurfInstall in Windsurf
TraeInstall in Trae
Open VSX (Gitpod · Theia · Coder)Install on Open VSX

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 20+ MCP‑capable IDEs.1
  • 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.2


Who should use what?


Repo shape

Four npm workspaces under packages/. Almost every aggregate task builds shared first because the extension host and the webview both import its contracts from source.3

  • packages/shared – message contracts, IdeTarget / DashboardState types, and the PERPLEXITY_RULES_SECTION_START/END markers used by auto‑config.
  • packages/mcp-server – Perplexity MCP runtime. Ships standalone as perplexity-user-mcp and is bundled into the extension’s dist/mcp/server.mjs (ESM only).
  • packages/webview – React 19 + Vite + Tailwind v4 + zustand dashboard. Built assets copied into packages/extension/media/webview/.
  • packages/extension – VS Code extension host (CommonJS via tsup, target: node20). Registers the bundled MCP server via mcpServerDefinitionProviders, owns the webview, auto‑config, and the embedded daemon.

Quick start

Prerequisites:

  • Node.js 20+
  • npm (workspaces enabled)
  • A Perplexity account (Free / Pro / Max)
bash
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:

bash
code --install-extension packages/extension/perplexity-vscode-<version>.vsix

Build order matters. packages/shared must 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]

Extra overrides:

  • PERPLEXITY_BROWSER_PATH – absolute browser executable path (wins over detection).
  • PERPLEXITY_CHROME_PATH – legacy alias for PERPLEXITY_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). On boxes without an OS keychain, run npx perplexity-user-mcp setup-vault to generate a strong passphrase and get OS-specific persistence snippets (PowerShell / setx / zsh / bash / systemd / MCP-client env block).
  • Any process that mutates profile state touches a .reinit sentinel, which running MCP servers watch and hot‑reload from (no restart required). v0.8.40+ also watches the active-pointer file, so switching the active profile in the extension dashboard propagates to running MCP servers automatically.
  • Login has a wall-clock timeout (5 min default, env-overridable) and a Cancel button in the dashboard; if the browser fallback hangs you can recover without restarting the extension.
  • Vault decryption transparently falls back across keychain ↔ env-var-passphrase, so a key rotation or extension-upgrade-induced unseal-preference flip won't lock you out of an existing vault. If no material can decrypt the blob, login quarantines it and writes a fresh one.

Delete ~/.perplexity-mcp/ to start over completely, or use PERPLEXITY_HEADLESS_ONLY=1 once a valid clearance is cached.


Search Sources and Advanced Queries

This MCP mirrors Perplexity's web app source picker more closely than the official API-key MCP server. The search-style tools accept a sources array with these values:

  • web - general web search. This is the default.
  • scholar - scholarly / academic source focus.
  • social - social discussion source focus.

The source selector is explicit. If your MCP client calls a tool without sources, the server sends ["web"]. Ask your agent for the source mode you want, or pass it directly when your client exposes tool arguments.

Examples:

json
{
  "tool": "perplexity_search",
  "arguments": {
    "query": "recent papers on retrieval augmented generation evaluation",
    "sources": ["scholar"],
    "language": "en-US"
  }
}
json
{
  "tool": "perplexity_ask",
  "arguments": {
    "query": "What are practitioners saying about Cursor versus Windsurf for large TypeScript repos?",
    "sources": ["social"],
    "mode": "copilot"
  }
}
json
{
  "tool": "perplexity_research",
  "arguments": {
    "query": "Compare academic evidence and practitioner discussion around code review automation",
    "sources": ["scholar", "social"],
    "language": "en-US"
  }
}

Natural-language prompts usually work too, as long as they are specific:

  • "Use Perplexity scholar sources for recent papers on agentic search evaluation."
  • "Search social sources for developer reports about Claude Code memory issues."
  • "Run deep research using both scholar and web sources, and cite every claim."
  • "Use perplexity_ask with sources: [\"social\"] and keep the answer concise."

Useful shorthand:

  • "search ..." usually maps to perplexity_search for quick lookup and source discovery.
  • "ask Perplexity ..." usually maps to perplexity_ask for a synthesized answer with citations.
  • "reason through ..." usually maps to perplexity_reason for multi-step analysis.
  • "research deeply ..." usually maps to perplexity_research for longer reports.
  • "use ASI", "Computer mode", "run a compute task", or "do code/execution-style analysis" maps to perplexity_compute when the account has Computer-mode access.

For ASI / Computer mode, ask for perplexity_compute by name when precision matters:

json
{
  "tool": "perplexity_compute",
  "arguments": {
    "query": "Model the true cost of a 5 kW residential solar installation in the Philippines versus investing the same cash at 6% annually over 10 and 20 years. Show assumptions, calculations, and sensitivity cases.",
    "language": "en-US"
  }
}

Search defaults

When no optional arguments are supplied:

ToolModel defaultMode defaultSources defaultLanguage default
perplexity_searchAuthenticated: pplx_pro; anonymous: turboAuthenticated: copilot; anonymous: concise["web"]en-US
perplexity_askPERPLEXITY_SEARCH_MODEL or pplx_procopilot["web"]en-US
perplexity_reasonPERPLEXITY_REASON_MODEL or claude46sonnetthinkingcopilot["web"]en-US
perplexity_researchPERPLEXITY_RESEARCH_MODEL or pplx_alphacopilot["web"]en-US
perplexity_computeTool argument, then PERPLEXITY_COMPUTE_MODEL, then account ASI default, then pplx_asiasiweb-only Computer modeen-US

Model defaults are configurable with environment variables:

  • PERPLEXITY_SEARCH_MODEL
  • PERPLEXITY_REASON_MODEL
  • PERPLEXITY_RESEARCH_MODEL
  • PERPLEXITY_COMPUTE_MODEL

perplexity_ask, perplexity_reason, and perplexity_compute also accept a per-call model argument. perplexity_ask accepts mode: "concise" | "copilot". perplexity_search, perplexity_reason, perplexity_research, and perplexity_ask accept sources and language.

How requests reach Perplexity

For search-style tools, the MCP server builds the same kind of request body the Perplexity web app sends: query_str, selected model, mode, source list, language, and optional follow-up thread context. It posts that body from the logged-in browser session to https://www.perplexity.ai/rest/sse/perplexity_ask.

Perplexity responds as a Server-Sent Events stream. The MCP runtime reads the stream and turns it into a normal tool response: answer text, citation sources, media items, suggested follow-ups, follow-up context, and the Perplexity thread URL. This is why the server can use your existing Free / Pro / Max account features without a Perplexity API key, but it also means the request shape can drift if Perplexity changes its private web endpoint.

Current tuning opportunities

  • The auto-config rules catalogue in packages/extension/src/auto-config/index.ts is a static copy of the tool list and summaries. Tests keep it in sync with registered tool names, but summaries and usage guidance still have to be updated by hand. A future improvement would generate the rules block from the MCP tool schemas, or share one typed catalogue between the runtime and auto-config.
  • sources defaults to ["web"] even for queries that clearly ask for papers or social discussion. We can either document prompt patterns, as above, or add a small routing layer that infers scholar / social from the user's request before calling Perplexity.
  • perplexity_search uses browser-backed search by default. Experimental browser-free search exists behind PERPLEXITY_EXPERIMENTAL_IMPIT_SEARCH=1, but it is intentionally opt-in because Perplexity's private search request body can change.
  • perplexity_models already uses a warm disk cache before launching the browser. Similar cache-first behavior may help for repeated model/tier/rate-limit checks from agents.

Supported IDEs / MCP clients

Auto‑config writes MCP configs and rulesets for 15+ IDEs and agents; the same server also runs everywhere else.[^ide]

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.

bash
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:

bash
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.json build:mcp tsups packages/mcp-server/src/index.ts into dist/mcp/server.mjs, renames index.mjs → server.mjs, and copies the mcp‑server package.json next to it. Externals (patchright, got-scraping, tough-cookie, gray-matter, express, @ngrok/ngrok, helmet, keytar, …) are deliberately left out of the bundle and vendored into dist/node_modules/ by packages/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’s mcpAuthRouter) and pluggable tunnels under daemon/tunnel-providers/ (cf-quick and ngrok). Daemon state lives in <configDir>/daemon.lock, daemon.token, tunnel-settings.json, and ngrok.json.

  • Browser detection & download manager.
    packages/extension/src/browser/browser-detect.ts probes Chrome → Edge → system Chromium → Brave → patchright’s Chromium, with BrowserDownloadManager managing patchright install chromium into VS Code’s globalStorage and AuthManager syncing env to the detached daemon.

For deeper internals, see:


Troubleshooting


Find Us


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 main and open a PR (protected).
  • Run the smoke‑test checklist in docs/smoke-tests.md on Windows 11, macOS 14+, and Ubuntu 22+ before tagging a release.
  • Version packages/extension and packages/mcp-server together 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.

Footnotes

  1. See CHANGELOG.md for current version and release notes. ↩

  2. Browser and profile details: packages/mcp-server and Architecture notes. ↩

  3. See tsconfig.base.json and vitest.config.ts for workspace wiring and test globs. ↩

Використовуйте MCP VSCode Perplexity MCP з різними моделями ШІ

TypingMind підключає інструменти MCP на рівні робочого простору, тож після підключення VSCode Perplexity MCP ви можете використовувати їх із різними моделями ШІ в TypingMind, а не налаштовувати окремо для кожної моделі. Ця інтеграція MCP працює локально через конектор MCP TypingMind на вашому пристрої.

Інструкція з налаштування локального конектора

Виберіть цей варіант, якщо серверу MCP потрібен доступ до локальних файлів, програм або приватних ресурсів на вашому комп’ютері.

1

Відкрийте налаштування MCP

У TypingMind перейдіть до розділу «Налаштування», відкрийте «Розширені налаштування», потім «Протокол контексту моделі» й виберіть «Параметри конектора».

  1. Відкрийте TypingMind у браузері.
  2. Натисніть значок налаштувань.
  3. Перейдіть до розділу «Розширені налаштування».
  4. Відкрийте розділ «Протокол контексту моделі».
  5. Натисніть «Параметри конектора» й виберіть «Цей пристрій».
Екран налаштування конектора MCP у TypingMind з вибраним варіантом «Цей пристрій»
2

Виконайте команду конектора

Виберіть «Цей пристрій», скопіюйте команду з TypingMind і виконайте її в терміналі. Не зупиняйте процес, поки користуєтеся MCP.

  1. Скопіюйте команду налаштування, показану в TypingMind.
  2. Відкрийте «Термінал» у macOS або Windows Terminal у Windows.
  3. Вставте й виконайте команду.
  4. Підтвердьте встановлення пакета, якщо термінал запитає дозволу продовжити.
  5. Не закривайте вікно термінала й не зупиняйте процес, поки користуєтеся інструментами MCP.
3

Додайте VSCode Perplexity MCP як сервер

Коли статус конектора зміниться на «Готово», натисніть «Змінити сервери» та вставте конфігурацію сервера MCP.

  1. Зачекайте, доки статус конектора зміниться на «Готово».
  2. Натисніть «Змінити сервери».
  3. Вставте конфігурацію сервера MCP VSCode Perplexity MCP.
  4. Збережіть список серверів.
  5. Оновіть дані, щоб переконатися, що конектор досі готовий до роботи.
Налаштування MCP у TypingMind з активним сервером і кнопкою «Змінити сервери»
{
  "mcpServers": {
    "vscode-perplexity-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Використовуйте підключення з різними моделями

Збережіть список серверів, відкрийте «Плагіни», увімкніть інструменти MCP для VSCode Perplexity MCP, а потім виберіть будь-яку підтримувану модель ШІ в TypingMind і використовуйте інструменти в чаті або призначте їх агенту ШІ.

  1. Відкрийте сторінку «Плагіни» в TypingMind.
  2. Увімкніть інструменти MCP для VSCode Perplexity MCP.
  3. Почніть чат і виберіть модель ШІ, яку хочете використовувати.
  4. Використовуйте інструменти MCP у чаті або призначте їх агенту ШІ.
  5. За потреби перемикайтеся на іншу модель ШІ без повторного підключення MCP.
Чат TypingMind із використанням увімкнених інструментів MCP і вибраної моделі ШІ
Допоможете з цим завданням через VSCode Perplexity MCP?
VSCode Perplexity MCP
Звісно. Я це прочитав.
Ось що я знайшов за допомогою VSCode Perplexity MCP.

Поширені запитання

Для чого використовується сервер MCP VSCode Perplexity MCP?

VSCode Perplexity MCP — це сервер MCP, який дає змогу сумісним клієнтам ШІ підключатися до зовнішніх інструментів і контексту. У TypingMind ви можете додати цей сервер MCP один раз і зробити його інструменти доступними у своєму робочому просторі ШІ.

Чи можу я використовувати MCP VSCode Perplexity MCP з кількома моделями ШІ в TypingMind?

Так. TypingMind підключає інструменти MCP на рівні робочого простору, тому ви можете використовувати VSCode Perplexity MCP з різними моделями ШІ, як-от Claude, ChatGPT, Gemini або іншими моделями, які ви налаштували в TypingMind, без окремого налаштування сервера MCP для кожної моделі.

Навіщо використовувати MCP VSCode Perplexity MCP із TypingMind?

TypingMind — один із найкращих інтерфейсів для чату з великими мовними моделями, адже він об’єднує різні моделі ШІ, промпти, плагіни, агентів ШІ, ключі API та інструменти MCP в одному робочому просторі. Підключивши VSCode Perplexity MCP, ви зможете використовувати його інструменти MCP з вибраними моделями та впорядковано працювати з чатами в TypingMind.

Як підключити MCP VSCode Perplexity MCP до TypingMind?

VSCode Perplexity MCP працює через локальний конектор MCP TypingMind. Це найкращий варіант, коли серверу MCP потрібен доступ до локальних файлів, настільних застосунків, інструментів командного рядка або приватних ресурсів на вашому комп’ютері.

Які інструменти надає MCP VSCode Perplexity MCP у TypingMind?

VSCode Perplexity MCP надає можливості MCP, які можна ввімкнути на сторінці «Плагіни» в TypingMind і використовувати в чаті або призначати агентам ШІ.

Чи потрібно передавати свої ключі API в TypingMind, щоб використовувати MCP VSCode Perplexity MCP?

Ні. TypingMind орієнтований насамперед на локальну роботу й дає змогу зберігати контроль над постачальниками моделей, ключами API, промптами та конфігурацією MCP. Якщо VSCode Perplexity MCP потребує автентифікації, під час створення підключення додайте потрібні заголовки, налаштування OAuth або локальну конфігурацію для цього сервера MCP.

Схожі сервери MCP

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇