Android Source Explorer

v1.0.0Developer Toolsstable

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.

androidjetpackjetpack-composemcpmcp-server
Share:
92
Stars
0
Downloads
0
Weekly
0/5

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

Explore AOSP and Jetpack source code using Tree-sitter and LSP.
Understand Android framework internals and cross-file navigation.
Query Android development APIs and component structures.
mrmike

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx android-source-explorer-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-mcp
2

Sync 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 status
3

Configure 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"
      }
    }
  }
}
4

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "android-source-explorer-mcp-server": { "command": "npx", "args": ["-y", "android-source-explorer-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides