Token导航 LogoToken导航TokenDH.com
Apktool MCP logo
安全风控stdio官方级别未说明来源级核验

Apktool MCP

MCP Server

一个基于Apktool的MCP服务器,提供Android APK分析、逆向工程和安全审计功能,支持自然语言命令和AI驱动的安全分析。

工具数

0

提示词数

0

GitHub Stars

33

资源数

0
安全审计PythonClaude逆向工程Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

SecFathy

提供方

SecFathy

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python3 --version # Should be 3.10 or higher

详细介绍

Apktool MCP服务器

![License: MIT](https://opensource.org/licenses/MIT) ![Python 3.10+](https://www.python.org/downloads/) ![MCP Compatible](https://modelcontextprotocol.io/) ![Gemini CLI](https://github.com/google-gemini/gemini-cli)

一个强大的 模型上下文协议(MCP)服务器 这暴露了 Apktool 工具 Android APK分析和逆向工程功能。与 Gemini CLI 通过自然语言命令提供人工智能驱动的APK安全分析、隐私审计和逆向工程指导。

🚀 特性

🔍 全面的APK分析

  • 分解APK 提取资源、清单和smali代码
  • 分析权限 以及用于安全评估的应用程序组件
  • 提取字符串资源 并检测硬编码的秘密
  • 搜索smali代码 针对特定模式和安全漏洞
  • 重新编译修改后的APK 更改后

🤖 AI驱动的工作流程

  • 自然语言命令 用于复杂的APK分析任务
  • 自动化安全审计 基于人工智能生成的洞察
  • 隐私合规性检查 GDPR/CCPA分析
  • 逐步逆向工程 指导
  • 智能漏洞检测 风险评估

🛠 8核心工具

工具说明
decode_apk解压缩APK文件以提取所有组件
build_apk从修改后的源目录重新编译APK
install_framework安装用于系统应用程序分析的系统框架
analyze_manifest解析AndroidManifest.xml以获取权限和组件
extract_strings使用区域设置支持提取字符串资源
list_permissions枚举所有请求的权限
find_smali_references在反编译的smali代码中搜索模式
get_apk_info获取基本的APK元数据和信息

📋 专业分析提示

  • 证券分析:全面脆弱性评估
  • 隐私审计:数据收集和合规性分析
  • 逆向工程指南:逐步分析工作流程

📦 安装

先决条件

1.Java JDK 8+ (Apktool要求)

# Ubuntu/Debian
sudo apt update && sudo apt install default-jdk

# macOS (Homebrew)
brew install openjdk

# Verify installation
java -version

2. 药房 (核心依赖)

# Option 1: Package manager (recommended)
# Ubuntu/Debian
sudo apt install apktool

# macOS
brew install apktool

# Option 2: Manual installation
# Download from https://ibotpeaches.github.io/Apktool/install/

# Verify installation
apktool --version

3.Python 3.10+

python3 --version  # Should be 3.10 or higher

安装说明

1.克隆存储库

git clone https://github.com/SecFathy/APktool-MCP.git
cd APktool-MCP

2.创建虚拟环境

python3 -m venv venv
source venv/bin/activate  # Linux/macOS
# or
venv\Scripts\activate     # Windows

3.安装依赖项

pip install -r requirements.txt

4.测试安装

python3 apktool_server.py
# Should start the MCP server successfully

⚙️ 配置

Gemini CLI集成

1.安装Gemini CLI

# Follow instructions at https://github.com/google-gemini/gemini-cli

2.配置MCP服务器

编辑Gemini CLI配置文件:

  • Linux/macOS: ~/.config/gemini-cli/config.json
  • 视窗: %APPDATA%\gemini-cli\config.json
{
  "mcpServers": {
    "apktool": {
      "command": "python3",
      "args": ["/absolute/path/to/apktool_server.py"],
      "env": {
        "APKTOOL_WORK_DIR": "/path/to/workspace"
      }
    }
  }
}

Claude桌面集成(替代方案)

编辑Claude桌面配置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 视窗: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "apktool": {
      "command": "python3",
      "args": ["/absolute/path/to/apktool_server.py"],
      "env": {
        "APKTOOL_WORK_DIR": "/path/to/workspace"
      }
    }
  }
}

