mcp-flutter-apk-injector
This server provides a complete toolkit for Android APK reverse engineering and Flutter runtime injection, enabling a decompile → analyze → synthesize → inject → patch → repackage pipeline for security testing and authorized customization.
Decompile APK: Disassemble an APK into Smali code, native libraries, resources, and a decoded AndroidManifest.xml.
Analyze Injection Surface: Scan the decompiled workspace to identify optimal injection points (Application class, entry Activity, JNI loading sites, pre-existing Flutter classes).
Synthesize Flutter Payload: Compile a Flutter project and extract required runtime artifacts (libflutter.so, libapp.so, flutter_assets, ICU data) for target ABIs.
Inject Flutter Runtime & Smali: Merge Flutter engine assets, native libraries, and custom Smali glue code, supporting multiple injection modes (activity_overlay, view_tree_injection, headless_engine, direct_application_hook) and optional MethodChannel bridge.
Patch Manifest & Configuration: Modify AndroidManifest.xml to add permissions (INTERNET, WAKE_LOCK), override the Application class, add FlutterActivity, and adjust cleartext traffic settings.
Recompile, Align & Sign: Rebuild the modified APK with apktool, align with zipalign, and cryptographically sign with apksigner (V1/V2/V3 schemes).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-flutter-apk-injectorDecompile the APK and inject the Flutter runtime, then repackage it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-flutter-apk-injector
Model Context Protocol (MCP) server for Android APK reverse engineering and Flutter runtime injection — an automated, enterprise-grade white-hat security research & penetration testing toolkit exposing a complete Decompile ➔ Analyze ➔ Synthesize ➔ Inject ➔ Patch ➔ Repackage pipeline as six modular MCP tools and agent prompt triggers.
🔒 Scope & Compliance Statement
This project is designed exclusively for security researchers, mobile auditors, and application owners auditing their own binaries or authorized targets. Repackaging third-party applications without explicit authorization is prohibited. You are responsible for using this tool lawfully.
🚀 Quick Start & Installation
You can run mcp-flutter-apk-injector directly via npx (no manual build required), or install it globally:
📦 Global NPM Install
npm install -g mcp-flutter-apk-injector⚡ Running via npx
npx -y mcp-flutter-apk-injector@latestRelated MCP server: SO Analyzer MCP
🛠️ MCP Client Setup
Claude Desktop Configuration
Add the following block to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-flutter-apk-injector": {
"command": "npx",
"args": ["-y", "mcp-flutter-apk-injector@latest"]
}
}
}Antigravity IDE / Generic MCP Client (stdio)
{
"mcpServers": {
"mcp-flutter-apk-injector": {
"command": "npx",
"args": ["-y", "mcp-flutter-apk-injector@latest"],
"env": {
"MCP_FLUTTER_LOG_LEVEL": "info"
}
}
}
}⚡ Agent Prompts & Slash Commands
mcp-flutter-apk-injector registers native MCP Prompts for AI desktop agents (Antigravity IDE, Claude Desktop, Cursor):
/scan: Diagnostic audit scan of decompiled APK workspace, entry points, Smali structure, and native ABIs./inject: Execute Flutter runtime payload & Smali glue code injection into target APK./patch: PatchAndroidManifest.xml(application class, hardware acceleration, cleartext traffic, permissions)./recompile: Repackage (apktool b), byte-align (zipalign), and cryptographically sign (apksigner) modified target.
🧠 How it Works & Injection Modes
The pipeline supports four flexible injection strategies aligning with Flutter's "Add-to-App" v2 architecture:
activity_overlay: Generates a dedicatedFlutterOverlayActivityextendingFlutterActivitythat reuses the pre-warmed cached engine.view_tree_injection: Programmatically attaches aFlutterViewinto the decor view layout tree of the target Activity'sonCreate().headless_engine: Initializes a backgroundFlutterEnginewithout UI for headless Dart execution, channel routing, and telemetry.direct_application_hook: Directly instruments existingApplication.onCreate()orattachBaseContext()methods in decompiled Smali without alteringandroid:nameinAndroidManifest.xml.
🛠️ The 6 Core MCP Tools
Tool Name | Detailed Function & Output |
| Disassemble a target Android APK into Smali bytecode, native library trees ( |
| Scan a decompiled APK workspace to identify optimal injection hooks for Flutter runtime initialization: Application class presence ( |
| Compile a source Flutter project and extract the runtime artifacts required for injection: |
| Inject Flutter engine assets, native libraries, and Smali glue code into a decompiled APK tree. Generates an |
| Patch the decoded |
| Repack the decompiled APK workspace with |
💻 System Requirements
Node.js >= 18.0.0
Java Runtime / JDK (required by
apktoolandapksigner)Android SDK Build-Tools (
zipalign,apksigner— auto-discovered fromANDROID_HOMEor system PATH)apktool installed on system PATH
Flutter SDK (required only when executing
synthesize_flutter_payload)
🧪 Development & Testing
# Install local dependencies
npm install
# Build TypeScript to dist/
npm run build
# Typecheck without emitting
npm run typecheck
# Code formatting & lint check
npm run lint
# Execute Vitest suite (35 unit tests)
npm test📜 License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides 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.Last updated11
- Flicense-qualityDmaintenanceEnables analysis of native Android libraries (SO files) and Flutter applications, including decompilation, function identification, SSL certificate bypass patching, and binary modification through 30+ specialized tools.Last updated10
- Flicense-qualityDmaintenanceIntegrates multiple Android APK security analysis tools into MCP standard APIs for automated static and dynamic analysis and vulnerability detection.Last updated
- Alicense-qualityCmaintenanceEnables authorized Android security testing with static and dynamic analysis, Frida instrumentation, storage inspection, and traffic interception via MCP tools.Last updatedMIT
Related MCP Connectors
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for Appcircle mobile CI/CD platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/MarwanDevSpace/mcp-flutter-apk-injector'
If you have feedback or need assistance with the MCP directory API, please join our Discord server