Track AI Contributions to Your Codebase with git-commit-aider: An MCP Server for Seamless AI Integration
In the rapidly evolving landscape of software development, artificial intelligence (AI) is increasingly playing a pivotal role. From code generation to automated testing, AI agents are becoming indispensable tools for developers. However, effectively tracking and managing AI contributions within a codebase presents a unique set of challenges. This is where git-commit-aider, a simple yet powerful Model Context Protocol (MCP) server, steps in.
git-commit-aider is designed to seamlessly integrate with AI-powered development workflows, allowing you to automatically commit changes made by AI agents to your Git repository. By appending “(aider)” to the committer’s name, this tool enables you to easily distinguish AI-generated commits from those made by human developers, providing clear visibility into the AI’s impact on your project.
This tool is an important element of the UBOS ecosystem, letting teams see how much AI is contributing to their projects.
Understanding the Need for AI Contribution Tracking
As AI agents become more sophisticated and integrated into the development process, the need for robust contribution tracking becomes paramount. Without a clear mechanism for identifying AI-generated code, it can be difficult to:
- Assess the impact of AI on code quality and maintainability: Understanding which parts of the codebase were modified by AI is crucial for evaluating the effectiveness of AI tools and identifying potential areas for improvement.
- Ensure accountability and traceability: In collaborative development environments, it’s essential to know who or what is responsible for each change. AI contribution tracking provides a clear audit trail of AI-driven modifications.
- Optimize AI workflows: By analyzing AI contribution data, you can gain insights into how AI agents are being used and identify opportunities to streamline AI-powered development processes.
- Comply with regulatory requirements: Certain industries may have specific regulations regarding the use of AI in software development. AI contribution tracking can help ensure compliance with these requirements.
Key Features of git-commit-aider
git-commit-aider offers a range of features designed to simplify AI contribution tracking and enhance your development workflow:
- Automated Commit Appending: The core functionality of
git-commit-aideris its ability to automatically append “(aider)” to the committer’s name for AI-generated commits. This simple yet effective mechanism allows you to quickly and easily identify AI contributions within your Git history. - Customizable Commit Messages: The
commit_stagedtool allows you to specify a commit message for AI-generated changes. This enables you to provide context and explain the purpose of the AI’s modifications. - Environment Variable Support:
git-commit-aidersupports environment variables (GIT_COMMITTER_NAME,GIT_COMMITTER_EMAIL) for configuring committer information. This allows you to easily integrate the tool into your existing development environment and customize committer details as needed. - Fallback to Git Configuration: If environment variables are not set,
git-commit-aiderautomatically falls back to thegit config user.nameandgit config user.emailcommands to retrieve committer information. This ensures that the tool works seamlessly even without explicit environment variable configuration. - Working Directory Specification: The
cwdparameter allows you to specify the working directory for the Git command. This is useful when working with multiple repositories or submodules. - Integration with Aider --stats: Commits marked with “(aider)” are automatically recognized by the
aider --statscommand, providing a convenient way to analyze AI contributions within your codebase. - Alternative Commit Amending: For users who prefer a more manual approach,
git-commit-aiderprovides an alternative method for amending the author of existing commits using Git commands.
Use Cases for git-commit-aider
git-commit-aider is applicable to a wide range of use cases across various industries and development scenarios:
- AI-Assisted Code Generation: When using AI tools to generate code snippets or entire modules,
git-commit-aidercan automatically commit these changes, providing clear attribution to the AI agent. - Automated Testing and Bug Fixing: If AI agents are used to perform automated testing or fix bugs,
git-commit-aidercan track these AI-driven modifications to the codebase. - Code Refactoring and Optimization: When AI agents are employed to refactor or optimize code,
git-commit-aidercan ensure that these changes are properly attributed to the AI. - Documentation Generation: If AI tools are used to generate documentation,
git-commit-aidercan track these AI-driven contributions to the documentation repository. - Machine Learning Model Training: When AI agents are used to train machine learning models,
git-commit-aidercan track changes to the training data or model code.
Installation and Configuration
Installing and configuring git-commit-aider is a straightforward process. Simply add the following configuration to your MCP settings file:
{ “mcpServers”: { “git-commit-aider”: { “command”: “npx”, “args”: [“mcp-git-commit-aider”] } } }
Ensure that the GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables are set, or that the git config user.name and git config user.email commands are properly configured. Then, you can prompt the AI by something like:
Commit the changes for me
This command will commit the staged changes with the specified message, automatically appending “(aider)” to the committer’s name.
Calculating AI Contribution with the Provided Script
The provided script offers a powerful way to calculate the contribution of AI to your codebase, measured in lines of code (added, deleted, and total changes). This script analyzes Git logs to identify commits made by AI agents (identified by the AI_MATCHER variable) and calculates the total lines of code added and deleted by these agents.
How to Use the Script:
- Save the Script: Save the script to a file, for example,
calculate_ai_contribution.sh. - Make it Executable: Run
chmod +x calculate_ai_contribution.shto make the script executable. - Run the Script: Execute the script with a revision range as an argument. For example:
./calculate_ai_contribution.sh HEAD~5..HEAD(analyzes the last 5 commits)./calculate_ai_contribution.sh main..my-feature-branch(analyzes commits on a feature branch not yet in main)
The script will output a JSON object containing the following information:
ai_percentage: The percentage of total lines changed that were contributed by AI authors.ai_changes: An object detailing the aggregated line changes (added, deleted, and total) made by AI authors.human_changes: An object detailing the aggregated line changes made by human authors.details: An array of objects providing a detailed breakdown of changes, including the file name, author, whether the author is an AI, and the number of lines added, deleted, and the total changes for that file by that author.
Configuration Options:
The script provides several configuration options that can be customized to match your repository’s conventions:
AI_MATCHER: The string used to identify AI-generated commits in author names (default: “(aider)”).IGNORE_PATTERNS: An array of patterns for files/paths to be excluded from the calculation (e.g., “package-lock.json", ".lock”).
The UBOS Platform: Empowering AI-Driven Development
git-commit-aider is a valuable tool for tracking AI contributions within your codebase, but it’s just one piece of the puzzle. To truly unlock the potential of AI in software development, you need a comprehensive platform that provides the tools and infrastructure necessary to build, deploy, and manage AI agents.
This is where UBOS comes in. UBOS is a full-stack AI Agent Development Platform designed to empower businesses across all departments to leverage the power of AI. With UBOS, you can:
- Orchestrate AI Agents: Seamlessly manage and coordinate multiple AI agents to achieve complex development tasks.
- Connect to Enterprise Data: Connect AI agents to your enterprise data sources, enabling them to access and process relevant information.
- Build Custom AI Agents: Develop custom AI agents tailored to your specific needs and requirements.
- Utilize Your LLM Model: Integrate your own Large Language Model (LLM) to create AI agents with advanced natural language processing capabilities.
- Build Multi-Agent Systems: Develop sophisticated multi-agent systems that can collaborate and solve complex problems.
By combining git-commit-aider with the UBOS platform, you can create a truly AI-driven development environment that enables you to:
- Increase Development Velocity: Automate repetitive tasks and accelerate the development process.
- Improve Code Quality: Leverage AI agents to identify and fix bugs, refactor code, and improve overall code quality.
- Enhance Collaboration: Foster collaboration between human developers and AI agents, enabling them to work together more effectively.
- Gain Deeper Insights: Analyze AI contribution data to gain insights into the effectiveness of AI tools and optimize AI-powered development processes.
Conclusion
git-commit-aider is an essential tool for any development team that is leveraging AI in their workflow. By providing a simple and effective way to track AI contributions, this tool enables you to gain valuable insights into the impact of AI on your codebase and optimize your AI-powered development processes. Coupled with the UBOS platform, git-commit-aider becomes an integral part of a comprehensive AI-driven development environment that empowers you to build better software, faster.
Git Commit Aider
Project Details
- MrOrz/mcp-git-commit-aider
- MIT License
- Last Updated: 5/13/2025
Recomended MCP Servers
The first Google Workspace MCP Server written for Streamable HTTP transport, with support for Calendar, Gmail, Docs &...
一个强大的MCP(Model Context Protocol)开发框架,一个用于SEE(Standard Extension Environment)对接的模块化工具框架。该框架允许开发者轻松创建和扩展自定义工具,并通过MCP协议与模型交互。
MCP server to connect AI agents to any github corpa
BrowserStack's Official MCP Server
MCP Server for PatSnap API
council of models for decision
MCP server for fetching, parsing and crawling sitemaps of a given website
A book series on JavaScript. @YDKJS on twitter.





