Skip to main content
Glama
MrOrz

git-commit-aider MCP Server

by MrOrz

git-commit-aider MCP 服务器

代表 AI 进行 git 提交,以便您可以在代码库中跟踪 AI 贡献。

这是一个基于 TypeScript 的 MCP 服务器,它提供了一个工具来提交 Git 存储库中的暂存更改,同时在提交者的名称后附加“(aider)”。

特征

此 MCP 服务器仅提供一个工具:

commit_staged - 使用特定消息提交暂存的更改。

  • message (字符串,必需)作为提交消息。

  • 使用cwd (字符串,可选)来指定 git 命令的工作目录。

  • 自动将“(aider)”附加到提交者名称。

  • 如果设置,则从环境变量( GIT_COMMITTER_NAMEGIT_COMMITTER_EMAIL )中读取提交者姓名和电子邮件,否则回退到git config user.namegit config user.email

在您的代码编辑器中安装此工具后,您可以通过以下方式提示 AI:

为我提交更改

这通常发生在 AI 对您的代码库进行一些更改之后,因此 AI 常常能够从上下文中提供良好的提交消息。

带有“(aider)”的提交可以通过aider --stats命令获取,它将向您显示 AI 在代码库中的贡献。

Related MCP server: Git Polite

安装

要使用此服务器,请将其配置添加到您的 MCP 设置文件中。

{
  "mcpServers": {
    "git-commit-aider": {
      "command": "npx",
      "args": ["mcp-git-commit-aider"]
    }
  }
}

提交者信息从以下位置检索:

  1. 环境变量GIT_COMMITTER_NAMEGIT_COMMITTER_EMAIL ,遵循git 的约定

  2. git config user.namegit config user.email命令的输出。

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于使用自动重建的开发:

npm run watch

MCP 配置示例:

{
  "mcpServers": {
    "git-commit-aider": {
      "command": "node",
      "args": [
        "/path/to/git-commit-aider/build/index.js"
      ]
    }
  }
}

(将/path/to/git-commit-aider替换为此服务器目录的实际路径。)

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:

npm run inspector

检查器将提供一个 URL 来访问浏览器中的调试工具。

Available Tools

1 tool
commit_stagedA

Commit staged changes with a specific message, appending "(aider)" to the committer name.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYesThe commit message.
cwdNoOptional: The working directory for the git command (defaults to the workspace root).

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the committer name is modified, which is a behavioral side effect. However, without annotations, the description carries the full burden. It could be more explicit about the exact impact (e.g., 'the commit author will be altered'), but the provided detail is adequate for a simple operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence that is front-loaded and contains no wasted words. Every word earns its place, efficiently conveying the core behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple git commit tool with no output schema, the description covers the main action and a notable side effect. However, it omits details like success confirmation or error behavior. Given low complexity, it is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description does not add meaning beyond the schema. Both parameters (message and cwd) are already described in the schema, so the description adds no extra context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool commits staged changes with a message, and specifies a unique behavioral tweak (appending '(aider)' to committer name). The verb and resource are explicit, and with no sibling tools, differentiation is not needed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, such as other git commands. Since there are no siblings, the guidance is less critical, but still absent; no prerequisites or limitations are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedcommit_staged

TDQS

A3.6/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no ambiguity. The tool 'commit_staged' has a clear and distinct purpose.

Naming Consistency5/5

The single tool follows a consistent verb_noun pattern ('commit_staged'), so naming is trivially consistent.

Tool Count2/5

The server has only one tool, which feels thin for a git commit aider. A typical scope would include staging, status, and other related operations.

Completeness2/5

The tool surface is severely incomplete. It only offers commit_staged, missing essential operations like staging, status, branching, or commit management, which will likely cause agent failures.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to interact with local Git repositories for operations like status, commits, branching, and diffs, plus GitHub API integration for managing pull requests when authenticated.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to intelligently organize Git changes into clean, focused commits with autopilot mode or surgical line-by-line staging precision. Supports partial staging of untracked files and handles large diffs with smart truncation.
    5
    1
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    Enables AI-powered code editing and development tasks through natural language conversations with Claude, using Aider's capabilities for improving code, adding features, fixing bugs, refactoring, and checking status.
    5
    1
    -