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.
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 中配置使用
- 打开 Trae IDE 设置
- 搜索 "MCP" 配置项
- 添加本地 MCP Server 配置:
{
"mcpServers": {
"git-assistant": {
"command": "python",
"args": ["-u", "D:/work/AI Agent/mcp-git-assistant/server.py"]
}
}
}
- 重启 Trae IDE
可用工具
| 工具 | 描述 |
|---|---|
git_status |
查看当前 Git 仓库状态 |
git_diff |
获取代码变更 diff 内容 |
git_log |
查看最近的提交历史 |
generate_commit_message |
基于代码变更自动生成 Commit Message |
suggest_branch_name |
基于任务描述建议分支命名 |
analyze_branch |
分析当前分支状态与主分支差异 |
使用示例
生成 Commit Message
- 在你的项目中修改一些代码
- 在聊天中说:"帮我生成 commit message"
- AI 会自动调用工具分析你的代码变更
- 选择合适的方案执行
git commit
建议分支命名
- 在聊天中说:"新增用户登录功能,帮我起个分支名"
- 获取建议的分支名列表
分支分析
- 在聊天中说:"分析一下当前分支状态"
- 获得分支差异报告和操作建议
技术栈
- Python 3.9+
- MCP SDK (Model Context Protocol)
开发
# 安装依赖
pip install -r requirements.txt
# 运行测试
python server.py
License
MIT
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.