git-commit-aider MCP 服务器
代表 AI 进行 git 提交,以便您可以在代码库中跟踪 AI 贡献。
这是一个基于 TypeScript 的 MCP 服务器,它提供了一个工具来提交 Git 存储库中的暂存更改,同时在提交者的名称后附加“(aider)”。
特征
此 MCP 服务器仅提供一个工具:
commit_staged
- 使用特定消息提交暂存的更改。
- 将
message
(字符串,必需)作为提交消息。 - 使用
cwd
(字符串,可选)来指定 git 命令的工作目录。 - 自动将“(aider)”附加到提交者名称。
- 如果设置,则从环境变量(
GIT_COMMITTER_NAME
、GIT_COMMITTER_EMAIL
)中读取提交者姓名和电子邮件,否则回退到git config user.name
和git config user.email
。
在您的代码编辑器中安装此工具后,您可以通过以下方式提示 AI:
为我提交更改
这通常发生在 AI 对您的代码库进行一些更改之后,因此 AI 常常能够从上下文中提供良好的提交消息。
带有“(aider)”的提交可以通过aider --stats
命令获取,它将向您显示 AI 在代码库中的贡献。
安装
要使用此服务器,请将其配置添加到您的 MCP 设置文件中。
提交者信息从以下位置检索:
- 环境变量
GIT_COMMITTER_NAME
和GIT_COMMITTER_EMAIL
,遵循git 的约定。 git config user.name
和git config user.email
命令的输出。
发展
安装依赖项:
构建服务器:
对于使用自动重建的开发:
MCP 配置示例:
(将/path/to/git-commit-aider
替换为此服务器目录的实际路径。)
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
通过在提交者的名字后附加“(aider)”来代表 AI 进行 git 提交,从而允许在代码库中跟踪 AI 贡献。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityThe Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.Last updated -21554TypeScript
- AsecurityAlicenseAqualityEnables AI assistants to interact with GitHub through the PyGithub library, providing tools for managing issues, repositories, pull requests, and other GitHub operations with intelligent parameter handling and error management.Last updated -19PythonMIT License
- AsecurityFlicenseAqualityAn MCP server that enables AI assistants to manage GitHub Actions workflows by providing tools for listing, viewing, triggering, canceling, and rerunning workflows through the GitHub API.Last updated -93433TypeScript
- AsecurityAlicenseAqualityEnables AI models to access GitHub repository contents as context, with features to fetch entire repositories, specific file contents, and repository structures for use in AI interactions.Last updated -32JavaScriptMIT License