Git Commit Aider▌
by mrorz
Git Commit Aider uses AI to make Git commits for you, tracking contributions with '(aider)' for improved codebase analyt
Enables AI to make Git commits on behalf of users, automatically tracking AI contributions by appending '(aider)' to committer names for codebase statistics and analysis.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / Developers collaborating with AI coding assistants
- / Teams wanting to track AI vs human contributions
- / Code analysis requiring AI contribution statistics
capabilities
- / Commit staged Git changes with custom messages
- / Track AI contributions in commit history
- / Auto-append '(aider)' tag to committer names
- / Use environment variables or Git config for committer info
what it does
Allows AI assistants to make Git commits with staged changes while automatically marking them as AI-generated by appending '(aider)' to the committer name.
about
Git Commit Aider is a community-built MCP server published by mrorz that provides AI assistants with tools and capabilities via the Model Context Protocol. Git Commit Aider uses AI to make Git commits for you, tracking contributions with '(aider)' for improved codebase analyt It is categorized under developer tools. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.
how to install
You can install Git Commit Aider in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Git Commit Aider is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
git-commit-aider MCP Server
Make git commits on behalf of AI, so that you can track AI contribution in your codebase.
This is a TypeScript-based MCP server that provides a tool to commit staged changes in a Git repository while appending "(aider)" to the committer's name.
Features
This MCP server provides only one tool:
commit_staged - Commit staged changes with a specific message.
- Takes
message(string, required) as the commit message. - Takes
cwd(string, optional) to specify the working directory for the git command. - Appends "(aider)" to the committer name automatically.
- Reads committer name and email from environment variables (
GIT_COMMITTER_NAME,GIT_COMMITTER_EMAIL) if set, otherwise falls back togit config user.nameandgit config user.email.
With this tool installed in your code editor, you can prompt the AI by something like:
Commit the changes for me
This usually happens after the AI has made some changes to your codebase, so often times AI is able to provide a good commit message from the context.
Installation
To use this server, add its configuration to your MCP settings file.
{
"mcpServers": {
"git-commit-aider": {
"command": "npx",
"args": ["mcp-git-commit-aider"]
}
}
}
The committer information is retrieved from:
- Environment variables
GIT_COMMITTER_NAMEandGIT_COMMITTER_EMAIL, which follows git's convention. - Output of
git config user.nameandgit config user.emailcommands.
Alternative: amend author after commit
If you don't want to use this MCP server, you can also use the git command directly in your terminal.
You can proceed with normal commit first, and then use the following git command to change the author of the last commit:
git commit --amend --author="$(git config user.name) (aider) <$(git config user.email)>"
This will change the author of the last commit to your name with "(aider)" appended.
To simplify the process, you can set up a Git alias. Run the following command in your terminal:
git config --global alias.aimend '!git commit --amend --author="$(git config user.name) (aider) <$(git config user.email)>"'
Once set up, you can use the alias by running:
git aimend
Calculating AI contribution
Commits with "(aider)" can be picked up by aider --stats command, which will show you the contribution of AI in your codebase.
Alternatively, you can use the following script to calculate the contribution of AI in your codebase, measured in lines of code (added, deleted, and total changes).
#!/bin/bash
# Script to calculate line changes (added, deleted, total) by AI and human authors
# between two commits.
# Output is in JSON format.
#
# This logic is extracted and altered from git-quick-stats.sh, MIT license.
# --- Configuration ---
# You may change the config to match your repository's convention.
# String to identify AI-generated commits in author names
AI_MATCHER="(aider)"
# Define patterns for files/paths to be excluded from the calculation.
# These will be converted to git pathspecs like ":(exclude)*package-lock.json"
IGNORE_PATTERNS=(
"*package-lock.json"
"*.lock"
)
# --- Helper Functions ---
function print_usage() {
echo "Usage: $0 <REVISION_RANGE>"
echo " <REVISION_RANGE>: The revision range to analyze (e.g., HEAD~5..HEAD, my-branch, commit_sha)."
echo " Refer to 'git help log' or 'git help revisions' for more range options."
echo "Example: $0 HEAD~5..HEAD"
echo "Example: $0 origin..HEAD"
echo "Example: $0 my-feature-branch"
echo "Example: $0 abcdef1..fedcba2"
}
# --- Argument Parsing ---
if [ "$#" -ne 1 ]; then
echo "Error: Incorrect number of arguments. Please provide a single revision range."
print_usage
exit 1
fi
REVISION_RANGE="$1"
# --- Main Logic ---
# Construct pathspec arguments for git log
pathspec_args=()
for pattern in "${IGNORE_PATTERNS[@]}"; do
pathspec_args+=(":(exclude)$pattern")
done
git_log_output=$(git log "$REVISION_RANGE" --numstat --pretty="format:AuthorName:%an" -- "${pathspec_args[@]}")
# DEBUG: Uncomment to check the calculation for each commit.
# echo "$git_log_output"
# Process the log output with awk
result_json=$(echo "$git_log_output" | awk -v ai_matcher="$AI_MATCHER" '
BEGIN {
ai_added = 0
ai_deleted = 0
human_added = 0
human_deleted = 0
current_author = ""
is_ai_author = 0
}
/^AuthorName:/ {
# Extract author name
current_author = substr($0, length("AuthorName:") + 1)
if (index(current_author, ai_matcher) > 0) {
is_ai_author = 1
} else {
is_ai_author = 0
}
next
}
# Skip empty lines between commit blocks or lines that are not numstat
NF == 0 || !($1 ~ /^[0-9]+$/ && $2 ~ /^[0-9]+$/) {
next
}
# Process numstat line: <added> <deleted> <file>
{
added_lines = $1
deleted_lines = $2
# Skip binary files where numstat shows "-" for lines
if (added_lines == "-" || deleted_lines == "-") {
next
}
# Aggregate stats per author and file for details array
file_name = $3
# Robust key using File Separator character \034
key = current_author "\034" file_name
file_author_added[key] += added_lines
file_author_deleted[key] += deleted_lines
if (is_ai_author) {
ai_added += added_lines
ai_deleted += deleted_lines
} else {
human_added += added_lines
human_deleted += deleted_lines
}
}
END {
ai_total_changed = ai_added + ai_deleted
human_total_changed = human_added + human_deleted
overall_total_changed = ai_total_changed + human_total_changed
ai_percentage = 0.00
if (overall_total_changed > 0) {
ai_percentage = (ai_total_changed / overall_total_changed) * 100
}
printf "{
"
printf " "ai_percentage": %.2f,
", ai_percentage
printf " "ai_changes": {"added": %d, "deleted": %d, "total": %d},
", ai_added, ai_deleted, ai_total_changed
printf " "human_changes": {"added": %d, "deleted": %d, "total": %d},
", human_added, human_deleted, human_total_changed
# Details array
printf " "details": [
"
first_detail = 1
# Iterate over one of the arrays, keys should be consistent
for (key in file_author_added) {
if (!first_detail) {
printf ",
"
}
first_detail = 0
# Split key "author\034fileName" into key_parts array
# key_parts[1] will be author, key_parts[2] will be fileName
split(key, key_parts, "\034")
author = key_parts[1]
fileName = key_parts[2]
# Escape double quotes for JSON compatibility
gsub(/"/, "\"", author)
gsub(/"/, "\"", fileName)
detail_added = file_author_added[key] + 0 # Ensure numeric
detail_deleted = file_author_deleted[key] + 0 # Ensure numeric
detail_total = detail_added + detail_deleted
printf " {
"
printf " "fileName": "%s",
", fileName
printf " "author": "%s", "isAI": %s,
", author, (index(author, ai_matcher) > 0 ? "true" : "false")
printf " "added": %d, "deleted": %d, "total": %d
", detail_added, detail_deleted, detail_total
printf " }"
}
printf "
]
"
printf "}
"
}
')
# --- Output ---
echo "$result_json"
Usage example:
# Assume the script is saved as `calculate_ai_contribution.sh` and is executable (chmod +x calculate_ai_contribution.sh)
# Example 1: Analyze the last 5 commits
./calculate_ai_contribution.sh HEAD~5..HEAD
# Example 2: Analyze commits between a specific commit and HEAD
./calculate_ai_contribution.sh 90a5fcd4..HEAD
# Example 3: Analyze all commits on a feature branch not yet in main
./calculate_ai_contribution.sh main..my-feature-branch
# Example 4: Analyze commits between two tags
./calculate_ai_contribution.sh v1.0..v1.1
# Example output (will vary based on your repository and range):
# {
# "ai_percentage": 48.53,
# "ai_changes": { "added": 100, "deleted": 32, "total": 132 },
# "human_changes": { "added": 103, "deleted": 37, "total": 140 },
# "details": [
# {
# "fileName": "src/featureA.js",
# "author": "Developer One (aider)", "isAI": true,
# "added": 60, "deleted": 10, "total": 70
# },
# {
# "fileName": "src/featureB.js",
# "author": "Developer One (aider)", "isAI": true,
# "added": 40, "deleted": 22, "total": 62
# },
# {
# "fileName": "src/utils.js",
# "author": "Developer Two", "isAI": false,
# "added": 80, "deleted": 15, "total": 95
# },
# {
# "fileName": "README.md",
# "author": "Developer Two", "isAI": false,
# "added": 23, "deleted": 22, "total": 45
# }
# ]
# }
Output Fields Description
The JSON output contains the following fields:
ai_percentage: (Number) The percentage of total lines changed (sum of added and deleted lines) that were contributed by AI authors (identified byAI_MATCHER).ai_changes: (Object) An object detailing the aggregated line changes (linesadded,deleted, and theirtotal) made by AI authors.human_changes: (Object) An object detailing the aggregated line changes (linesadded,deleted, and theirtotal) made by human authors.details: (Array of Objects) Provides a detailed breakdown of changes. Each object in the array represents the contribution of a specificauthorto a particularfileName, including linesadded,deleted, and thetotalchanges for that file by that author.
FAQ
- What is the Git Commit Aider MCP server?
- Git Commit Aider is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Git Commit Aider?
- This profile displays 39 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.8 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Extended AI Capabilities
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Context Enhancement
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Workflow Automation
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Implementation Guide▌
Prerequisites
- ›Claude Desktop 0.7.0+ or Cursor IDE with MCP support
- ›Basic understanding of MCP architecture and capabilities
- ›Access credentials for integrated services (if required)
- ›Willingness to experiment and iterate on configuration
Time Estimate
15-60 minutes depending on server complexity
Installation Steps
- 1.Install MCP server: npm install -g [package-name] or via GitHub
- 2.Add server configuration to ~/.claude/mcp.json
- 3.Provide required credentials and configuration
- 4.Restart Claude Desktop to load new server
- 5.Test basic functionality with simple prompts
- 6.Explore capabilities and experiment with use cases
- 7.Document successful patterns for reuse
Troubleshooting
- ⚠MCP server not loading: Check config syntax, verify installation
- ⚠Connection errors: Check network, firewall, credentials
- ⚠Feature not working: Read server docs, check required parameters
- ⚠Performance issues: Monitor resource usage, check for network latency
- ⚠Conflicts with other servers: Check port assignments, namespace collisions
Best Practices▌
✓ Do
- +Read server documentation thoroughly before setup
- +Start with simple use cases to validate functionality
- +Test in non-production environment first
- +Monitor resource usage and performance
- +Keep servers updated for bug fixes and new features
- +Document configuration for team members
- +Use environment variables for sensitive configuration
✗ Don't
- −Don't grant overly permissive access to MCP servers
- −Don't skip reading security considerations in docs
- −Don't expose sensitive data without proper controls
- −Don't run untrusted MCP servers without code review
- −Don't ignore error messages—investigate root cause
💡 Pro Tips
- ★Combine multiple MCP servers for powerful workflows
- ★Create custom MCP servers for your specific needs
- ★Share successful configurations with team
- ★Use MCP inspector for debugging
- ★Join MCP community for tips and troubleshooting
Technical Details▌
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
- Model Context Protocol (MCP)
- JSON-RPC 2.0
- stdio or HTTP transport
Compatibility
- Claude Desktop
- Cursor IDE
- Custom MCP clients
When to Use This▌
✓ Use When
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid When
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.
Integration▌
- →Tool composition: Chain multiple MCP tools in workflows
- →Context augmentation: Provide AI with relevant external data
- →Action delegation: Let AI execute tasks on external systems
- →Bidirectional sync: Keep AI context and external systems in sync
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.8★★★★★39 reviews- ★★★★★Omar Garcia· Dec 24, 2024
Strong directory entry: Git Commit Aider surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Maya Taylor· Dec 12, 2024
Git Commit Aider has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Maya Haddad· Dec 12, 2024
We evaluated Git Commit Aider against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Sakura Martin· Dec 8, 2024
Useful MCP listing: Git Commit Aider is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Hiroshi White· Nov 27, 2024
Git Commit Aider reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Michael Johnson· Nov 15, 2024
We wired Git Commit Aider into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Omar Jackson· Nov 3, 2024
Git Commit Aider is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Nia Srinivasan· Oct 22, 2024
According to our notes, Git Commit Aider benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Sakura Chawla· Oct 18, 2024
We wired Git Commit Aider into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Benjamin Ghosh· Oct 6, 2024
Git Commit Aider reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
showing 1-10 of 39