android-source-explorer-mcp

作者 mrmike已验证

MCP server for exploring AOSP internals and Jetpack libraries

100
Stars
4
Forks
Python
语言
2026/8/24
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/mrmike/android-source-explorer-mcp

快速入门

使用 android-source-explorer-mcp 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

Android Source Explorer MCP Server

MCP server for exploring AOSP internals and Jetpack libraries.

Purpose

When building Android applications, AI tools often rely on outdated training data or incomplete summaries of the Android Framework. This MCP server provides on-demand, precise access to the actual source code (AOSP and AndroidX), enabling the AI to understand complex framework internals like the Activity lifecycle, ViewModel restoration, or Compose internals directly from the truth.

Installation & Setup

Prerequisites

  • uv (Recommended) or Python 3.11+

  • Git

Recommended Installation (via uv)

The easiest way to install and keep android-source-explorer up to date is using uv. It handles dependencies (including native ones like Tree-sitter and Cryptography) reliably across platforms.

uv tool install git+https://github.com/mrmike/android-source-explorer-mcp

This will make the android-source-explorer command available globally in your PATH.

Initial Sync

After installation, you need to perform an initial sync to fetch the Android source code:

# Sync API 36 (Android 16) and common AndroidX packages
android-source-explorer sync --api-level 36 --androidx "compose,lifecycle,activity"

# (Optional) Download LSP servers for cross-file features
android-source-explorer sync --lsp

Check sync status:

android-source-explorer status

Keeping Sources Up-to-Date

To check for and download the latest available Android Framework revisions (AOSP tags) and newer stable versions of your synced AndroidX packages, run:

# Update all synced framework APIs and AndroidX packages, then rebuild the index
android-source-explorer update

# (Optional) Clean up older versions of updated AndroidX packages
android-source-explorer update --clean

# Update only a specific API level or AndroidX package
android-source-explorer update --api-level 36
android-source-explorer update --androidx activity-compose

Configuration

Add the MCP server to your configuration file (e.g., Claude Desktop, Cursor, Gemini CLI).

Global Usage (Recommended)

If installed via uv tool install, the tool is available globally.

Basic Setup:

{
  "mcpServers": {
    "android-sources": {
      "command": "android-source-explorer",
      "args": ["serve"]
    }
  }
}

With LSP Features Enabled:

{
  "mcpServers": {
    "android-sources": {
      "command": "android-source-explorer",
      "args": ["serve"],
      "env": {
        "ANDROID_SOURCE_LSP": "true"
      }
    }
  }
}

Development Usage

If you cloned the repository and want to run it from the source:

{
  "mcpServers": {
    "android-sources": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/android-source-explorer", "android-source-explorer", "serve"]
    }
  }
}

How It Works

1. Hybrid Architecture (Tree-sitter + LSP)

The server uses a dual-engine approach to balance speed and intelligence:

  • Tree-sitter (Surgical Engine): Provides near-instant (sub-10ms) AST parsing of single files. It precisely extracts method bodies (including Javadoc and annotations), class members, and inheritance hierarchies without the overhead of a full compiler.

  • LSP (Global Engine): Optionally leverages the Eclipse JDT LS (Java) and Kotlin Language Server for cross-file navigation. This enables finding references across millions of lines of code and resolving types that span multiple libraries.

2. Local Sync Strategy

To ensure all lookups are instant and offline-ready, the server uses a sync or update command to manage sources in a local cache (~/.android-sources/):

  • AOSP: Fetches framework sources directly from android.googlesource.com using git sparse-checkouts.

  • AndroidX: Downloads -sources.jar files from the Google Maven repository (dl.google.com/dl/android/maven2/).

  • Hybrid Indexing: Prioritizes your local $ANDROID_HOME sources if available, supplemented by the downloaded cache.

  • Automatic Updates: The update command queries remote endpoints (AOSP Git tags & Google Maven indexes) for updates, downloads newer revisions/versions, and rebuilds the class index.

Available Tools

Tool Engine Description

search_classes Index Search for classes by glob pattern or substring.

lookup_class FS Retrieve the full source code for a specific class.

lookup_method Tree-sitter Extract a precise method body + its Javadoc/annotations.

list_class_members Tree-sitter List all method and field signatures in a class.

get_class_hierarchy Tree-sitter Get the inheritance chain (superclass + interfaces).

search_in_source FS/Regex Search for text/regex across the entire source tree.

goto_definition* LSP Resolve the cross-file definition of a symbol.

find_references* LSP Find all usages of a class/method across the whole tree.

get_type_info* LSP Get documentation and type info via hover data.

*Requires ANDROID_SOURCE_LSP=true

License

Apache License 2.0

常见问题

What is android-source-explorer-mcp?

android-source-explorer-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by mrmike. MCP server for exploring AOSP internals and Jetpack libraries. It has 100 GitHub stars.

Is android-source-explorer-mcp safe to use?

Yes. android-source-explorer-mcp passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

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

Clone the repository with "git clone https://github.com/mrmike/android-source-explorer-mcp" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is android-source-explorer-mcp written in?

android-source-explorer-mcp is primarily written in Python. It is open-source under mrmike on GitHub, so you can review or fork the full source.

Are there alternatives to android-source-explorer-mcp?

Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh android-source-explorer-mcp against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

Scrapling

by D4Vinci

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

75,9137,581Python
MCP 服务器
查看详情

TrendRadar

by sansan0

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

61,65224,883Python
MCP 服务器
查看详情

context7

by upstash

Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

61,0602,938TypeScript
MCP 服务器
查看详情

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

39,9393,219C
MCP 服务器
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情