# Android Source Explorer MCP server

> Lets an AI client search and read AOSP and AndroidX source code, including class definitions, method bodies, and references.

- Repository: https://github.com/mrmike/android-source-explorer-mcp
- Page: https://hostedmcp.org/servers/mrmike/android-source-explorer-mcp
- Transport: —
- Stars: 102
- License: Apache-2.0

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ANDROID_SOURCE_LSP` | no | no |  |

## Tools (6)

- `search_classes`
- `lookup_class`
- `lookup_method`
- `list_class_members`
- `get_class_hierarchy`
- `search_in_source`

## FAQ

### What does the Android Source Explorer MCP server let an AI do?

It gives the AI on-demand access to actual AOSP and AndroidX source code, so it can look up framework internals such as the Activity lifecycle or Compose internals.

### How do I install android-source-explorer?

Install it with uv tool install from the GitHub repository, which puts the android-source-explorer command on your PATH.

### Do I need to sync sources before using it?

Yes, run the sync command once to fetch sources, for example for API 36 and selected AndroidX packages, then check status.

### Which tools are available for searching classes and methods?

It offers search_classes, lookup_class, lookup_method, list_class_members, get_class_hierarchy, and search_in_source, plus LSP-based tools when enabled.

### How do I enable cross-file features like goto_definition and find_references?

Set the ANDROID_SOURCE_LSP environment variable to true in the server configuration; these tools depend on LSP servers.
