mcp-git-assistant

mcp-git-assistant

Enables AI-powered git assistance including commit message generation, branch naming, and branch analysis using conventional commits and git status/diff/log.

Category
Visit Server

README

MCP Git Assistant

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

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

功能特性

  • 自动生成符合 Conventional Commits 规范的 commit message
  • 基于任务描述智能建议分支命名
  • 分析分支状态与主分支差异
  • 查看 git status / diff / log 等常用命令输出

安装

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured