git-commit-aider MCP Server

by MrOrz

295 downloads
Not rated
GitHub

About

A simple MCP server that makes git commits on behave of AI, so that you can track AI contribution in your codebase

Details

Author
MrOrz
Downloads
295
Categories
Developer Tools

- Provides a commit_staged tool to commit staged changes.
- Automatically appends "(aider)" to the committer name.
- Supports an optional cwd parameter for the working directory.
- Reads GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables.
- Falls back to Git config for name and email.
- Built with TypeScript for the Model Context Protocol.

Add its configuration to your MCP settings file, specifying the path to the built index.js. Use the commit_staged tool with a required message parameter and an optional cwd parameter for the working directory.

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

Tools

- 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 to git config user.name and git config user.email.

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use this server, add its configuration to your MCP settings file.

{
  "mcpServers": {
    "git-commit-aider": {
      "command": "node",
      "args": [
        "/path/to/git-commit-aider/build/index.js"
      ],
      "env": {
        "GIT_COMMITTER_NAME": "Your Name",
        "GIT_COMMITTER_EMAIL": "your.email@example.com"
      },
      "disabled": false,
      "alwaysAllow": []
    }
  }
}
(Replace /path/to/git-commit-aider with the actual path to this server directory. Set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL if you want to override the Git config.)

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.