Logo apktool-mcp-server

apktool-mcp-server

Cộng đồng
zinja-coder

A MCP Server for APK Tool (Part of Android Reverse Engineering MCP Suites)

Nhà phát hànhzinja-coder
Kho mãapktool-mcp-server
Ngôn ngữPython
Bản fork
67
Sao
655
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    apktool-mcp-server cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    655 sao và 67 bản fork từ kho mã được liên kết.

apktool-mcp-server (Part of Zin's Reverse Engineering MCP Suite)

⚡ Fully automated MCP server built on top of apktool to analyze Android APKs using LLMs like Claude — uncover vulnerabilities, parse manifests, and reverse engineer effortlessly.

GitHub contributors apktool-mcp-server GitHub all releases GitHub release (latest by SemVer) Latest release Python 3.10+ License

Image generated using AI tools.


🤖 What is apktool-mcp-server?

apktool-mcp-server is a MCP server for the Apk Tool that integrates directly with Model Context Protocol (MCP) to provide live reverse engineering support with LLMs like Claude.

Think: "Decompile → Context-Aware Code Review → AI Recommendations" — all in real time.

Watch the demo!

https://github.com/user-attachments/assets/d50251b8-6b1c-4341-b18e-ae54eb24a847

  • Solving the CTFs

https://github.com/user-attachments/assets/c783a604-a636-4e70-9fa8-37e3d219b20b

Other projects in Zin MCP Suite

Current MCP Tools

The following MCP tools are available:

  • build_apk() — Build an APK from a decoded APKTool Project.
  • get_manifest() — Get the AndroidManifest.xml content from a decoded APK project.
  • get_apktool_yml() — Get apktool.yml information from a decoded APK project.
  • list_smali_directories() — List all smali directories in a project.
  • list_smali_files() — List smali files in a specific smali directory, optinally filtered by package prefix.
  • get_smali_file() — Get content of a specific smali file by class name.
  • modify_smali_file() — Modify the content of a specific smali file.
  • list_resources() — List resources in a project, optionally filtered by resource type.
  • get_resource_file() — Get Content of a specific resource file.
  • modify_resource_file() — Modify the content of a specific resource file.
  • search_in_file() — Search for a pattern in files with specified extensions.
  • clean_project() — Clean a project directory to prepare for rebuilding.
  • decode_apk() — Decode an APK file using APKTool, extracting resources and smali code.

🗒️ Sample Prompts

🔍 Basic Code Understanding

  • “List all smali directories for the dvac project.”

  • “Show me all the smali files under the package prefix com.vulnerable.component in the dvac project.”

  • “Get the smali code for the class com.vulnerable.component.MainActivity.”

  • “Compare MainActivity.smali with its previous version and show differences.”

  • “Search for usage of startActivity in smali files of dvac project.”

🛡️ Vulnerability Detection

  • “Analyze declared permissions in the dvac AndroidManifest.xml and flag dangerous ones.”

  • “Search for hardcoded URLs or IPs in all .xml and .smali files in the project.”

  • “Find all uses of PendingIntent.getActivity in smali files.”

  • “Check for exported activities or receivers in dvac’s AndroidManifest.xml.”

  • “List all smali files that access android.permission.SEND_SMS or READ_CONTACTS.”

🛠️ Reverse Engineering Helpers

  • “Decode this APK: dvac.apk and create a project called dvac.”

  • “Create a new APKTool project called test-harness.”

  • “Clean the dvac project before rebuild.”

  • “Extract DEX files from dvac project for external analysis.”

  • “Modify MainActivity.smali to insert a log line at the beginning of onCreate().”

📦 Static Analysis

  • “Get the complete AndroidManifest.xml from dvac project.”

  • “Show the contents of apktool.yml for the dvac project.”

  • “List all resource files of type layout.”

  • “Search for the word password in all resource and smali files.”

  • “Check which permissions are used and compare them against typical over-permissioning risks.”

🤖 AI Code Modification

  • “Modify the onCreate() method in MainActivity.smali to add a toast message.”

  • “Replace all http:// links with https:// in strings.xml.”

  • “Add the android:exported=false attribute to all activities in the AndroidManifest.xml.”

  • “Patch the method validateLogin in LoginManager.smali to always return true.”

  • “Add logging statements to every method in MainActivity.smali.”

📄 Documentation & Metadata

  • “List all decoded APKTool projects in the workspace.”

  • “Show me the apktool.yml config to review the version, original APK metadata, and compression settings.”

  • “Get all available Android devices connected via ADB. (To be migrated to ADB MCP Server.)”

  • “Get metadata about the project dvac from its apktool.yml.”

  • “Check which APKTool version is currently installed on the server.”


🛠️ Getting Started

1. Downlaod from Releases: https://github.com/zinja-coder/apktool-mcp-server/releases

bash
# 0. Download and install apktool
https://apktool.org/docs/install

# 1. Test whether apktool has been correctly configured in the environment variables
$ apktool -version

# 2. Download the apktool-mcp-server-<version>.zip
https://github.com/zinja-coder/apktool-mcp-server/releases

# 3. 
unzip apktool-mcp-server-<version>.zip

├apktool-mcp-server/
  ├── apktool_mcp_server.py
  ├── requirements.txt
  ├── README.md
  ├── LICENSE

# 4. Navigate to apktool-mcp-server directory
cd apktool-mcp-server

# 5. This project uses uv - https://github.com/astral-sh/uv instead of pip for dependency management.
    ## a. Install uv (if you dont have it yet)
curl -LsSf https://astral.sh/uv/install.sh | sh
    ## b. OPTIONAL, if for any reasons, you get dependecy errors in apktool-mcp-server, Set up the environment
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
    ## c. OPTIONAL Install dependencies
uv pip install httpx fastmcp

# The setup for apktool-mcp-server is done.

2. Running on Local LLM Using Ollama and Zin MCP Client - Recommended

⚡ Lightweight, Fast, Simple, CLI-Based MCP Client for STDIO MCP Servers, to fill the gap and provide bridge between your local LLMs running Ollama and MCP Servers.

Check Now: https://github.com/zinja-coder/zin-mcp-client

Demo: Coming soon...

🤖 3. Claude Desktop Setup

Make sure Claude Desktop is running with MCP enabled.

For instance, I have used following for Kali Linux: https://github.com/aaddrick/claude-desktop-debian

Configure and add MCP server to LLM file:

bash
nano ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

And following content in it:

json
{
    "mcpServers": {
        "apktool-mcp-server": {
            "command": "/<path>/<to>/uv", 
            "args": [
                "--directory",
                "</PATH/TO/>apktool-mcp-server/",
                "run",
                "apktool_mcp_server.py"
            ]
        }
    }
}

Replace:

  • path/to/uv with the actual path to your uv executable
  • path/to/apktool-mcp-server with the absolute path to where you cloned this repository

Then, navigate code and interact via real-time code review prompts using the built-in integration.

4. Cherry Studio Setup

If you want to configure the MCP tool in Cherry Studio, you can refer to the following configuration.

  • Type: stdio
  • command: uv
  • argument:
bash
--directory
path/to/apktool-mcp-server
run
apktool_mcp_server.py
  • path/to/apktool-mcp-server with the absolute path to where you cloned this repository

To report bugs, issues, feature suggestion, Performance issue, general question, Documentation issue.

  • Kindly open an issue with respective template.

  • Tested on Claude Desktop Client, support for other AI will be tested soon!

🙏 Credits

This project is a MCP Server for Apktool, an amazing open-source Android reverse engineering tool created and maintained by @iBotPeaches. All core APK decoding and resource processing logic belongs to them. I have only extended it to support my MCP server with AI capabilities.

📎 Original README (Apktool)

The original README.md from Apktool is included here in this repository for reference and credit.

Also huge thanks to @aaddrick for developing Claude desktop for Debian based Linux.

And in last, thanks to @anthropics for developing the Model Context Protocol and @FastMCP team.

And all open source project maintainers and contributos which provies libraries and dependencies to make project like this possible.

📄 License

apktool-mcp-server and all related projects inherits the Apache 2.0

⚖️ Legal Warning

Disclaimer

The tools apktool-mcp-server and all related tools under this project are intended strictly for educational, research, and ethical security assessment purposes. They are provided "as-is" without any warranties, expressed or implied. Users are solely responsible for ensuring that their use of these tools complies with all applicable laws, regulations, and ethical guidelines.

By using apktool-mcp-server, you agree to use them only in environments you are authorized to test, such as applications you own or have explicit permission to analyze. Any misuse of these tools for unauthorized reverse engineering, infringement of intellectual property rights, or malicious activity is strictly prohibited.

The developers of apktool-mcp-server shall not be held liable for any damage, data loss, legal consequences, or other consequences resulting from the use or misuse of these tools. Users assume full responsibility for their actions and any impact caused by their usage.

Use responsibly. Respect intellectual property. Follow ethical hacking practices.


🙌 Contribute or Support

Contributing

Contributions Welcome

  • Found it useful? Give it a ⭐️
  • Got ideas? Open an issue or submit a PR
  • Built something on top? DM me or mention me — I’ll add it to the README!

Audited and Received Assessment Badge

MseeP.ai Security Assessment Badge

Thank you Mseep.net for auditing and providing Assessment Badge.

Built with ❤️ for the reverse engineering and AI communities.

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "zinja-coder-apktool-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Dùng MCP apktool-mcp-server với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối apktool-mcp-server, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm apktool-mcp-server làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của apktool-mcp-server.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "zinja-coder-apktool-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "apktool-mcp-server"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của apktool-mcp-server, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của apktool-mcp-server.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng apktool-mcp-server giúp tôi làm việc này không?
apktool-mcp-server
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng apktool-mcp-server.

Câu hỏi thường gặp

Máy chủ MCP apktool-mcp-server dùng để làm gì?

apktool-mcp-server là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP apktool-mcp-server với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng apktool-mcp-server với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP apktool-mcp-server với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối apktool-mcp-server, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP apktool-mcp-server với TypingMind?

apktool-mcp-server hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP apktool-mcp-server cung cấp những công cụ nào trong TypingMind?

apktool-mcp-server cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP apktool-mcp-server không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu apktool-mcp-server yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