Skip to main content
Glama
MarwanDevSpace

mcp-flutter-apk-injector

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_FLUTTER_LOG_LEVELNoLog level for the MCP server (e.g., info, debug, error).info

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
decompile_apkA

Disassemble an Android APK file into decoded Smali bytecode, AndroidManifest.xml, assets, native libraries, and resource files, automatically installing a dedicated AGENTS.md workspace contract. Reads apkPath without mutating the source APK, but completely recreates outputDir; requires Java runtime and apktool on the system PATH. Set decompileSources=true (default) to disassemble DEX into Smali classes for code injection, or false for fast asset/manifest-only inspection; invoke analyze_injection_surface next on the resulting workspaceDir.

analyze_injection_surfaceA

Perform static bytecode analysis and security auditing on a decoded APK workspace to identify manifest components, ABI coverage, JNI loading hooks, native libraries, anti-debug/root checks, and candidate injection hooks. This operation is read-only, non-mutating, and idempotent; requires workspaceDir pointing to a valid directory produced by decompile_apk with an AndroidManifest.xml and smali structures. Use after decompile_apk to audit the target before modifying files; review returned warnings, securityAnalysis, and candidate hooks before selecting an injection mode with inject_flutter_runtime_and_smali.

synthesize_flutter_payloadA

Compile a source Flutter project into platform native libraries (libflutter.so, libapp.so) and flutter_assets partitioned by target Android ABIs. Invokes the local Flutter CLI, writes compiled artifacts to outputDir (or system temp if omitted), and overwrites existing destination files; requires flutterProjectPath containing pubspec.yaml. Set targetAbis to match the target APK architectures discovered via analyze_injection_surface, choose buildMode ('release' for AOT production, 'debug' for JIT), and forward the emitted payloadDir to inject_flutter_runtime_and_smali.

inject_flutter_runtime_and_smaliA

Inject a synthesized Flutter payload (lib/ and assets/) and generated Smali bootstrap classes into a decoded APK workspace. Mutates workspaceDir in-place by writing Smali classes, copying native libraries per ABI, and deploying Flutter assets; requires payloadDir containing valid Flutter binaries. Select injectionMode based on target structure: prefer activity_overlay for cached-engine screens, direct_application_hook for custom Application classes, headless_engine for background tasks, or view_tree_injection (experimental); enable nativeLibraryFallback to guard against missing ABI crashes.

patch_manifest_and_configA

Configure AndroidManifest.xml in a decoded workspace by injecting Flutter activities, application subclass bindings, hardware acceleration, network security flags, and required permissions. Mutates AndroidManifest.xml in-place within workspaceDir; accepts customApplicationClass to rebind android:name, additionalPermissions to insert tags, and boolean flags for usesCleartextTraffic, largeHeap, and hardwareAccelerated. Use after inject_flutter_runtime_and_smali to configure component declarations before packaging; use analyze_injection_surface instead when inspecting the manifest without changes.

recompile_align_and_signA

Rebuild a modified decoded workspace with apktool, 4-byte align the uncompressed APK with zipalign, and cryptographically sign the binary with apksigner (v1-v4 schemes). Mutates the filesystem by overwriting outputApkPath and creating temporary alignment artifacts; requires a valid workspaceDir containing modified Smali and AndroidManifest.xml. Pass keystoreConfig with custom keystorePath, passwords, and keyAlias for authorized release signatures; if keystoreConfig is omitted, generates an auto-signed debug test artifact.

get_agent_contextA

Retrieve the Hermes+ reverse-engineering persona, loaded skill sheets, pipeline telemetry, and complete active session memory snapshot. This operation is read-only, non-mutating, and requires no authentication; omitting sessionId returns the active singleton session state without error. Use it at the start of an engineering workflow or to inspect overall pipeline status; use query_memory_graph for targeted keyword lookups or update_agent_memory to persist modifications.

update_agent_memoryA

Update the active reverse-engineering session memory with notes, target Android workspace metadata, or verified patch history records. Mutates session state in-memory and automatically persists updates to .mcp_memory/session_state.json in workspaceDir; non-null fields merge into state, notes are appended, and patchType with patchDetails logs a verified entry. Use after manual Smali edits, manifest changes, or decompiler discoveries to keep agent telemetry synchronized; use get_agent_context or query_memory_graph instead when inspecting memory without modification.

query_memory_graphA

Search and inspect historical patch logs, register allocations, decompilation metadata, native libraries, and security findings in the active memory graph. This operation is read-only, non-mutating, and idempotent; performs fuzzy substring matching on query and returns ranked results by match score. Use query_memory_graph to locate specific patch records, hook locations, or components by keyword; use get_agent_context instead for a full session snapshot, and update_agent_memory to store new observations.

Prompts

Interactive templates invoked by user choice

NameDescription
scanPerform a detailed injection surface diagnostic audit of a decompiled APK workspace
decompileDisassemble an Android APK file into Smali bytecode and decoded resources
injectExecute Flutter engine and Smali glue code injection into a target APK workspace
patchPatch AndroidManifest.xml and Smali structures with Flutter requirements
recompileRebuild, align, and sign the modified APK workspace
pipelineExecute full end-to-end automated reverse engineering & Flutter injection pipeline
mergePlan and validate split-package compatibility without blindly merging APK directories
revertInspect patch history and determine whether verified rollback evidence exists
memoryInspect active Hermes+ session memory state, historical patch logs, and telemetry
hermes_guideDisplay Hermes+ system architecture rules and reverse engineering guidelines

Resources

Contextual data attached and managed by the client

NameDescription
agent-persona
agent-rules
skill-hermes-apk-reverse-engineering
skill-mcp-toolchain-orchestrator
memory-session
memory-patch-history

TDQS

A4.6/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a distinct role in the APK injection pipeline or memory management, with no overlapping functionality. The sequential nature and clear descriptions prevent confusion.

Naming Consistency5/5

All tool names follow a consistent lower_snake_case convention with verb-first naming (decompile, analyze, synthesize, inject, patch, recompile, get, update, query). The pattern is uniform and predictable.

Tool Count5/5

Nine tools is well within the typical range for a specialized pipeline. The set covers the full APK modification workflow plus memory management without unnecessary redundancy.

Completeness5/5

The tool set provides a complete end-to-end workflow from decompilation to recompilation and signing, with integrated memory operations. No essential steps are missing for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues