Skip to main content
Glama
jing0105

mcp-git-assistant

by jing0105

# MCP Git Assistant

一个基于 MCP (Model Context Protocol) 协议开发的 Git 智能助手工具。

帮助开发者通过 AI 智能生成 commit message、建议分支命名、分析分支状态等。

功能特性

  • 自动生成符合 Conventional Commits 规范的 commit message

  • 基于任务描述智能建议分支命名

  • 分析分支状态与主分支差异

  • 查看 git status / diff / log 等常用命令输出

Related MCP server: Git Commit MCP Server

安装

pip install -r requirements.txt

在 Trae IDE 中配置使用

  1. 打开 Trae IDE 设置

  2. 搜索 "MCP" 配置项

  3. 添加本地 MCP Server 配置:

{
  "mcpServers": {
    "git-assistant": {
      "command": "python",
      "args": ["-u", "D:/work/AI Agent/mcp-git-assistant/server.py"]
    }
  }
}
  1. 重启 Trae IDE

可用工具

工具

描述

git_status

查看当前 Git 仓库状态

git_diff

获取代码变更 diff 内容

git_log

查看最近的提交历史

generate_commit_message

基于代码变更自动生成 Commit Message

suggest_branch_name

基于任务描述建议分支命名

analyze_branch

分析当前分支状态与主分支差异

使用示例

生成 Commit Message

  1. 在你的项目中修改一些代码

  2. 在聊天中说:"帮我生成 commit message"

  3. AI 会自动调用工具分析你的代码变更

  4. 选择合适的方案执行 git commit

建议分支命名

  1. 在聊天中说:"新增用户登录功能,帮我起个分支名"

  2. 获取建议的分支名列表

分支分析

  1. 在聊天中说:"分析一下当前分支状态"

  2. 获得分支差异报告和操作建议

技术栈

  • Python 3.9+

  • MCP SDK (Model Context Protocol)

开发

# 安装依赖
pip install -r requirements.txt

# 运行测试
python server.py

License

MIT

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    -
    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 local git operations including commit, branch, push, pull, status, and sync with conventional commit enforcement and branch naming conventions.
    6
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Provides 15 MCP tools for AI-powered Git intelligence, enabling commit messages, branch creation, PR descriptions, code review, diff analysis, and push operations directly from your AI assistant.
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Git-backed platform for skills, tools, and context for AI agents

  • Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jing0105/mcp-git-assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server