cs-android-mcp
v1.0.0
Published
MCP server for Android Code Search (cs.android.com)
Maintainers
Readme
Android Code Search MCP Server
English | 简体中文
A Model Context Protocol (MCP) server for searching and browsing Android source code via cs.android.com.
Preview

Features
- Code Search: Search through Android source code with regex support
- File Content: Retrieve full source file contents
- Symbol Suggestions: Get autocomplete suggestions for classes, methods, files
- Multiple Projects: Search across Android, AndroidX, Android Studio, and LLVM projects
Installation
Via npx (recommended)
No installation needed — use directly in your MCP client configuration:
{
"mcpServers": {
"cs-android": {
"command": "npx",
"args": ["-y", "cs-android-mcp"]
}
}
}Global install
npm install -g cs-android-mcpThen configure your MCP client:
{
"mcpServers": {
"cs-android": {
"command": "cs-android-mcp"
}
}
}Available Tools
search_android_code
Search for code in Android source repositories.
Parameters:
query(required): Search query (supports regex,file:,class:,function:operators)project: Filter by project (android,androidx,android-studio,android-llvm)pageSize: Number of results (default: 10, max: 50)contextLines: Context lines around matches (default: 1)
get_file_content
Get the full content of a source file.
Parameters:
project(required): Project namerepository(required): Repository pathbranch(required): Branch namepath(required): File path
suggest_symbols
Get symbol suggestions for partial queries.
Parameters:
query(required): Partial querymaxResults: Max suggestions (default: 7)
list_projects
List all available Android source projects.
API Protocol
This server uses the public Google Grimoire API endpoints that power cs.android.com:
- Search:
POST https://grimoireoss-pa.clients6.google.com/v1/contents/search - Suggest:
POST https://grimoireoss-pa.clients6.google.com/v1/contents/suggest - File Content:
POST https://grimoireoss-pa.clients6.google.com/$rpc/devtools.grimoire.FileService/GetContentsStreaming
License
MIT
