home / mcp / js reverse mcp server

JS Reverse MCP Server

Provides debugging and analysis tools for JavaScript in webpages, including script inspection, breakpoints, and runtime checks.

Installation
Add the following to your MCP client configuration file.

Configuration

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

JS Reverse MCP lets your AI coding assistants debug and analyze JavaScript running in web pages. It provides script inspection, breakpoints, function tracing, runtime checks, network analysis, and event monitoring to help you understand and debug complex web code with an MCP client.

How to use

Set up the MCP server in your client and connect to a page you want to inspect. You can switch between pages, list loaded scripts, and locate the exact source even in minified code. Define breakpoints on specific URLs or texts, then pause execution to inspect call stacks and scope variables. Trace functions, hook internal modules, and step through code to see how data flows through your page.

How to install

Prerequisites: you need Node.js version 20.19 or newer, Google Chrome Stable, and Git.

1) Clone the MCP server repository and move into the project directory.

2) Install dependencies.

3) Build the project.

Available tools

list_scripts

List all JavaScript scripts loaded on the page.

get_script_source

Fetch the source of a script, with support for line ranges or character offsets (useful for minified files).

find_in_script

Search a script for text and return exact line and column numbers.

search_in_sources

Search across all loaded scripts for a string or regular expression.

set_breakpoint

Set a breakpoint at a specific URL and line number.

set_breakpoint_on_text

Automatically set a breakpoint by searching for code text (useful for minified code).

remove_breakpoint

Remove an active breakpoint.

list_breakpoints

List all currently active breakpoints.

get_paused_info

Get current pause status, stack trace, and scope variables.

resume

Resume execution after a pause.

pause

Pause execution.

step_over

Step over the next function call.

step_into

Step into the next function call.

step_out

Step out of the current function.

evaluate_on_callframe

Evaluate an expression in the context of the paused call frame.

hook_function

Hook a global function or object method and record calls and return values.

unhook_function

Remove a function hook.

list_hooks

List all active function hooks.

trace_function

Trace arbitrary function calls, including internal module functions, with conditional breakpoints.

get_request_initiator

Get the JavaScript call stack that initiated a network request.

break_on_xhr

Set breakpoints on XHR/fetch requests.

remove_xhr_breakpoint

Remove an XHR breakpoint.

inspect_object

Inspect a JavaScript object deeply.

get_storage

Retrieve cookies, localStorage, and sessionStorage.

monitor_events

Monitor DOM events on elements or the window.

stop_monitor

Stop event monitoring.

list_pages

List open pages in the browser.

select_page

Choose a page as the debugging context.

new_page

Create a new page and navigate to a URL.

navigate_page

Navigate the current page.

take_screenshot

Capture a screenshot of the page.

take_snapshot

Obtain a DOM snapshot of the page.

evaluate_script

Execute JavaScript within the page context.

list_console_messages

Retrieve console messages from the page.

list_network_requests

List network requests captured during the session.

get_network_request

Get details and response body of a network request.