android-source-explorer-mcp
by mrmike·★ 91·综合分 49
一个为AI辅助开发提供Android源码直接访问的MCP服务器。
概述
Android源码探索MCP服务器使AI工具能够实时访问最新的Android源码,解决了训练数据过时的常见问题。它采用混合架构,结合Tree-sitter实现快速的AST解析和可选的LSP功能进行跨文件导航。服务器在本地缓存AOSP和AndroidX源码,确保快速查找和离线功能。
试试问 AI
装完之后,这里有 3 个你可以让 AI 做的事:
什么时候选它
当开发Android应用程序且需要直接从源代码获取精确、最新信息,而不是可能过时的文档时,选择此工具。
什么时候不要选它
如果你不从事Android开发,或者需要在最新AOSP变更同步到本地之前实时访问它们,则避免使用。
此 server 暴露的工具
从 README 抽取出 9 个工具search_classesSearch for classes by glob pattern or substring
lookup_classRetrieve the full source code for a specific class
lookup_methodExtract a precise method body + its Javadoc/annotations
list_class_membersList all method and field signatures in a class
get_class_hierarchyGet the inheritance chain (superclass + interfaces)
search_in_sourceSearch for text/regex across the entire source tree
goto_definitionResolve the cross-file definition of a symbol
find_referencesFind all usages of a class/method across the whole tree
get_type_infoGet documentation and type info via hover data
可对比工具
安装
安装
前置要求
- uv (推荐) 或 Python 3.11+
- Git
推荐安装方式 (通过uv)
uv tool install git+https://github.com/mrmike/android-source-explorer-mcp初始同步
# 同步API 36 (Android 16)和常用AndroidX包
android-source-explorer sync --api-level 36 --androidx "compose,lifecycle,activity"配置
{
"mcpServers": {
"android-sources": {
"command": "android-source-explorer",
"args": ["serve"]
}
}
}android-source-explorer-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。