Git MCP 服务器
模型上下文协议 (MCP) 服务器,通过标准化接口提供增强的 Git 操作。该服务器与 MCP 生态系统集成,为 AI 助手提供 Git 功能。
特征
核心 Git 操作:初始化、克隆、状态、添加、提交、推送、拉取
分支管理:列出、创建、删除、结帐
标签操作:列出、创建、删除
远程管理:列出、添加、删除
存储操作:列出、保存、弹出
批量操作:按顺序执行多个 Git 操作
GitHub 集成:通过个人访问令牌内置 GitHub 支持
路径解析:具有可选默认路径配置的智能路径处理
错误处理:使用自定义错误类型进行全面的错误处理
存储库缓存:高效的存储库状态管理
性能监控:内置性能跟踪
安装
克隆存储库:
安装依赖项:
构建项目:
配置
添加到您的 MCP 设置文件:
环境变量
GIT_DEFAULT_PATH:(可选)Git 操作的默认路径GITHUB_PERSONAL_ACCESS_TOKEN:(可选)用于 GitHub 操作的 GitHub 个人访问令牌
可用工具
基本操作
init:初始化一个新的 Git 存储库clone:克隆存储库status:获取存储库状态add:阶段文件commit:创建提交push:将提交推送到远程pull:从远程拉取更改
分支机构运营
branch_list:列出所有分支branch_create:创建一个新分支branch_delete:删除分支checkout:切换分支或恢复工作树文件
标签操作
tag_list:列出标签tag_create:创建标签tag_delete:删除标签
远程操作
remote_list:列出遥控器remote_add:添加远程remote_remove:删除远程
存储操作
stash_list:列出存储stash_save:将更改保存到存储区stash_pop:应用和删除存储
批量操作
bulk_action:按顺序执行多个 Git 操作
发展
执照
麻省理工学院
贡献
分叉存储库
创建你的功能分支(
git checkout -b feature/amazing-feature)提交您的更改(
git commit -m 'Add some amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Git MCP 服务器允许 AI 助手通过模型上下文协议执行增强的 Git 操作,支持核心 Git 功能、分支和标签管理、GitHub 集成等。
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityMCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.Last updated -22,57371,513MIT License
- Asecurity-licenseAqualityMCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.Last updated -1804
- -security-license-qualityAn MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.Last updated -2MIT License