Skip to main content
Glama

APK-MCP — Windows-First APK Reverse Engineering MCP Server

APK-MCP Architecture

APK-MCP provides AI agents (Claude Desktop, Cursor, VSCode MCP extensions, etc.) with a unified Model Context Protocol (MCP) interface for Android APK reverse engineering, metadata analysis, Smali/resource editing, rebuilding, alignment, signing, verification, and ADB device testing.

No manual launching of JADX, Apktool, APKEditor, ADB, or signing utilities is required.


Quick Start (Windows One-Command Setup)

git clone https://github.com/tkb-bit/APK-MCP.git
cd APK-MCP
.\install.ps1

Or using the CLI launcher:

.\apk-mcp.ps1 setup

Related MCP server: DeepADB

🤖 AI Agent Master Prompt (Copy & Paste to your AI Client)

Paste this prompt to your AI Client (Claude, Cursor, Cline, ChatGPT) once connected to APK-MCP so it automatically understands your environment and toolset:

You are connected to APK-MCP (Android APK Reverse Engineering & Modification Server).

YOUR AUTOMATED WORKFLOW & ZERO-FRICTION EXECUTION INSTRUCTIONS:
1. Fast APK Discovery & Single-Call Goal Analysis:
   - When the user mentions an APK name and a goal (e.g., "analyze subwaysurfers.apk for currency" or "find api keys in app-debug.apk"), AUTOMATICALLY call `apk_quick_analyze(apk_path="<apk_name>", goal="<goal>", mode="fast")` FIRST.
   - Do NOT search C:\, D:\, or disk drives manually. All APKs reside in `%USERPROFILE%\.apk-mcp\apks\`.

2. Goal-Driven Preferred Tools (Reduces 20 tool calls into 1-2 calls):
   - Single Entry Analysis: `apk_quick_analyze(apk_path, goal="currency|security|storage|network|overview", mode="fast"|"standard"|"deep")`
   - Target Investigation: `apk_investigate(goal, target="coin")`
   - Universal Parallel Search: `apk_search(query="coin", scope="all"|"native"|"il2cpp"|"dex"|"smali"|"resources")`
   - Parallel Batch Searches: `apk_search_batch(["coin", "currency", "wallet", "balance"])`
   - Engine Detection: `apk_detect_engine()` (Detects Unity IL2CPP, Mono, Flutter, React Native, Unreal, Android Native)
   - Persistent Index: `apk_index_build()`, `apk_index_status()` (SHA256 cached analysis)

3. Virtual Device & Live Verification (CRITICAL FOR BUG-FREE MODS):
   - Always test patched APKs on the connected Virtual Phone (`VirtualPhone_D`).
   - All-in-One Test Run: `device_test_run(package_name="com.kiloo.subwaysurf")` — Installs, launches app, monitors logcat, detects crashes/SIGSEGV, and captures a screenshot!
   - Crash Debugging: If an app closes or fails after patching, call `device_crash_log(package_name="...")` immediately to pull FATAL EXCEPTION stack traces, native SIGSEGV errors, or Unity log errors to diagnose and fix the patch.

4. Technology-Specific Execution Rules:
   - Unity IL2CPP Games: Call `il2cpp_dump()`, search with `il2cpp_search(query="Coin")`, patch with `native_patch_offset()`, then `rebuild_and_sign()`. Test on Virtual Phone using `device_test_run()`. Do NOT launch Ghidra unless metadata resolution fails!
   - Java/Kotlin Android Apps: Use `apk_search(query)` or `code_search_batch()`.
   - Native ELF Patching: Use `native_patch_offset(lib_name, offset_hex, hex_bytes)` to patch machine opcodes directly.

5. Guidelines for High-Efficiency Operations:
   - Avoid duplicate searches or single-keyword iterations. Use `apk_search_batch` for multiple terms.
   - Output signed APKs appear in: `%USERPROFILE%\.apk-mcp\output\`

Or get it anytime from the terminal:

python -m apk_mcp.cli prompt

User Workflow

  1. Install APK-MCP with .\install.ps1

  2. Connect APK-MCP to your MCP-compatible AI client

  3. Put target .apk files into %USERPROFILE%\.apk-mcp\apks\

  4. Tell your AI what to analyze or modify (e.g. "Analyze app.apk and change the app label to My Test App")

  5. AI automatically uses apk-mcp tools lazily and in isolated transactions

  6. The modified, aligned, signed, and verified APK appears in %USERPROFILE%\.apk-mcp\output\


Architecture Overview

       ┌───────────────────────┐
       │     AI Agent (MCP)    │
       └───────────┬───────────┘
                   │
       ┌───────────▼───────────┐
       │        APK-MCP        │
       │  Orchestration Server │
       └───────────┬───────────┘
                   │
 ┌─────────┬───────┼───────┬─────────┐
 │         │       │       │         │
JADX    Apktool  AAPT2  Signer    ADB

MCP Tools Offered

APK-MCP exposes 40+ granular and high-level tools grouped by category:

  • Project Tools: project.create, project.open, project.close, project.status, project.snapshot

  • APK Inspection: apk.inspect, apk.metadata, apk.list_files, apk.read_file, apk.extract

  • Code Analysis: code.search, code.list_classes, code.get_class, code.get_method, code.find_references

  • Smali Editing: smali.search, smali.get_class, smali.get_method, smali.edit_method

  • Manifest Editing: manifest.get, manifest.permissions, manifest.components, manifest.edit

  • Resource Management: resource.list, resource.get, resource.search, resource.edit, resource.replace

  • Build & Sign: build.validate, build_apk, sign.sign, sign.verify

  • Device & Debugging: device.list, device.install, device.launch, device.logcat, device.screenshot

  • High-Level Workflows: analyze_apk, find_feature, modify_app_name, rebuild_and_sign


Documentation


License

MIT License.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides a one-stop automated solution for Android APK security analysis by integrating tools like JEB, JADX, APKTOOL, FlowDroid, and MobSF into unified MCP standard API interfaces.
    11
  • A
    license
    B
    quality
    A
    maintenance
    A comprehensive MCP server that enables AI agents to interact with Android devices through Android Debug Bridge (ADB), offering 198 tools for device control, app management, diagnostics, and more.
    100
    75
    15
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables MCP-compatible agents to control an Android device over the network via ADB, providing tools for shell commands, screen capture, UI inspection, file operations, and input simulation.
    13
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A comprehensive MCP server for Android Debug Bridge, enabling AI agents to control Android devices through structured tools like launching apps, UI automation, file operations, and log capture.
    1
    MIT

Latest Blog Posts

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/tkb-bit/APK-MCP'

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