Android Code Search MCP Server
This server provides tools to search and browse Android source code from cs.android.com across projects including android, androidx, android-studio, and android-llvm.
search_android_code: Search code using regex and special operators like
file:,class:, andfunction:. Filter by project and control the number of results and context lines returned.get_file_content: Retrieve the full content of a specific source file by specifying the project, repository, branch, and file path.
suggest_symbols: Get autocomplete suggestions for classes, methods, or file names based on a partial query.
list_projects: List all available Android source projects that can be searched.
Allows searching and browsing Android source code via cs.android.com, featuring regex search support, symbol suggestions, and retrieval of full file contents.
Enables searching and browsing of Android Studio repository source code through the Android Code Search interface.
Provides capabilities to search and retrieve source code from LLVM projects hosted on the Android code search platform.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Android Code Search MCP Server search for the implementation of Activity.java in android"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Android Code Search MCP Server
English | 简体中文
A Model Context Protocol (MCP) server for searching and browsing Android source code via cs.android.com.
Preview

Related MCP server: Android Source Explorer MCP Server
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
Claude Code
claude mcp add cs-android -- npx -y cs-android-mcpCursor
{
"mcpServers": {
"cs-android": {
"command": "npx",
"args": ["-y", "cs-android-mcp"]
}
}
}Other MCP Clients
Any MCP-compatible client can use the stdio transport:
npx -y cs-android-mcpOr install globally:
npm install -g cs-android-mcp
cs-android-mcpAvailable Tools
search_android_code
Search for code in Android source repositories.
Parameter | Required | Description |
| Yes | Search query (supports regex, |
| No | Filter by project: |
| No | Number of results (default: 10, max: 50) |
| No | Context lines around matches (default: 1) |
get_file_content
Get the full content of a source file.
Parameter | Required | Description |
| Yes | Project name |
| Yes | Repository path |
| Yes | Branch name |
| Yes | File path |
suggest_symbols
Get symbol suggestions for partial queries.
Parameter | Required | Description |
| Yes | Partial query |
| No | Max suggestions (default: 7) |
list_projects
List all available Android source projects.
License
MIT
Available Tools
4 toolsget_file_contentC
Get the full content of a source file from Android repositories
Inputs: project (required), repository (required), branch (required), path (required).
list_projectsB
List available Android source projects that can be searched
Inputs: no named parameters.
search_android_codeC
Search for code in Android source repositories (cs.android.com). Returns matching files and code snippets.
Inputs: query (required), project, pageSize, contextLines.
suggest_symbolsC
Get symbol suggestions for a partial query (classes, methods, files)
Inputs: query (required), maxResults.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_file_content retrieves file contents, list_projects enumerates available projects, search_android_code performs code searches, and suggest_symbols provides symbol suggestions. There is no overlap in functionality, making tool selection straightforward for an agent.
Tool names follow a consistent verb_noun pattern (get_file_content, list_projects, search_android_code, suggest_symbols), with all using snake_case. The minor deviation is 'suggest_symbols' using a verb that is slightly less action-oriented than others, but overall naming is highly consistent and predictable.
With 4 tools, the server is well-scoped for Android code search functionality. Each tool serves a specific and necessary role in the domain (browsing, listing, searching, and suggesting), and there are no extraneous tools. The count is appropriate for the server's purpose.
The tool set covers core Android code search operations: listing projects, searching code, retrieving file contents, and suggesting symbols. A minor gap is the lack of advanced search filters or metadata operations, but the basic workflow is fully supported without dead ends.
Related MCP Connectors
Provides tools for searching Google Workspace documentation and much more.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Get up-to-date, version-specific documentation and code examples from official sources directly in…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables searching and reading Android Open Source Project (AOSP) source code via cs.android.com, with support for regex search, file content retrieval, and symbol suggestions.162 npm4Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI tools to retrieve and navigate actual AOSP and AndroidX source code on demand for accurate framework internals, with tools for class/method lookup, member listing, hierarchy, and source search. Optional LSP features add cross-file definitions, references, and type information.-
- FlicenseNot gradedqualityAmaintenanceEnables on-demand, precise exploration of AOSP and AndroidX source code, including class and method lookup, inheritance inspection, regex search, and optional cross-file navigation via LSP.-
- FlicenseNot gradedqualityAmaintenanceEnables precise, offline-ready exploration of AOSP internals and Jetpack/AndroidX sources, including class and method lookup, hierarchy inspection, regex search, and optional cross-file definition/reference navigation.-