Queries commit information from the Chromium repository via the Chromium Gitiles API, retrieving commit hashes, authors, timestamps, messages, and modified files for any file in the Chromium source code.
Chromium Commits Query Tool
A comprehensive tool to query the latest commit information for files in the Chromium repository. Supports CLI usage, Python API integration, and Model Context Protocol (MCP) server functionality.
Features
š Query Latest Commits: Get detailed information about the most recent commit that modified any file in the Chromium repository
š Comprehensive Details: Retrieve commit hash, author, timestamp, message, and complete list of modified files
š§ Multiple Interfaces: Use via command line, Python API, or as an MCP server
š Batch Processing: Process multiple files at once with batch operations
š³ Docker Support: Easy deployment with containerization
š MCP Integration: Seamless integration with AI agents and tools
Installation
Using UV (Recommended)
Using pip
Using Docker
Usage
š„ļø Command Line Interface (CLI)
Navigate to the src directory and use the following commands:
š Python API
š MCP Server
Start the MCP server for integration with AI agents:
The server provides the get_chromium_latest_commit tool that can be used by MCP-compatible clients.
š Example Usage
See src/example_usage.py for a comprehensive demonstration of the Python API:
š Example Output
šļø Common File Paths
Here are some frequently queried file paths in the Chromium repository:
Core Chrome Browser
Blink Rendering Engine
Component Libraries
Build and Configuration
Content/Web Platform
š Project Structure
āļø Requirements
Python: 3.10 or higher
Dependencies:
requests>=2.31.0(HTTP requests to Chromium Gitiles API)mcp>=1.0.0(Model Context Protocol server functionality)
Network: Internet connection to access Chromium Gitiles API
š API Reference
ChromiumCommitFetcher Class
Methods
get_file_latest_commit(file_path: str) -> Optional[Dict]Returns basic commit information for the latest change to the specified file
get_commit_details(commit_hash: str) -> Optional[Dict]Returns detailed information about a specific commit including all modified files
get_file_commit_info(file_path: str, detailed: bool = False, show_diff: bool = False) -> Optional[str]Returns formatted commit information with optional details and diff
š§ Configuration
The tool uses the Chromium Gitiles API and requires no authentication. All requests are made to:
š¤ Contributing
Fork the repository
Create a feature branch:
git checkout -b feature-nameMake your changes and add tests
Commit your changes:
git commit -am 'Add some feature'Push to the branch:
git push origin feature-nameSubmit a pull request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Links
This server cannot be installed