Skip to content

Add read-only MCP server for Droid ASC - #38

Open
NonMirror wants to merge 1 commit into
MG1937:mainfrom
NonMirror:codex/droidasc-mcp
Open

NonMirror wants to merge 1 commit into
MG1937:mainfrom
NonMirror:codex/droidasc-mcp

Conversation

@NonMirror

Copy link
Copy Markdown

Droid ASC can now be used directly by MCP clients such as Codex over stdio, exposing class decompilation, class listing, manifest decoding, and cross-DEX reference search without launching a separate CLI process for each request.

The server returns structured results with timing, counts, and truncation metadata, validates paths and query parameters, marks all tools read-only, and caches repeated class/manifest queries using file metadata. This also adds the droidasc-mcp console entry point, MCP SDK dependency, Codex registration instructions, and MCP protocol tests.

Validation:

  • python tests/run_tests.py --require-decompiler — 69 tests passed.
  • python -m compileall -q droidasc tests/test_mcp_server.py and git diff --check passed.
  • Installed droidasc-mcp with python -m pip install -e . and verified stdio initialization/tool discovery with the official MCP client.
  • Verified a real stdio list_classes call against a generated DEX fixture.
  • Verified temporary Codex CLI registration via codex mcp add/get; the registration was removed afterward. A full model-driven codex exec attempt launched the server but did not complete because that session stalled during unrelated existing MCP/model initialization, so no end-to-end Codex model success is claimed.

@MG1937

MG1937 commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Sorry, but at the moment we are not planning to integrate MCP or skills. ASC is currently provided as a minimal suite containing only core functionality, available for all third parties to use freely. Adding MCP could restrict the freedom of other projects that integrate DroidASC into their pipelines.

01101sam pushed a commit to 01101sam/asc that referenced this pull request Nov 12, 2026
Adds droidasc.mcp_server (console script droidasc-mcp), exposing
decompile_class, list_classes, decode_manifest and find_references over
MCP stdio with structured, size-capped results.

Fixes on top of upstream MG1937#38:
- make the MCP SDK an optional extra (pip install "droidasc[mcp]") instead
  of a hard dependency; the CLI keeps its axml/mutf8-only footprint and the
  server explains how to install the extra when it is missing
- the aggregate parameter was accepted but silently ignored; it is now
  forwarded through ApkHandler.for_each_findrefs to the findrefs worker
- support the extends/impl searches the CLI gained since the PR was opened
- report the real package version instead of a hard-coded 0.1.0
- tests skip cleanly without the extra (tolerated by run_tests strict mode
  via an 'optional dependency:' skip reason) and CI installs it

(cherry picked from commit 870f692)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ra8caPaYoi8jheXnkE5dPe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants