A
securityF
licenseA
qualityMCP 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 -
18
4
3
TypeScript
MCP 服务器用于管理本地存储库上的 Git 操作。
要通过Smithery自动为 Claude Desktop 安装 Git MCP:
使用以下 JSON 配置片段添加 MCP 服务器:
GIT_REPOS_PATH
:包含 Git 存储库的目录的路径(必需)您可以在您的环境中设置此项,或者在运行服务器的目录中创建一个.env
文件。
列出配置路径中的所有 Git 存储库。
查找指定存储库中的最后一个 Git 标签。
repo_name
(Git 存储库的名称)version
(标签名称)和date
(标签创建日期)的字典列出最后一个 Git 标签和 HEAD 之间的提交消息。
repo_name
:Git 存储库的名称max_count
(可选):返回的最大提交数hash
、 author
、 date
和message
字典列表在指定的存储库中创建一个新的 git 标签。
repo_name
:git 存储库的名称tag_name
:要创建的标签的名称message
(可选):注释标签的消息(如果未提供,则创建轻量级标签)status
、 version
(标签名称)、 date
(标签创建日期)和type
(带注释或轻量级)的字典将现有的 git 标签推送到默认远程存储库。
repo_name
:git 存储库的名称tag_name
:要推送的标签名称status
、 remote
(远程名称)、 tag
(标签名称)和message
(成功消息)的字典通过检出主分支(或主分支作为后备)并从所有远程拉取来刷新存储库。
repo_name
:git 存储库的名称status
、 repository
、 branch
和pull_results
(每个远程的结果)的字典GIT_REPOS_PATH
设置正确且存储库存在该项目包括两个测试脚本:
test_git_mcp.py
- 直接测试底层 Git 命令功能,无需使用 MCP 服务器。test_mcp_server.py
- 通过启动服务器实例并对其进行调用来测试 MCP 服务器功能。运行测试:
You must be authenticated.
local-only server
The server can only run on the client's local machine because it depends on local resources.
MCP 服务器用于管理本地存储库上的 Git 操作,允许用户通过标准化界面列出存储库、获取和创建标签、列出提交、推送标签以及刷新存储库。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kjozsa/git-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server