Android Source Explorer
Provides on-demand access to AOSP and Jetpack source code to help AI understand Android framework internals. It features a hybrid architecture using Tree-sitter and LSP for precise code extraction, cross-file navigation, and local source indexing.
What is Android Source Explorer?
Android Source Explorer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides on-demand access to aosp and jetpack source code to help ai understand android framework internals. it features a hybrid architecture using tree-sitter and lsp for precise code extraction, cr...
Provides on-demand access to AOSP and Jetpack source code to help AI understand Android framework internals. It features a hybrid architecture using Tree-sitter and LSP for precise code extraction, cross-file navigation, and local source indexing.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Provides on-demand access to AOSP and Jetpack source code to
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx android-source-explorer-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Android Source Explorer
The Android Source Explorer MCP server provides AI assistants with on-demand access to AOSP (Android Open Source Project) and Jetpack library source code, enabling precise understanding of Android framework internals without requiring a full local AOSP checkout. It uses a hybrid architecture combining Tree-sitter for sub-10ms AST parsing of individual files and optional LSP integration for cross-file navigation including goto-definition and find-references. Android developers can ask questions about how specific framework classes or Compose components work and get answers grounded in the actual source code rather than documentation or training data.
Prerequisites
- Python 3.11 or later, or the uv package manager
- Git (for syncing AOSP/Jetpack source trees)
- Sufficient disk space for synced Android sources (several GB depending on selected components)
- An MCP client such as Claude Desktop, VS Code, or Cursor
Install the Android Source Explorer
Install using uv tool install from the GitHub repository. This makes the android-source-explorer command available globally.
uv tool install git+https://github.com/mrmike/android-source-explorer-mcpSync AOSP and Jetpack sources
Download the source files you want the server to index. Specify the API level and Jetpack component groups. This downloads only the requested sources, not the full AOSP tree.
# Sync AOSP sources for API 36
android-source-explorer sync --api-level 36 --androidx "compose,lifecycle,activity"
# Optionally sync LSP index for cross-file navigation
android-source-explorer sync --lsp
# Check sync status
android-source-explorer statusConfigure your MCP client
Add the server to your MCP client config. Enable LSP with the ANDROID_SOURCE_LSP env var to unlock goto-definition and find-references across the entire codebase.
{
"mcpServers": {
"android-sources": {
"command": "android-source-explorer",
"args": ["serve"],
"env": {
"ANDROID_SOURCE_LSP": "true"
}
}
}
}Restart your MCP client
Restart your MCP client so it picks up the new server. The server exposes tools for class lookup, method extraction, hierarchy traversal, and source search.
Verify with a class lookup
Ask your AI assistant to look up a well-known Android class such as Activity or ViewModel to confirm the sync was successful and tools are available.
Android Source Explorer Examples
Client configuration
Claude Desktop config for the Android Source Explorer with LSP enabled for full cross-file navigation.
{
"mcpServers": {
"android-sources": {
"command": "android-source-explorer",
"args": ["serve"],
"env": {
"ANDROID_SOURCE_LSP": "true"
}
}
}
}Prompts to try
Questions about Android framework internals you can ask once the source explorer is connected.
- "Show me the source code of the Activity.onCreate() method in AOSP."
- "What classes extend ViewModel in the Jetpack lifecycle library?"
- "Search the Compose source for uses of 'remember' and explain the pattern."
- "What methods does the RecyclerView.Adapter class expose?"
- "Find all references to ContentResolver.query() in the AOSP framework."Troubleshooting Android Source Explorer
Sync command fails with a Git or network error
Ensure Git is installed and on PATH. The sync downloads sources from GitHub (AOSP mirrors and androidx.dev). Check your internet connection and firewall. Retry the sync command — partial downloads are resumed automatically.
goto_definition and find_references tools return 'LSP not enabled'
Set ANDROID_SOURCE_LSP=true in the env block of your MCP client config and restart the client. Also ensure 'android-source-explorer sync --lsp' completed successfully before starting the server.
'android-source-explorer: command not found' after uv tool install
The uv tools bin directory may not be on PATH. Run 'uv tool dir' to find the binary location, then add it to your shell's PATH in ~/.zshrc or ~/.bashrc and restart the terminal.
Frequently Asked Questions about Android Source Explorer
What is Android Source Explorer?
Android Source Explorer is a Model Context Protocol (MCP) server that provides on-demand access to aosp and jetpack source code to help ai understand android framework internals. it features a hybrid architecture using tree-sitter and lsp for precise code extraction, cross-file navigation, and local source indexing. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Android Source Explorer?
Follow the installation instructions on the Android Source Explorer GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Android Source Explorer?
Android Source Explorer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Android Source Explorer free to use?
Yes, Android Source Explorer is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
Android Source Explorer Alternatives — Similar Developer Tools Servers
Looking for alternatives to Android Source Explorer? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Android Source Explorer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Android Source Explorer?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.