algorithmaide-mcp
Enables real-device Android reversing workflows, including AlgorithmAide config management, LSPosed scope sync, Frida script injection, and runtime log queries on Android devices.
Integrates with Magisk root to execute privileged commands on Android devices, required for device control and LSPosed_mod CLI operations.
Click on "Deploy 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., "@algorithmaide-mcp apply AlgorithmAide config to com.mb.hawkeye"
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.
algorithmaide-mcp
Special thanks to Junge (军哥) for open-sourcing AlgorithmAide.
algorithmaide-mcp is an MCP server for real-device Android reversing workflows. It wraps AlgorithmAide config writes, AppSwitch/logList sync, LSPosed scope sync, Frida script injection, and runtime log queries into a stable MCP toolset.
Upstream And Downloads
This MCP targets AlgorithmAide Pro (
com.junge.algorithmAidePro).AlgorithmAide Pro APK: 关注公众号 算法助手Plus 下载 APK。
LSPosed_mod.zip: please prepare a CLI-enabled LSPosed_mod package for this workflow.
Magisk APK: please install official Magisk before running this MCP.
Related MCP server: android-adb-mcp
Verified Scope
This project is currently verified only on:
Android
10(API 29)Root with
Magisk(su 0 sh -c ...works)LSPosed_mod1.9.3_mod(7296)with CLI enabledDevice sample: Pixel 4
Important compatibility notes:
Non-mod LSPosed is currently not supported because CLI is unavailable.
Other Android versions and environments may work, but you must validate them yourself.
LSPosed_mod CLI scope updates are already built into this MCP (
sync_lsposed_scopeand high-level workflow tools).
Before real use, run:
npm run device:preflight -- --target-package <your.package>
npm run device:smoke:suite -- --target-package <your.package>Quick Start
Clone and install dependencies:
git clone https://github.com/vwww-droid/algorithmaide-mcp.git algorithmaide-mcp
cd algorithmaide-mcp
npm installConfigure mcp profile:
{
"mcpServers": {
"algorithmaide": {
"command": "node",
"args": [
"/absolute/path/to/algorithmaide-mcp/bin/algorithmaide-mcp.js"
]
}
}
}Common Commands
npm run device:preflight -- --target-package com.mb.hawkeye
npm run device:smoke -- --target-package com.mb.hawkeye
npm run device:smoke:suite -- --target-package com.mb.hawkeye
npm run release:selfcheck
npm testBuild Notes (LSPosed_mod)
If you need reproducible LSPosed_mod builds for this workflow, use the pinned-version one-click script from your companion project:
/Users/admin/Projects/Reverses/LSPosed_mod/build-last.sh
This script sets Java from .java-version, builds required libxposed artifacts, then runs zipAll, and should produce a usable LSPosed_mod package.
Tool Overview
Frequently used tools:
read_target_stateapply_algorithm_aide_configadd_custom_hooksinject_frida_scriptquery_agent_logsquery_frida_logs
Full tool contracts: docs/tool-contracts.md
Documentation
Getting started: docs/getting-started.md
Compatibility matrix: docs/compatibility.md
Troubleshooting: docs/troubleshooting.md
Examples: examples/README.md
Architecture: docs/architecture.md
Contributing
Issues and PRs are welcome.
When opening an issue, include:
Device and system info (Android version, root solution, LSPosed version)
Target package
Commands you ran
JSON output from
device:preflightanddevice:smoke:suite
License
MIT
Available Tools
23 toolsadd_custom_hooksC
Add or replace custom hook entries, then sync config, AppSwitch, LSPosed, and optionally relaunch the target.
Inputs: targetPackage (required), hookEntries (required), serial, enabledScriptName, +8 more.
add_r0capture_hooksC
Generate the built-in r0capture-style network hooks and apply them with the verified workflow.
Inputs: targetPackage (required), serial, launchTargetApp, dryRun, +2 more.
apply_algorithm_aide_configC
Write files/config/.json safely and verify the config provider readback.
Inputs: targetPackage (required), serial, configJson, configPatch, +4 more.
apply_hook_profileC
Load a saved profile and apply it with the verified workflow.
Inputs: profileName (required), targetPackage (required), serial, launchTargetApp, +2 more.
collect_exported_logsC
Compatibility tool for pulling legacy exported log files only.
Inputs: targetPackage (required), serial, outputDir, newestHookOnly, +1 more.
collect_runtime_logsD
Collect runtime logs, prioritizing the SQLite database and frida.log.
Inputs: targetPackage (required), serial, outputDir, sources, +2 more.
get_hook_log_contextB
Expand one structured hook log entry into a short surrounding time-window context.
Inputs: targetPackage (required), entryId (required), serial, outputDir, +5 more.
import_hook_jsonB
Low-level config import for compatibility. Prefer apply_algorithm_aide_config for normal use.
Inputs: targetPackage (required), configJson (required), serial, dryRun.
inject_frida_scriptC
Enable one Frida script for a target package and sync config, AppSwitch, and LSPosed in one step.
Inputs: targetPackage (required), scriptName (required), serial, scriptContent, +6 more.
inspect_hook_candidateC
Summarize one dynamic candidate into short hits, short context, jadx-ai-mcp hints, and draft add_custom_hooks suggestions.
Inputs: targetPackage (required), serial, query, entryId, +10 more.
list_hook_packsB
List built-in hook templates that can be applied to a target app.
Inputs: no named parameters.
list_hook_profilesA
List locally saved hook configuration profiles.
Inputs: no named parameters.
query_agent_logsC
Build a short unified log view from sqlite hits, short context, and frida.log supplements.
Inputs: targetPackage (required), serial, query, entryId, +12 more.
query_frida_logsC
Pull frida.log and view a short keyword or time-window slice.
Inputs: targetPackage (required), serial, outputDir, limit, +6 more.
query_hook_logsC
Pull runtime logs and query recent hook records from algorithmAidePro.db and frida.log.
Inputs: targetPackage (required), serial, outputDir, limit, +6 more.
read_target_stateC
Read the current target state, including config, AppSwitch, log sources, and LSPosed scope.
Inputs: targetPackage (required), serial, dryRun.
replace_frida_scriptC
Replace a Frida script under /data/system/junge//frida and verify the write.
Inputs: targetPackage (required), scriptName (required), scriptContent (required), serial, +1 more.
reset_target_configC
Reset the target config to an empty template and apply it through the verified workflow.
Inputs: targetPackage (required), serial, dryRun.
run_verified_workflowC
Run the minimal verified loop: stop apps, write state, start AlgorithmAide, sync LSPosed, then optionally launch the target.
Inputs: targetPackage (required), serial, configJson, configPatch, +8 more.
save_hook_profileC
Save a hook configuration profile locally.
Inputs: profileName (required), configJson (required), description, tags.
search_hook_logsC
Search the structured hook log database by keyword across class, method, details, and call stack fields.
Inputs: targetPackage (required), query (required), serial, fields, +5 more.
sync_appswitch_stateC
Sync AppSwitch.json and logList.json, then verify both storage layers.
Inputs: targetPackage (required), serial, enabled, dryRun.
sync_lsposed_scopeC
Sync the LSPosed scope for AlgorithmAide and return the readback.
Inputs: targetPackage (required), serial, includeSystemFramework, dryRun.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Several tool pairs have overlapping purposes (e.g., multiple log querying tools, add/inject/replace hooks), which may confuse an agent about which to use. However, descriptions help differentiate most tools.
All tools follow a consistent verb_noun snake_case pattern, but some verbs are vague (e.g., 'get' vs 'query' vs 'read') and import_hook_json breaks the config naming pattern.
23 tools is reasonable for the specialized domain of Frida hook management. The count slightly exceeds the ideal 3-15 range but is still manageable.
The tool surface covers most lifecycle operations: config, hooks, profiles, logs, and workflows. Minor gaps include lack of explicit hook removal and a dedicated disable function.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- AlicenseBqualityBmaintenanceA minimal, secure MCP server for AI-assisted mobile development, enabling build, install, interact, and inspect Android/iOS apps.53381 npm14Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps Android ADB functionality into AI assistant tools, enabling device management, shell execution, file operations, app management, media capture, and log analysis via natural language.23 npm3MIT
- FlicenseNot gradedqualityAmaintenanceMCP server that provides AI coding agents real Android development tools—Gradle, adb, logcat, lint, crash triage—through a local, permissioned interface. Enables agents to inspect projects, run safe Gradle tasks, capture logs/screenshots, and triage crashes.1-
- AlicenseNot gradedqualityCmaintenanceMCP server that lets AI agents drive the LuckyStar/LS_KTool Android memory-debugging stack, exposing tools for memory read/write, scanning, pointer operations, and device/process management via the Model Context Protocol.MIT