Skip to main content
Glama

JS Reverse MCP

English | 中文

AI-first / AI-native MCP-сервер для обратной разработки JavaScript, который позволяет вашим AI-ассистентам для программирования (таким как Claude, Cursor, Copilot) непрерывно отлаживать, локализовать, сохранять и анализировать поведение JavaScript на веб-страницах, как настоящий аналитик.

Это не просто перенос Chrome DevTools API в модель, а реорганизация скриптов, точек останова, сети, WebSocket, состояния браузера и локального файлового I/O в инструменты, пригодные для непрерывного рассуждения и действий AI-агента. Антидетект — одна из возможностей: по умолчанию используется специально перекомпилированный и независимо поддерживаемый форк Patchright, обеспечивающий stealth на уровне протокола, а для сайтов с сильной анти-парсинг-защитой опционально доступен режим маскировки на уровне исходного кода CloakBrowser.

☁️ Спонсор · Sponsored by IPWO

IPWO 住宅代理支持灵活的代理配置,开发者可以根据不同任务选择相应的网络环境,用于网页访问、请求测试、地区化内容分析及自动化工作流。

对于涉及 JS 逆向、浏览器调试和 Web 网络分析的项目,住宅代理也可以作为网络环境的一种补充选择,帮助开发者更灵活地满足不同地区的访问与测试需求。

👉 免费测试入口,9 折优惠码:0204

Related MCP server: MCP JS Debugger

☁️ Спонсор · Sponsored by Infistar.cc 无限星河

js-reverse-mcp × Infistar.cc 无限星河|全模型 API · стабильная поддержка AI-отладки

Благодарим Infistar.cc 无限星河 за спонсорство и предоставление сервиса моделей для js-reverse-mcp!

  • ⚡ Стабильная обработка сложных задач отладки: корпоративные каналы с высокой пропускной способностью и многоузловое резервирование, цены от 1/10 официального канала, меньше ограничений, ошибок 429 и разрывов соединения при длительных задачах.

  • 🧠 Один API Key для подключения основных моделей: поддержка ChatGPT, Claude, Gemini, Kimi, GLM, DeepSeek и других моделей, совместимость с AI-инструментами программирования Claude Code, Codex, Cursor и др.

  • 🔎 Помощь в авторизованной отладке и исследованиях безопасности: подходит для многошаговых задач, таких как поиск скриптов, анализ точек останова, отслеживание сетевых запросов, проверка стека вызовов и понимание логики кода.

  • 📦 Эксклюзивные льготы для пользователей проекта: зарегистрируйтесь по эксклюзивной партнёрской ссылке и выполните первый вызов, чтобы получить тестовый баланс на 5 долларов / эксклюзивную скидку на первое пополнение.

Позиционирование: поддержка конфигурации API моделей Claude Code / Codex.

Возможности

  • AI-native дизайн инструментов: гранулярность инструментов, границы вывода и сообщения об ошибках спроектированы вокруг принятия решений агентом, чтобы не подталкивать модель к бесполезным следующим шагам

  • Воспроизводимый рабочий процесс: исходный код скриптов, сырые сетевые данные и бинарные результаты можно экспортировать в локальные файлы, а затем использовать как входные данные для дальнейшего анализа

  • Выполнение в контексте точки останова: при паузе можно вычислять выражения непосредственно в call frame, проверять переменные области видимости, выполнять пошагово и получать контекст исходного кода

  • Анализ скриптов: список всех загруженных JS, поиск по коду, получение/сохранение исходного кода, автоматическое форматирование больших минифицированных скриптов

  • Анализ сети и WebSocket: стек вызовов запросов, точки останова XHR, определение Set-Cookie, экспорт сырых body/header, группировка сообщений WebSocket

  • Воспроизведение состояния браузера: очистка cookies / cache / storage / sessionStorage текущего сайта, воспроизведение cookie и процессов анти-риск-контроля с перезагрузкой

  • Окно по умолчанию + постоянный статус входа: браузер виден, cookies / localStorage сохраняются между сессиями

  • Специализированное ядро Patchright: по умолчанию используется независимо поддерживаемый форк Patchright, который постоянно исправляет известные общие черты реализации из апстрима

  • Опциональный слой антидетекта: stealth на уровне протокола специализированного Patchright включён по умолчанию; для сайтов с сильной анти-парсинг-защитой можно добавить --cloak для использования бинарника CloakBrowser

Специализированный форк Patchright

js-reverse-mcp больше не зависит напрямую от публичного пакета Patchright, а использует специально скомпилированный для этого MCP @zhizhuodemao/patchright. Этот форк постоянно поддерживается в отдельном репозитории и развивается вместе с реальными образцами детекта этого MCP.

  • Больше нет прямой зависимости от публичного пакета Patchright

  • Корректировка на уровне протокола и перекомпиляция для подтверждённых общих черт реализации из апстрима

  • Настройки антидетекта не зависят от JS-инъекций на уровне страницы

  • Сохранены исходные возможности evaluate, locator и управления страницей

  • Форк постоянно поддерживается в специализированном репозитории для этого MCP

Публичная документация описывает только границы дизайна и не раскрывает внутренние образцы детекта и детали реализации. Цель специализированного форка — уменьшить подтверждённые общие черты реализации, а не гарантировать абсолютную необнаружимость автоматизации браузера.

Системные требования

  • Node.js v20.19 или новее

  • Chrome стабильная версия

Быстрый старт (npx)

Установка не требуется, просто добавьте в конфигурацию MCP-клиента:

{
  "mcpServers": {
    "js-reverse": {
      "command": "npx",
      "args": ["js-reverse-mcp"]
    }
  }
}

Claude Code

claude mcp add js-reverse npx js-reverse-mcp

Если у вас ещё нет доступного API моделей или нужно настроить собственный адрес API, обратитесь к: Учебник по настройке API сторонних моделей Claude Code / Codex.

Codex

codex mcp add js-reverse -- npx js-reverse-mcp

Если у вас ещё нет доступного API моделей или нужно настроить собственный адрес API, обратитесь к: Учебник по настройке API сторонних моделей Claude Code / Codex.

Cursor

Перейдите в Cursor Settings -> MCP -> New MCP Server и используйте конфигурацию выше.

VS Code Copilot

code --add-mcp '{"name":"js-reverse","command":"npx","args":["js-reverse-mcp"]}'

Локальная установка (опционально)

git clone https://github.com/zhizhuodemao/js-reverse-mcp.git
cd js-reverse-mcp
npm install
npm run build

Затем используйте локальный путь в конфигурации MCP:

{
  "mcpServers": {
    "js-reverse": {
      "command": "node",
      "args": ["/你的路径/js-reverse-mcp/build/src/index.js"]
    }
  }
}

AI-first дизайн

Основная цель этого проекта — не «уметь управлять браузером», а позволить AI-агенту стабильно выполнять полный цикл реальной задачи JS-реверса: открыть страницу, пройти анти-риск-контроль, локализовать скрипт, сохранить исходный код, установить точку останова, вызвать поведение, проверить рантайм, экспортировать сетевые материалы, воспроизвести состояние, а затем продолжить рассуждение.

Несколько принципов дизайна проходят через весь код:

  • Инструменты — это примитивы агента, а не отображение меню DevTools: list_network_requests может выводить индекс, запрашивать детали по reqid и экспортировать точные материалы через outputFile; evaluate_script может выполняться на странице, в call frame точки останова, а также принимать входной файл через localFilePath.

  • Вывод должен направлять следующий шаг: вывод списков остаётся коротким и сканируемым; вывод деталей имеет границы; длинные результаты предлагают экспорт; для pending-запросов явно предлагается сначала возобновить выполнение, чтобы агент не ждал ответ, который никогда не завершится.

  • Локальные файлы — это рабочая среда анализа: save_script_source, list_network_requests(..., outputFile), evaluate_script(..., localFilePath) позволяют агенту перемещаться между браузером, сетью и локальными файлами, а не впихивать большие фрагменты кода или бинарные данные в контекст чата.

  • Состояние можно очищать, процесс можно воспроизводить: профиль по умолчанию сохраняет статус входа; --isolated предоставляет одноразовую чистую среду; clear_site_data очищает только состояние, связанное с текущим сайтом, для многократного воспроизведения генерации cookie, инициализации анти-риск-контроля и цепочек запросов.

  • Антидетект служит цепочке отладки: тихая навигация CDP, реальный viewport, Google referer, специализированный форк Patchright и CloakBrowser нацелены на то, чтобы агент мог войти на целевую страницу и продолжить анализ, а не превращать проект в универсальный краулер-фреймворк.

Механизм антидетекта (поддерживающая возможность)

Антидетект — одна из базовых поддерживающих возможностей js-reverse-mcp. Слой-обёртка (сам этот MCP) использует ноль JS-инъекций, не делает хаков Object.defineProperty (это само по себе сигнал для детекта). Весь антидетект реализован в двух непересекающихся слоях:

Слой

Режим по умолчанию

Режим --cloak

Слой протокола (CDP)

Специализированный форк Patchright: не вызывает Runtime.enable / Console.enable, выполняет evaluate в isolated world, убирает флаги автоматизации при запуске и постоянно исправляет известные общие черты реализации

То же

Слой исходного кода (бинарный патч C++)

Нет — напрямую используется системный Google Chrome

Бинарник CloakBrowser (патчи маскировки на уровне исходного кода по платформам, покрывают navigator.webdriver, canvas, WebGL, audio, GPU, шрифты, экран, WebRTC, TLS)

Каталог профиля

~/.cache/chrome-devtools-mcp/chrome-profile (постоянный статус входа)

~/.cache/chrome-devtools-mcp/cloak-profile (физически изолирован от профиля по умолчанию)

Фактический браузер

Установленный вами Google Chrome (с Web Store, расширениями, sync)

Специальная сборка Chromium (без сервисов Google, без Web Store)

Дополнительные меры на уровне навигации (действуют в обоих режимах):

  • Тихая навигация CDP — при загрузке страницы не активируются Network.enable / Debugger.enable, сбор запросов/консоли идёт только через слушатели Playwright, пока какой-либо инструмент явно не потребует CDP

  • Google Referer — new_page по умолчанию использует referer: https://www.google.com/

  • Реальный viewport — отключён фейковый viewport Playwright 1280×720 по умолчанию, браузер показывает реальный размер экрана

Когда включать --cloak: только если вышеперечисленного недостаточно и сайт блокирует по отпечатку. Подробнее в docs/cloak.md.

Список инструментов (24)

Страница и навигация

Инструмент

Описание

select_page

Список открытых страниц или выбор контекста отладки по индексу

new_page

Создание новой страницы и переход по URL

navigate_page

Навигация, назад, вперёд или обновление страницы

select_frame

Список всех frame (iframe) или выбор контекста выполнения

click_element

Строгое совпадение и клик по единственному видимому элементу в текущем frame

take_screenshot

Снимок экрана страницы

Анализ скриптов

Инструмент

Описание

list_scripts

Список всех загруженных JavaScript-скриптов на странице

get_script_source

Получение фрагмента исходного кода скрипта, поддержка диапазона строк или смещения символов

save_script_source

Сохранение полного исходного кода скрипта в локальный файл (для больших/минифицированных/WASM-файлов)

search_in_sources

Поиск строки или регулярного выражения во всех скриптах

Точки останова и управление выполнением

Инструмент

Описание

set_breakpoint_on_text

Автоматическая установка точки останова по поиску текста в коде (для минифицированного кода)

break_on_xhr

Установка точки останова XHR/Fetch по шаблону URL

remove_breakpoint

Удаление точки останова по ID, URL или всех с явным action

list_breakpoints

Список всех активных точек останова

get_paused_info

Получение статуса паузы, стека вызовов и переменных области видимости

pause_or_resume

Пауза или возобновление выполнения с явным action

step

Пошаговая отладка (over/into/out), возврат позиции и контекста исходного кода

Сеть и WebSocket

Инструмент

Описание

list_network_requests

Список сетевых запросов, просмотр деталей или экспорт сырых материалов header/body/query

clear_network_requests

Очистка собранных запросов и body cache текущей страницы после явного подтверждения

get_request_initiator

Получение JavaScript-стека вызовов сетевого запроса

get_websocket_messages

Список WebSocket-соединений, анализ паттернов сообщений или получение деталей сообщений

Состояние браузера

Инструмент

Описание

clear_site_data

Очистка cookies, origin storage и sessionStorage, связанных с текущим сайтом; возможность явно выбрать очистку глобального HTTP cache

Инструменты проверки

Инструмент

Описание

evaluate_script

Выполнение JavaScript на странице или в контексте точки останова, поддержка main world, сохранения результата и чтения одного локального входного файла

list_console_messages

Список сообщений консоли или получение деталей одного сообщения по msgid

Примеры использования

Базовый процесс JS-реверса

  1. Открыть целевую страницу

打开 https://example.com 并列出所有加载的 JS 脚本
  1. Найти целевую функцию

在所有脚本中搜索包含 "encrypt" 的代码
  1. Установить точку останова

在加密函数入口处设置断点
  1. Вызвать и проанализировать

在页面上触发操作,断点命中后检查参数、调用栈和作用域变量

Анализ протокола WebSocket

列出 WebSocket 连接,分析消息模式,查看特定类型的消息内容

Рекомендуемый агентом полный процесс захвата

Поскольку на этапе навигации CDP намеренно остаётся тихим, при первом входе на целевую страницу домены Network / Debugger не открываются сразу. Рекомендуемый процесс: сначала пройти анти-риск-контроль, затем обновить страницу для захвата:

1. new_page 打开目标页
2. 调用 list_network_requests 激活 collectors
3. navigate_page(type="reload") 刷新页面
4. 再次 list_network_requests 查看完整请求
5. 对关键 reqid 使用 outputFile 导出原始材料
1. clear_site_data(confirm=true) 清理当前站点状态
2. navigate_page(type="reload") 重新触发初始化
3. list_network_requests 找到设置 cookie 或提交 sensor 的请求
4. 导出 requestBody / responseHeaders / responseBody
5. 用 evaluate_script + localFilePath 在页面上下文中复算或验证

Параметры конфигурации

CLI остаётся минималистичным, все флаги опциональны. Для 99% сценариев достаточно настроек по умолчанию. При работе с локальными файлами рекомендуется использовать --allowedRoots для ограничения каталогов, доступных агенту на чтение/запись.

Параметр

Описание

Значение по умолчанию

--cloak

Переключение на скрытый бинарник CloakBrowser (вместо системного Chrome). Включает патчи маскировки на уровне исходного кода C++ по платформам. При первом запуске автоматически загружается бинарник ~200MB; идентичность отпечатка сохраняется в профиле. Подробнее в docs/cloak.md.

false

--isolated

Использование временного user-data-dir (cookies/localStorage не сохраняются, автоматическая очистка при закрытии)

false

--browserUrl, -u

Подключение к уже запущенному экземпляру Chrome (CDP HTTP endpoint, например http://127.0.0.1:9222). MCP автоматически определит WebSocket debugger URL. Как получить этот endpoint для локального Chrome, AdsPower, BitBrowser и др. — в docs/cdp-endpoint.md.

–

--logFile

Запись MCP-журнала отладки в обычный файл с правами 0600; подробные журналы только через DEBUG=mcp:*. Не используйте DEBUG=* — журналы протокола браузера могут раскрыть страницы, Cookie, скрипты и учётные данные.

–

--allowedRoots

Повторяемый параметр для указания локальных каталогов, доступных агенту на чтение/запись; разрешаются реальные пути, символьные ссылки за пределы отклоняются. При включении отключаются страницы браузера file:, view-source:file: и filesystem:file:. Если не указан, доступ к локальным файлам не ограничен каталогами, при запуске выводится предупреждение о безопасности.

–

Примеры конфигурации

По умолчанию — системный Chrome + постоянный статус входа (рекомендуется для большинства сценариев отладки):

{
  "mcpServers": {
    "js-reverse": {
      "command": "npx",
      "args": ["js-reverse-mcp"]
    }
  }
}

--cloak — сайты с сильной анти-парсинг-защитой (защита Cloudflare Turnstile / DataDome / FingerprintJS):

Настоятельно рекомендуется: заранее скачать бинарник (одноразово, ~30–60 секунд). Если этого не сделать, при первом запуске MCP с --cloak будет тихо загружаться ~200MB, и будет выглядеть, будто MCP завис:

npx cloakbrowser install

(пакет cloakbrowser уже установлен через optionalDependencies, эта команда просто запускает его встроенную логику загрузки бинарника, с индикатором прогресса)

{
  "mcpServers": {
    "js-reverse-cloak": {
      "command": "npx",
      "args": ["js-reverse-mcp", "--cloak"]
    }
  }
}

Два параллельных экземпляра — профили двух экземпляров MCP физически изолированы, переключение в зависимости от целевого сайта:

{
  "mcpServers": {
    "js-reverse": {
      "command": "npx",
      "args": ["js-reverse-mcp"]
    },
    "js-reverse-cloak": {
      "command": "npx",
      "args": ["js-reverse-mcp", "--cloak"]
    }
  }
}

--isolated — каждый раз новый профиль (cookies/localStorage не сохраняются):

{
  "mcpServers": {
    "js-reverse": {
      "command": "npx",
      "args": ["js-reverse-mcp", "--isolated"]
    }
  }
}

Подключение к уже запущенному Chrome / стороннему браузеру с отпечатком

--browserUrl принимает только CDP endpoint (HTTP endpoint, отвечающий на /json/version), а не приватный Local API вендора. Как получить CDP-порт для локального Chrome, AdsPower, BitBrowser и других сценариев — в отдельной документации:

📖 docs/cdp-endpoint.md — как получить CDP-порт для отладки

Кратчайший путь (локальный Chrome):

# 先关掉所有 Chrome 窗口,然后
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
{
  "mcpServers": {
    "js-reverse": {
      "command": "npx",
      "args": ["js-reverse-mcp", "--browserUrl", "http://127.0.0.1:9222"]
    }
  }
}

CDP-порт браузеров с отпечатком (AdsPower, BitBrowser и др.) меняется случайным образом при каждом запуске, поэтому сначала нужно запустить браузер через Local API вендора и извлечь порт. Шаги и примеры скриптов — в документации выше.

Устранение неполадок

Блокировка анти-парсинг-системой

Если доступ к некоторым сайтам блокируется (например, Zhihu возвращает 40362, бесконечный цикл вызова Cloudflare):

  1. Сначала попробуйте --isolated — используйте новый профиль, чтобы исключить загрязнение остаточным состоянием:

    "args": ["js-reverse-mcp", "--isolated"]
  2. Если не помогло, включите --cloak — включите патчи маскировки на уровне исходного кода по платформам:

    "args": ["js-reverse-mcp", "--cloak"]
  3. В последнюю очередь рассмотрите ручную очистку постоянного профиля (статус входа будет потерян):

    rm -rf ~/.cache/chrome-devtools-mcp/chrome-profile

Когда стоит включать --cloak, а когда нет — в docs/cloak.md.

Оценка маршрутизации агента (для мейнтейнеров)

npm run eval:routing:validate офлайн проверяет фактические tools/list MCP, server instructions и 30 контрактов выбора инструментов из evals/tool-routing.json; эта команда не обращается к модельным endpoint'ам и включена в presubmit.

Оценка реальных моделей — явный opt-in, она вызывает OpenAI-compatible Chat Completions endpoint для каждого пункта и может привести к расходам:

MCP_ROUTING_EVAL_ENDPOINT=https://api.example.com/v1/chat/completions \
MCP_ROUTING_EVAL_MODEL=model-name \
MCP_ROUTING_EVAL_API_KEY=secret \
npm run eval:routing

MCP_ROUTING_EVAL_API_KEY можно опустить для локальных endpoint'ов без аутентификации; удалённые endpoint'ы с учётными данными должны использовать HTTPS, HTTP разрешён только для loopback. Таймаут одного запроса можно настроить через MCP_ROUTING_EVAL_TIMEOUT_MS. По умолчанию требуется 100% прохождение, при сравнении моделей можно задать порог (0, 1] через MCP_ROUTING_EVAL_MIN_PASS_RATE. Оценка не выводит API key, endpoint или тело ответа об ошибке endpoint'а.

Предупреждение о безопасности

Этот инструмент раскрывает содержимое браузера MCP-клиенту, позволяя проверять, отлаживать и изменять любые данные в браузере. Не используйте его на страницах, содержащих конфиденциальную информацию.

evaluate_script.localFilePath и различные outputFile/filePath позволяют процессу MCP читать или записывать файлы на хост-машине. В производственных или общих средах следует использовать один или несколько --allowedRoots, чтобы сузить доступ до выделенной рабочей директории; при отсутствии конфигурации область доступа ничем не ограничена. После включения --allowedRoots страницы браузера file:, view-source:file: и filesystem:file: также отклоняются, что предотвращает обход границ директорий через навигацию в браузере; при необходимости отладки локальных страниц этот параметр можно не настраивать только в сеансах, где явно принимается риск раскрытия локальных файлов.

Лицензия

Apache-2.0

Available Tools

24 tools
break_on_xhrA

Sets a URL-substring breakpoint for a future XHR/Fetch when runtime request arguments, local variables, or payload construction must be inspected. For an already captured request, call get_request_initiator first because it is non-pausing; use this only when that evidence is insufficient. Set it before reproducing the user action—it does not inspect past traffic—then call get_paused_info/evaluate_script and finally step or resume. The URL pattern identifies this breakpoint for list_breakpoints and remove_breakpoint(action="remove_xhr").

Inputs: url (required). Returns: ok, data, tool, error, +1 more

clear_network_requestsA
DestructiveIdempotent

Discard captured HTTP(S) evidence for the currently selected page after confirm=true. Use this immediately before reproducing an action when a clean network capture window is needed; do not use it to reset login, cookies, cache, or other browser state. It irreversibly clears the in-memory request queue, cached response bodies, and initiator maps only. Browser cookies, HTTP cache, origin storage, console messages, and WebSocket connections/messages are unchanged; use clear_site_data for cookie and storage reset. New captures continue above the previous reqid high-water mark because reqids are never reused.

Inputs: confirm. Returns: ok, data, tool, error, +1 more

clear_site_dataA
DestructiveIdempotent

Irreversibly clear browser state after confirm=true to create a clean replay environment for the selected page. Use this before replaying login, session creation, storage initialization, or other state-dependent flows; do not use it to inspect cookies or determine which response set one. For cookie provenance, including HttpOnly, Secure, and SameSite attributes, use list_network_requests with cookieName first. Cleanup covers cookies affecting the selected page's HTTP(S) frames—including HttpOnly and Secure cookies through the browser context—persistent storage for those frame origins, and each HTTP(S) frame's sessionStorage. It does not reload the page. The browser HTTP cache is global and is preserved by default; set clearBrowserCache=true only when that wider cross-page effect is explicitly intended.

Inputs: confirm, clearBrowserCache. Returns: ok, data, tool, error, +1 more

click_elementA
Destructive

Performs one verified, auditable click in the currently selected frame. Use it when the task requires activating a known button, link, or control after selecting the correct page/frame and identifying a CSS selector; it is the preferred minimal interaction primitive over arbitrary evaluate_script code. It does not discover elements, type text, or silently guess among matches: the selector must resolve to exactly one element unless index is explicit, and the chosen element must be visible. A click can submit data, navigate, or trigger external effects, so confirm=true is required and the result reports the exact resolved element.

Inputs: selector (required), index, button, confirm, +2 more. Returns: ok, data, tool, error, +1 more

evaluate_scriptA
Destructive

Evaluates one focused JavaScript function for DOM/page state, web storage, page-defined globals, a paused-frame expression, or browser-side processing of one local file. Use it when those runtime values are the goal and no narrower evidence tool applies. Do not use document.cookie or page evaluation to investigate HttpOnly/Secure cookies, Set-Cookie provenance, or captured HTTP evidence; use list_network_requests with cookieName/reqid, and use search_in_sources/get_script_source for source discovery. While running, evaluation uses the selected frame's isolated world by default or its page main world with mainWorld=true; while paused, it always uses the chosen call frame and ignores mainWorld. Call get_paused_info before paused evaluation, then step or resume when finished. Arbitrary code can change page/external state and requires confirm=true; inline results are bounded, so use outputFile for exact large or binary results.

Inputs: function (required), confirm, mainWorld, frameIndex, +3 more. Returns: ok, data, tool, error, +1 more

get_paused_infoA
Read-only

Inspects the current call stack, source locations, and selected call-frame scopes after a code/XHR breakpoint or explicit pause has stopped execution. It neither creates a pause nor resumes one. Returned frameIndex values and callFrameIds belong only to the current pause and expire after any step or resume; use evaluate_script with frameIndex for a focused expression, then step or pause_or_resume(action="resume").

Inputs: frameIndex, includeScopes, maxScopeDepth. Returns: ok, data, tool, error, +1 more

get_request_initiatorA
Read-only

Non-pausing first action for tracing which JavaScript initiated a retained HTTP request when CDP initiator evidence was active. Pass the reqid from list_network_requests; because initiator capture starts lazily and is not retroactive, an older request may have no stack—in that case reproduce the action and inspect the new reqid, or set break_on_xhr before reproduction when runtime values are required. If the captured stack identifies the code, inspect its URL/location with get_script_source. If arguments, locals, or a dynamically built payload are still needed, use break_on_xhr, reproduce, then call get_paused_info or evaluate_script before stepping or resuming. This tool only reads retained evidence and does not pause or reproduce the request.

Inputs: requestId (required). Returns: ok, data, tool, error, +1 more

get_script_sourceA
Read-only

Reads a small source region around a search match, paused location, or known statement without executing or pausing the page. Select by URL when available because URL-backed scripts can be resolved again after navigation; use the debugger-context-scoped scriptId only for current inline/eval scripts. Use line ranges for normal source and offset/length for minified single-line bundles. For a whole, minified, or WASM source, use save_script_source; to observe runtime values next, call set_breakpoint_on_text against the original loaded source.

Inputs: url, length, offset, endLine, +2 more. Returns: ok, data, tool, error, +1 more

get_websocket_messagesA
Read-only

Inspect captured bidirectional WebSocket connections and frame payloads for the selected page. Use this for WebSocket, socket, live-update, push, streaming, or realtime message flows; use list_network_requests for ordinary HTTP/XHR/fetch traffic and WebSocket upgrade request headers. WebSocket capture starts lazily on this tool's first use and is not retroactive: if the relevant socket already connected or exchanged frames, call this tool once to initialize capture, then reload or reproduce the flow. Without wsid it lists connections so you can choose one. With wsid it lists paginated sent/received frames; add show_content=true for payload previews. With wsid and analyze=true it groups frames by payload pattern and returns group IDs and sample frame indices; then use groupId to inspect one pattern. With wsid and frameIndex it returns one retained frame's detailed payload using the stable index shown in frame tables or analysis samples.

Inputs: wsid, analyze, groupId, pageIdx, +6 more. Returns: ok, data, tool, error, +1 more

list_breakpointsA
Read-only

Inspects code and XHR/Fetch breakpoints managed by this MCP session before reproducing an action or cleaning up debugger state. Returns current code breakpointIds and the exact XHR URL patterns needed by remove_breakpoint; URL-backed definitions are restored after navigation when possible, but a rebuilt debugger session may assign new IDs. This does not show why or where execution is currently paused—use get_paused_info for the active call stack.

Inputs: pageIdx, pageSize. Returns: ok, data, tool, error, +1 more

list_console_messagesA
Read-only

Inspects console messages and uncaught page errors captured for the selected page. Use it to diagnose runtime failures, warnings, application logs, or values already emitted by page code; use search_in_sources for source text and list_network_requests for HTTP evidence instead. Without msgid it lists messages 20 per page by default, optionally filtered by type or retained navigation history. With msgid it returns one message by its stable ID for focused inspection. Capture begins when this MCP attaches and is not retroactive, so reload or reproduce code that logged before attachment.

Inputs: msgid, types, pageIdx, pageSize, +1 more. Returns: ok, data, tool, error, +1 more

list_network_requestsA

Inspect captured HTTP(S) traffic for the currently selected page. Use this for API calls, request or response headers and bodies, redirects, authentication/session flows, replay or signing inputs, and determining which response created, refreshed, rotated, overwritten, or deleted a cookie. Without reqid it lists and filters requests; with cookieName it traces exact response Set-Cookie updates oldest-first, including cookies with HttpOnly, Secure, or SameSite attributes that page JavaScript cannot fully inspect; with reqid it returns bounded request details; with reqid plus outputFile it exports exact data. To inspect complete Set-Cookie values and attributes, export outputPart="responseHeaders" for a reqid returned by cookieName mode. cookieName never searches outbound Cookie request headers. Use get_websocket_messages for WebSocket frame payloads; this tool only represents the HTTP upgrade request. Capture begins when this MCP attaches and is not retroactive, so reload or reproduce traffic that occurred earlier. Captures then survive navigation in a 5000-request FIFO queue. List and cookie-flow modes default to 20 items per page; filters combine with AND and multiple values inside one filter combine with OR.

Inputs: reqid, methods, pageIdx, pageSize, +6 more. Returns: ok, data, tool, error, +1 more

list_scriptsA
Read-only

Discovers JavaScript currently loaded in the selected debugger context—the main frame by default, or the frame chosen with select_frame. Use select_frame first for iframe-specific source/debugger work. Includes external, inline, and eval scripts in that context; if you already know a function name, endpoint, or code literal, use search_in_sources instead. Each result includes a context-scoped scriptId that expires on reload, navigation, or debugger target change and, for external scripts, a URL that is the preferred selector for get_script_source or save_script_source.

Inputs: filter, pageIdx, pageSize. Returns: ok, data, tool, error, +1 more

new_pageA

Opens a separate browser page for a URL, reusing an existing about:blank startup tab when available. Use this when the task needs another tab or should preserve the currently selected page; use navigate_page to change the URL in the existing selected page instead. It waits for DOMContentLoaded, not every background resource, and then makes the opened page the target for later tools. It preserves cookies, storage, cache, and other browser state; use clear_site_data separately when a clean replay is required.

Inputs: url (required), timeout. Returns: ok, data, tool, error, +1 more

pause_or_resumeA

Explicitly requests an immediate pause or resumes an existing paused execution; it never toggles implicitly. Use a code breakpoint or break_on_xhr instead when a specific statement/request should stop, and use get_paused_info before resuming if evidence must be collected. Resuming invalidates current callFrameIds and frame indices.

Inputs: action (required). Returns: ok, data, tool, error, +1 more

remove_breakpointA
DestructiveIdempotent

Removes a known code breakpoint, XHR/Fetch breakpoint, or every MCP-managed breakpoint after explicit confirmation. Use breakpointId from set_breakpoint_on_text/list_breakpoints for remove_code, or reuse the exact URL pattern from break_on_xhr/list_breakpoints for remove_xhr. Removal does not resume an already paused page; call pause_or_resume(action="resume") separately after inspection.

Inputs: action (required), url, confirm, breakpointId. Returns: ok, data, tool, error, +1 more

save_script_sourceA

Saves one complete JavaScript or WASM source for local inspection when an inline snippet is insufficient, especially for large or minified bundles. Prefer get_script_source for a small known region and search_in_sources to locate text across loaded scripts first. With format=true, destinations using a supported JavaScript/TypeScript extension are formatted by default; other extensions preserve raw source, and formatted line numbers may differ from the live page. Use distinctive text plus the original URL with set_breakpoint_on_text for runtime debugging. The returned filename is the resolved local path, while scriptId remains scoped to the current debugger context.

Inputs: filePath (required), url, format, scriptId, +1 more. Returns: ok, data, tool, error, +1 more

search_in_sourcesA
Read-only

Finds a known function name, endpoint, string literal, token, or code pattern in JavaScript loaded by the selected debugger context—the main frame by default, or the frame chosen with select_frame. It searches external, inline/eval, and minified sources in that context without executing or pausing the page, returning 1-based lines plus context-scoped scriptIds; URLs are the preferred selectors for URL-backed matches. Use select_frame first for iframe-specific source work, get_script_source for nearby context, save_script_source for a whole bundle, or set_breakpoint_on_text when runtime values are needed. For a known captured request, prefer get_request_initiator before a broad source search.

Inputs: query (required), isRegex, urlFilter, maxResults, +3 more. Returns: ok, data, tool, error, +1 more

select_frameA

Lists or selects frames, including iframes, within the current page. Use it when the target element, page-defined global, script, or execution context may live in an iframe: first list frames, then pass frameIdx before click_element or evaluate_script. Omitting frameIdx lists 20 frames per page without changing context; passing frameIdx changes the shared frame target, with 0 restoring the main frame. It does not switch browser tabs or navigate—use select_page or navigate_page for those actions—and listPageIdx only paginates this listing.

Inputs: frameIdx, pageSize, listPageIdx. Returns: ok, data, tool, error, +1 more

select_pageA

Lists or selects open browser pages. Use it without pageIdx to identify the active page or choose the correct tab before inspecting network traffic, scripts, frames, or console output; pass pageIdx to make one listed page the shared target for later tools. It does not navigate or create pages: use navigate_page to change the selected page's URL and new_page when a separate tab is required. listPageIdx only paginates the page listing and never changes selection.

Inputs: pageIdx, pageSize, listPageIdx. Returns: ok, data, tool, error, +1 more

set_breakpoint_on_textA

Sets a restorable URL-backed breakpoint when distinctive code text is known and its runtime values must be observed. Call it directly when the user already supplies precise text plus any URL/occurrence disambiguation; use search_in_sources/get_script_source first only when the location is unknown or ambiguous. For an API with no known code location, start with list_network_requests and get_request_initiator or use break_on_xhr. On a hit, call get_paused_info, optionally evaluate_script, then step or resume. Returns the current breakpointId for remove_breakpoint; list breakpoints again after a rebuilt debugger session, and note that unnamed inline/eval scripts cannot use this URL breakpoint.

Inputs: text (required), condition, urlFilter, occurrence. Returns: ok, data, tool, error, +1 more

stepA

Advances JavaScript execution by one debugger operation from an existing pause and returns the next stopped call frame with concise source context. Use after get_paused_info or evaluate_script when control flow still needs tracing; it cannot start from running execution. Each advance invalidates prior callFrameIds, so inspect the new pause again as needed, then use pause_or_resume(action="resume") to finish.

Inputs: direction (required). Returns: ok, data, tool, error, +1 more

take_screenshotA

Captures the visual state of the currently selected page. Use it to verify page layout, visible UI state, selector targets, in-page dialogs/modals, or the effect of a navigation/click; it is not a substitute for DOM values, network evidence, or script inspection. By default it returns the visible viewport, while fullPage=true captures the whole document; oversized captures may be saved as a temporary artifact instead of attached. Pass filePath for a reusable local artifact; existing files require confirmOverwrite=true and remain subject to --allowedRoots.

Inputs: format, quality, filePath, fullPage, +1 more. Returns: ok, data, tool, error, +1 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 24 tools

    Disambiguation3/5

    Tools are organized around specific debugging actions, but many overlap in purpose (e.g., multiple breakpoint and pause/resume tools, multiple request inspection tools). While descriptions are precise, an agent could easily confuse which tool to use for a given step, especially with 24 tools.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern in snake_case (e.g., clear_network_requests, click_element). A few deviate slightly (e.g., 'break_on_xhr', 'get_paused_info'), but overall the naming is predictable and readable.

    Tool Count3/5

    24 tools is on the higher side for a focused reverse engineering server. The set is comprehensive but some tools could be merged (e.g., clear_network_requests and clear_site_data are distinct but very similar). Still, each tool has a clear role, so the count is borderline but acceptable.

    Completeness4/5

    The tool surface covers all major aspects of JavaScript reverse engineering: network interception, source inspection, breakpoint management, page control, and evaluation. Minor gaps exist (e.g., no direct DOM query tool), but the set is largely complete for its purpose.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to debug frontend applications by providing direct access to browser DevTools, React state, DOM inspection, and runtime debugging capabilities. Bridges the gap between AI and complex web applications for autonomous debugging and issue resolution.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to debug JavaScript and TypeScript applications by connecting to Chrome DevTools Protocol-compatible debuggers, allowing them to set breakpoints, step through code, inspect variables, and evaluate expressions with full source map support.
      18
      2
      Apache 2.0