AAPT-MCP
A tool for analyzing Android APK files using the Android Asset Packaging Tool (AAPT) with MCP integration.
Description
AAPT-MCP is a tool that leverages the Android Asset Packaging Tool (AAPT) to analyze APK files and provide detailed insights about their contents, size, and structure. It uses MCP (Model Control Protocol) to process and analyze the APK data through an LLM (Large Language Model).
Features
- APK content listing using AAPT
- Detailed size analysis of APK contents
- Categorization of files by type (resources, native libraries, dex files, etc.)
- Identification of largest files and directories
- Optimization recommendations
- Potential issues detection
Prerequisites
- Python 3.7+
- Android SDK (for AAPT tool)
- MCP server
Installation
- Clone the repository:
git clone https://github.com/yourusername/aapt-mcp.git
cd aapt-mcp
- Install dependencies:
pip install -r requirements.txt
- Ensure AAPT is in your system PATH:
- AAPT is part of the Android SDK build tools
- Add the Android SDK build tools directory to your system PATH
Usage
- Run the MCP server:
python main.py
- The tool provides two main functions:
aapt_tool: Lists contents of an APK fileanalyze_table: Analyzes the APK contents and provides detailed insights
Output Format
The analysis provides:
- Total APK Size
- Size Breakdown by category
- Top 5 Largest Files
- Optimization Recommendations
- Potential Issues
Example
from mcp.server.fastmcp import FastMCP
# Initialize the tool
aapt = FastMCP("aapt-mcp")
# Analyze an APK
result = aapt.analyze_table("path/to/your.apk")
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Android Asset Packaging Tool (AAPT)
- MCP Framework
Metadata
Release files for aapt-mcp-server 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aapt_mcp_server-1.0.0.tar.gz | 3.1 kB | Without provenance | Details for aapt_mcp_server-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aapt_mcp_server-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aapt_mcp_server-1.0.0-py3-none-any.whl |
Total release size: 6.8 kB
Release files / aapt_mcp_server-1.0.0.tar.gz
| Download URL | aapt_mcp_server-1.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61de91c666b92910fd8b3cf55c21604ce345874c2a7d9b2f908c631f2f402d47
|
|
BLAKE2b-256 checksum How to use checksums |
61eae8452de0691abec64f53ee121b850f8ab0c701483d8170189952badcb9d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / aapt_mcp_server-1.0.0-py3-none-any.whl
| Download URL | aapt_mcp_server-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44046ca5341f509cd3c7760b2f2e1dea15b1416188a66f3e4ccf3204f7699d52
|
|
BLAKE2b-256 checksum How to use checksums |
68f6b211552207720a756c22ff78b4c77ffde1ba945e304f3acd2e9cdec69808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for aapt-mcp-server 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.