Utilizes Google's Gemini models to support AI-driven code analysis, risk assessment, and script deobfuscation workflows.
Directly interfaces with Google Chrome via the remote debugging protocol to enable browser automation, breakpoint management, and real-time JavaScript hook injection.
Connects to OpenAI's models to facilitate AI-powered script analysis and understanding of obfuscated code during reverse engineering tasks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@JS Reverse MCPAnalyze this page to find and deobfuscate the API signing logic"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JS Reverse MCP
一个面向 JavaScript 逆向分析 的 MCP 服务器。
让 Claude/Codex/Cursor 等 AI 客户端直接调用浏览器调试能力,完成脚本定位、断点调试、Hook 采样、网络链路分析、混淆还原和风险评估。
这个项目解决什么问题
在传统逆向流程里,你通常要在 DevTools、脚本文件、抓包工具之间来回切换。js-reverse-mcp 把这些能力统一成 MCP 工具,让 AI 可以按步骤执行完整分析链路:
打开页面并收集脚本
搜索目标函数/关键字符串
自动注入 Hook 并采样请求
分析签名链路、加密算法、调用栈
输出可执行的下一步动作(而不是只给概念)
核心能力
脚本与源码分析:
list_scripts、get_script_source、find_in_script、search_in_scripts断点与执行控制:
set_breakpoint、set_breakpoint_on_text、resume、pause、step_over/into/outHook 与运行时观测:
create_hook、inject_hook、get_hook_data、hook_function、trace_function网络与请求链路:
list_network_requests、get_network_request、get_request_initiator、break_on_xhr一体化逆向工作流:
analyze_target、collect_code、understand_code、deobfuscate_code、risk_panel页面自动化与 DOM:
navigate_page、query_dom、click_element、type_text、take_screenshot反检测能力:
inject_stealth、list_stealth_presets、set_user_agent
完整参数说明见 docs/tool-reference.md。
快速开始(3 分钟)
1) 安装依赖并构建
构建完成后入口文件为:build/src/index.js
2) 本地启动(可选)
3) 配置 MCP 客户端
通用 MCP 配置如下:
请使用绝对路径,避免客户端工作目录变化导致找不到入口文件。
4) 连接“已开启”的 Chrome(远程调试)
如果你已经在本机开了一个 Chrome,并希望 MCP 直接接管它,请按下面做。
4.1 启动 Chrome 并打开 remote debugging
Windows:
macOS:
Linux:
4.2 在 MCP 里连接这个浏览器(两种方式)
方式 A: 通过 browserUrl(最简单)
方式 B: 通过 wsEndpoint(更精确)
先取 WS 地址:
读取返回里的
webSocketDebuggerUrl,再放进 MCP:
注意:
--browserUrl与--wsEndpoint二选一,不要同时配置如果端口不是
9222,把所有示例里的端口替换成你的实际端口已连接远程 Chrome 时,不要再强制本服务自行启动另一个浏览器实例
常见客户端接入
Claude Code
Cursor
Settings -> MCP -> New MCP Server,填入:
Command:
nodeArgs:
[/ABSOLUTE/PATH/js-reverse-mcp-main/build/src/index.js]
Codex / 通用 MCP 客户端
使用上面的通用 JSON 即可。
客户端接入说明统一维护在本 README,不再单独拆分到 docs。
环境变量配置
复制示例配置:
AI Provider(可选)
说明:
不配置 AI 也可使用非 AI 工具(调试/Hook/网络/页面控制)
配置 AI 后可用
understand_code、deobfuscate_code、risk_panel等增强能力
浏览器与远程调试(可选)
调试日志(可选)
推荐逆向工作流
工作流 A:快速定位签名逻辑
new_page打开目标站点analyze_target一键执行采集+分析+关联查看
priorityTargets/requestFingerprints对高优先级函数调用
search_in_scripts+understand_code对可疑代码执行
deobfuscate_code
工作流 B:请求参数动态追踪
create_hook+inject_hook(fetch/xhr/websocket)在页面触发下单/登录等关键动作
get_hook_data拉取记录并对比参数变化必要时
break_on_xhr+get_request_initiator看调用栈
工作流 C:风险评估与报告
collect_code收集高优先级脚本risk_panel汇总安全风险与密码学风险export_session_report导出分析报告(JSON/Markdown)
开发与测试
文档索引
逆向任务索引(按目标查工具):
docs/reverse-task-index.md工具参数总表:
docs/tool-reference.mdJSHook 使用示例:
docs/jshook-examples.md常见问题排查:
docs/jshook-troubleshooting.mdGemini Provider 说明:
docs/gemini-provider-implementation.md
故障排查
Cannot find module ... build/src/index.js先执行
npm run build确认文件存在:
build/src/index.js
Node 版本不兼容
本项目要求:
^20.19.0 || ^22.12.0 || >=23
浏览器连接失败
检查 Chrome 可用性和
REMOTE_DEBUGGING_URL/PORT
AI 调用失败
检查
DEFAULT_LLM_PROVIDER与对应 API Key/CLI 路径
参考项目
https://github.com/wuji66dde/jshook-skill
https://github.com/zhizhuodemao/js-reverse-mcp
License
Apache-2.0