🎯 使用示例

自然语言命令

# Start Gemini CLI
gemini

# Security Analysis
> "Analyze the APK at ./suspicious_app.apk for security vulnerabilities"

# Permission Analysis  
> "What permissions does ./myapp.apk request and are any of them dangerous?"

# Code Analysis
> "Find any hardcoded API keys or secrets in ./social_app.apk"

# Privacy Audit
> "Generate a privacy compliance report for ./messenger_app.apk"

# Reverse Engineering
> "Help me understand how the authentication works in ./banking_app.apk"

直接工具使用

# Decompile an APK
> Use decode_apk to decompile ./sample.apk

# Analyze permissions
> Use list_permissions on the decompiled directory ./sample

# Search for patterns
> Use find_smali_references to search for "crypto" in ./sample

# Extract strings
> Use extract_strings from ./sample for locale "en"

# Rebuild APK
> Use build_apk to recompile ./sample into ./sample_modified.apk

引导式工作流程

# Run automated security analysis
> Run the security analysis prompt on ./target_app.apk

# Perform privacy audit
> Execute privacy audit workflow for ./social_media_app.apk

# Get reverse engineering guidance
> Use the reverse engineering guide for analyzing login functionality in ./app.apk

📁 项目结构

apktool-mcp-server/
├── apktool_server.py          # Main MCP server implementation
├── requirements.txt           # Python dependencies
├── config.json               # Example Gemini CLI configuration
├── README.md                 # This file
├── GEMINI.md                 # AI assistant context file
├── LICENSE                   # MIT license
├── examples/                 # Usage examples and samples
│   ├── sample_analysis.py    # Example analysis scripts
│   └── workflows/            # Common workflow examples
├── tests/                    # Unit tests
│   ├── test_server.py        # Server functionality tests
│   └── test_tools.py         # Individual tool tests
└── docs/                     # Additional documentation
    ├── SECURITY.md           # Security guidelines
    ├── CONTRIBUTING.md       # Contribution guidelines
    └── TROUBLESHOOTING.md    # Common issues and solutions

🔒 安全考虑

⚠️ 重要安全注意事项

  • 遵守法律:仅分析您拥有或有明确权限分析的APK
  • 恶意软件风险:未知的APK可能包含恶意代码-在隔离环境中使用
  • 数据隐私:解压缩的APK可能包含敏感的用户信息
  • 工作区隔离:配置具有受限权限的专用工作区
  • 工艺限制:服务器包括超时以防止资源耗尽

最佳实践

# Use dedicated workspace
export APKTOOL_WORK_DIR="/secure/isolated/workspace"

# Set appropriate permissions
chmod 750 /secure/isolated/workspace

# Monitor resource usage
htop  # Watch memory and CPU during analysis

# Clean up after analysis
rm -rf /secure/isolated/workspace/*

🧪 测试

运行单元测试

# Install test dependencies
pip install pytest pytest-asyncio

# Run all tests
pytest tests/

# Run with coverage
pytest --cov=apktool_server tests/

手动测试

# Test server startup
python3 apktool_server.py

# Test with sample APK
# Download a sample APK and test basic functionality

集成测试

# Test Gemini CLI integration
gemini
> /tools  # Should list apktool tools
> Use decode_apk to analyze sample.apk

🤝 贡献

我们欢迎捐款!请看 贡献.md 了解详情。

开发设置

# Clone and setup development environment
git clone https://github.com/SecFathy/APktool-MCP.git
cd APktool-MCP
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run tests
pytest

# Format code
black apktool_server.py

目录标签

目录标签

安全审计PythonClaude逆向工程APK分析本地部署自然语言处理AI安全

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP