home / mcp / chromium codesearch mcp server
Provides code search, Gerrit integration, and issue tracking for Chromium via MCP; supports AI-assisted queries and automation.
Configuration
View docs{
"mcpServers": {
"hjanuschka-chromium-helper": {
"command": "npx",
"args": [
"chromium-codesearch-mcp"
],
"env": {
"YOUR_ENV": "PLACEHOLDER"
}
}
}
}You can use the Chromium CodeSearch MCP Server to enable AI-assisted code exploration and Gerrit/issue analysis for Chromium, with direct search, symbol lookup, Gerrit integration, and PDFsupport. It provides fast, structured access to code, reviews, and issues so you can work with the Chromium codebase more efficiently through an MCP-enabled AI assistant.
You connect your MCP-enabled AI assistant to the Chromium CodeSearch MCP server to perform code searches, symbol lookups, and Gerrit or PDFium related tasks. The server exposes tools that you can call from prompts, allowing you to search code, fetch file contents, check Gerrit CL status and comments, view diffs, and retrieve issue and commit information. Use the AI to issue prompts like: βSearch for LOG(INFO) usage in the codebaseβ or βGet the diff for PDFium CL 130850,β and the MCP server will return structured results that you can act on within your workflow.
Two usage patterns are available: - Direct CLI/tooling workflow via the CLI MCP client for automated scripting and local development. - MCP server endpoint for AI assistants like Claude Desktop to query Chromium data programmatically.
Prerequisites: you need Node.js 18+ and npm or yarn to run the CLI tools and the MCP server locally.
Install and run the MCP server using the standard npm-based flow described here. If you want to run the CLI tool directly, you can use npx chromium-helper for immediate use without installation.
Step-by-step setup for the MCP server via local runtime (stdio configuration): install the MCP server package and run it with a local command.
MCP configuration is exposed to Claude Desktop (or any MCP client) to enable a local or remote server connection. You can add a configuration entry that starts the server via npx or directly invoking the MCP binary.
The following runtime configurations are demonstrated for the Chromium CodeSearch MCP server. You can use either the npx-driven approach or the direct binary invocation.
The MCP server exposes a suite of tools to perform code searches, symbol lookups, file retrieval, and Gerrit/PDFium related queries. These tools enable you to: - Search Chromium code with advanced filters - Look up symbol definitions and usages - Retrieve file contents with line ranges - Check Gerrit CL status, view review comments, and fetch diffs - Retrieve CI/build errors and patchset files - List Gerrit or PDFium CLs with authentication when needed - Query issues and commit histories - Discover code ownership information
Two MCP server connection methods are shown for Claude Desktop:
1) Using npx to launch the MCP server with the CLI tool:
2) Invoking the MCP server binary directly if it is installed globally.If authentication is required for certain Gerrit or PDFium endpoints, follow the established authentication flow to obtain and reuse cookies or tokens. Use JSON output formats for scripting and AI integration to simplify downstream processing.
Only use MCP endpoints that are explicitly configured and intended for your environment. Do not share authentication cookies or tokens in unsecured channels. Ensure your AI prompts are scoped to the data you have access to and respect repository access controls.
Examples you can run through Claude or any MCP client: - "Search for LOG(INFO) usage in Chromium" - "Find the definition of Browser::Create" - "Check the status of Gerrit CL 6624568" - "Search for memory leak issues" - "Get the diff for PDFium CL 130850" - "List my open Gerrit CLs" (requires authentication)"
Core endpoints include: search_chromium_code, find_chromium_symbol, get_chromium_file, get_gerrit_cl_status, get_gerrit_cl_comments, get_gerrit_cl_diff, get_gerrit_patchset_file, get_gerrit_cl_bot_errors, get_ci_build_errors, list_gerrit_cls, get_pdfium_gerrit_cl_status, get_pdfium_gerrit_cl_comments, get_pdfium_gerrit_cl_diff, get_pdfium_gerrit_patchset_file, list_pdfium_gerrit_cls, get_chromium_issue, search_chromium_issues, search_chromium_commits, find_chromium_owners_file.
Install the MCP server locally using npm and run it with Node.js. The MCP server can be started via standard npm scripts or node dist/index.js depending on your setup.
For ongoing workflows, integrate your AI assistant with the MCP server to automate Chromium code searches, Gerrit reviews, and issue tracking tasks.
Advanced code search with Google syntax, filters, and pagination to locate code patterns and symbols.
Resolve symbol definitions and usages across the Chromium codebase.
Retrieve file contents with optional line ranges for context.
Fetch Gerrit CL status, test results, and submission readiness.
Obtain review comments with context and threading for a CL.
View diffs and file changes for a CL.
Get the content of files from a specific patchset.
Show detailed error messages from failed try-bots with traces.
Retrieve CI build error details for a given build.
List Gerrit CLs that you have access to (requires authentication).
Check PDFium CL status and test results.
Fetch PDFium review comments and code context.
Show PDFium code changes for a CL.
Get PDFium file content from a patchset.
List PDFium Gerrit CLs with authentication (requires cookies).
Retrieve detailed issue information with browser automation.
Full-text search for Chromium issues with pagination.
Commit history search with date filters.
Locate OWNERS files for code ownership context.