DexSQL
Lets your AI agent query Android APK and DEX files with SQL: classes, methods, strings, call references and smali.
282 stars on GitHubby LSPosedLicense NOASSERTIONUpdated 30 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Download the .mcpb file and open it with Claude Desktop.
Download the .mcpb file βReady! Now test it
Restart the app and paste one of these requests in the chat:
Open /path/to/app.apk and find methods that reference this log message.
List the callers of that method and show me the smali.
What it is
DexSQL reads Android app files directly and lets you ask questions about them in SQL. Your agent can find methods that use a certain string, list their callers and show the smali code. It runs locally from a single program and also works from the command line.
What it can do
- Open an APK or DEX file for analysis
- SQL queries over classes, methods, strings and call references
- Show smali for a method
- Schema and documentation provided as MCP resources
- CLI:
dexsql query, interactive mode, license extract
When to use
- βΊWhen you want to find where an Android app uses a given URL or log message
- βΊWhen you need to trace which methods call a certain method, including two hops
- βΊWhen you want to script repeated analysis of large APKs
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
find-refsHelps your agent search an Android app file for strings, classes, methods and fields, to find where things like web addresses or keys are used.ida-reverseHelps your agent analyze any type of program file. It can decompile, find references, and help understand complex code. Essential for security analysis and development.apk-reverseLets your agent perform reverse engineering on Android applications (APK). It unpacks, decompiles, modifies, and analyzes native code to understand the app's functionality.Frequently asked questions
Is it free?
Personal and commercial use, integration and binary redistribution are free under the DexSQL Binary License 1.0. The program itself is closed source.
Does it send my APK anywhere?
The readme says APK parsing runs locally and leaves the input unchanged. Your AI client's settings decide which results go to its model.
Which systems are supported?
The mcpb bundle covers macOS, x86_64 Linux and x86_64 Windows. On other platforms use the skill or manual setup.
Can I use it without an agent?
Yes. The same executable has a command line: dexsql query --input app.apk --sql with your query.
Can I query several files together?
Yes. Repeat the --input option to query multiple files together.
Is there an easy setup?
Yes. The install-dexsql skill downloads a binary, checks its SHA-256 checksum, adds the MCP config and tests the connection.
If it does not work
- βΊOn macOS or Linux, run chmod +x on the dexsql file and register its absolute path.
- βΊOn Windows use dexsql.exe and escape backslashes in JSON paths, for example D:\\Tools\\dexsql.exe.
- βΊReload your client's MCP connection after adding the server.
5 new skills a week. 1 minute to read.