zinja-coder/apktool-mcp-server

πŸ”’ Security
0 Views
0 Installs

🐍 🏠 - APKTool MCP Server is a MCP server for the Apk Tool to provide automation in reverse engineering of Android APKs.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "zinja-coder-apktool-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "zinja-coder-apktool-mcp-server"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

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

banner

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

# 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:

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:

{
    "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:
--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.

Related MCP Servers

13bm/GhidraMCP

🐍 β˜• 🏠 - MCP server for integrating Ghidra with AI assistants. This plugin enables binary analysis, providing tools for function inspection, decompilation, memory exploration, and import/export analysis via the Model Context Protocol.

πŸ”’ Security1 views
123Ergo/unphurl-mcp

πŸ“‡ ☁️ - URL intelligence for AI agents. 13 tools for security signals and data quality: redirect behaviour, brand impersonation detection, domain age, SSL validation, parked detection, URL structural analysis, DNS enrichment.

πŸ”’ Security0 views
82ch/MCP-Dandan

🐍 πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Real-time security framework for MCP servers that detects and blocks malicious AI agent behavior by analyzing tool call patterns and intent across multiple threat detection engines.

πŸ”’ Security0 views
9hannahnine-jpg/arc-gate-mcp

🐍 - Runtime governance for MCP tool calls. Blocks prompt injection and capability abuse before tool results reach your agent.

πŸ”’ Security0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.