Skip to main content
Glama

Jadx MCP Server

⚙️ Jadx MCP 插件 — 通过 MCP 访问 Claude 反编译器

该项目提供了一个用Java编写的Jadx插件,该插件通过 HTTP 公开 Jadx API ,从而能够通过模型上下文协议 (MCP)Claude等 MCP 客户端进行实时交互。一个轻量级的 Python FastMCP适配器充当了 Claude 和该插件之间的桥梁。这实现了逆向工程工作流程的智能导航和自动化,非常适合用于 AI 辅助的 Android 应用安全分析。


🧰 设置说明

# Clone this repository git clone https://github.com/mobilehackinglab/jadx-mcp-plugin.git cd jadx-mcp-plugin # Create and activate a virtual environment python3 -m venv venv # Activate: source venv/bin/activate # Linux/Mac .\venv\Scripts\activate # Windows

安装 Python 依赖项

pip install -r requirements.txt

🧠 设置 Claude MCP 客户端集成

要在 Claude Desktop 中使用此适配器,请转到File -> Settings -> Developer -> Edit Config -> claude_desktop_config.json并添加一个指向 venv 中的 Python 可执行文件的 MCP 服务器(以防止依赖问题)以及以下示例的完整适配器路径:

视窗:

{ "mcpServers": { "Jadx MCP Server": { "command": "C:\\Workset\\jadx-mcp-plugin\\venv\\Scripts\\python.exe", "args": ["C:\\Workset\\jadx-mcp-plugin\\fastmcp_adapter.py"] } } }

MacOS / Linux:

{ "mcpServers": { "Jadx MCP Server": { "command": "/Users/yourname/jadx-mcp-plugin/venv/bin/python", "args": ["/Users/yourname/jadx-mcp-plugin/fastmcp_adapter.py"] } } }

编辑配置后,请务必重启(退出)Claude。重启后,它应该如下所示:

✅ 使用流程

  1. 使用放置在其plugins/文件夹中的版本中的最新插件 JAR 打开Jadx ,或通过Plugins -> install plugin加载它。
  2. 加载 APK 或 DEX 文件
  3. (可选)您可以通过使用以下命令启动 Jadx 来指定 HTTP 接口地址:
    jadx-gui -Pjadx-mcp.http-interface=http://localhost:8085
    如果您想更改默认主机/端口( http://localhost:8085 ),这将很有用。

    **注意:**如果您在此处更改接口地址,请确保也更新fastmcp_adapter.py中的相应 URL 以匹配。

  4. Claude 将检测并激活 Jadx MCP 服务器工具。
  5. 您现在可以列出类、获取源、检查方法/字段并实时提取代码。

🧪 提供的工具

工具描述
list_all_classes获取所有反编译的类名
search_class_by_name查找与字符串匹配的类
get_class_source获取给定类的完整源代码
search_method_by_name查找与字符串匹配的方法
get_methods_of_class列出类中所有方法的名称
get_fields_of_class列出类中的所有字段名称
get_method_code提取方法的反编译代码

🛠 开发

☕ Java 插件

Java 插件位于:

plugin/src/main/java/com/mobilehackinglab/jadxplugin/McpPlugin.java

它使用JadxPlugin API( jadx.api.* )来:

  • 加载反编译的类和方法
  • 通过嵌入式 HTTP 服务器提供结构化数据
  • 响应/invoke/tools端点
🚀 使用 Gradle Tasks 实现自动安装

您可以使用以下 Gradle 任务一步构建并安装插件:

./gradlew installPlugin

这使用了jadx plugins CLI。请确保 Jadx 已安装并位于PATH中。

对于其他与插件相关的任务(卸载、启用/禁用),请参阅plugin/build.gradle中的任务定义。

🔧 手动安装

要构建插件:

./gradlew build # Output: plugin/build/libs/jadx-mcp-plugin-<version>.jar

使用jadx plugins CLI 安装插件 JAR:

jadx plugins --install-jar path/to/jadx-mcp-plugin-<version>.jar

或者,将构建的.jar文件放入 Jadx plugins/文件夹中,通常位于: ~/.jadx/plugins/

如果您手动放置 JAR,您还需要通过 Jadx GUI 或运行以下命令启用该插件:

jadx plugins --enable jadx-mcp

Python FastMCP 适配器

适配器文件是:

fastmcp_adapter.py

它将 Claude 的 MCP 工具调用转换为 HTTP POST 请求,并发送到正在运行的 Jadx 插件服务器。启动 Claude**之前,**请确保 Jadx 已打开。


🤝 贡献

欢迎 PR、功能请求和工具扩展!
该项目由Mobile Hacking Lab维护。


🧩 积分

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

通过 HTTP 公开 Jadx 反编译器 API 的服务器,使 Claude 能够与反编译的 Java/Android 代码交互以列出类、获取源代码、检查方法/字段并实时提取代码。

  1. 🧰 设置说明
    1. 安装 Python 依赖项
      1. 🧠 设置 Claude MCP 客户端集成
        1. ✅ 使用流程
          1. 🧪 提供的工具
            1. 🛠 开发
              1. ☕ Java 插件
              2. Python FastMCP 适配器
            2. 🤝 贡献
              1. 🧩 积分

                Related MCP Servers

                • A
                  security
                  F
                  license
                  A
                  quality
                  Provides a secure, isolated JavaScript execution environment with configurable time and memory limits for safely running code from Claude.
                  Last updated -
                  1
                  2
                  4
                  JavaScript
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  A secure JavaScript REPL server that enables executing code snippets in a sandboxed environment with memory protection, timeout handling, and comprehensive error reporting.
                  Last updated -
                  2
                  150
                  7
                  JavaScript
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A server that enables seamless integration of Binary Ninja's reverse engineering capabilities with LLM assistance, allowing AI tools like Claude to interact with binary analysis features in real-time.
                  Last updated -
                  42
                  Python
                  GPL 3.0
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables Large Language Models to interact with Binary Ninja for reverse engineering tasks like viewing assembly code, decompiled code, renaming functions, and adding comments.
                  Last updated -
                  2
                  Python
                  MIT License
                  • Linux
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobilehackinglab/jadx-mcp-plugin'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server