GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者提供的说明(英文原文)
A Git MCP server that doesn't suck
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
GIT_REPO_PATH, GIT_ALLOW_NO_VERIFY, GIT_ALLOW_FORCE_PUSH, GIT_ALLOW_FLOW_HOOKS, GIT_SIGNING_KEY, GIT_SIGNING_FORMAT, GIT_AUTO_SIGN_COMMITS, GIT_AUTO_SIGN_TAGS标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"git": {
"command": "npx",
"args": [
"-y",
"@selfagency/git-mcp"
],
"env": {
"GIT_REPO_PATH": "your-value",
"GIT_ALLOW_NO_VERIFY": "your-value",
"GIT_ALLOW_FORCE_PUSH": "your-value",
"GIT_ALLOW_FLOW_HOOKS": "your-value",
"GIT_SIGNING_KEY": "your-value",
"GIT_SIGNING_FORMAT": "your-value",
"GIT_AUTO_SIGN_COMMITS": "your-value",
"GIT_AUTO_SIGN_TAGS": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add git --env GIT_REPO_PATH=your-value --env GIT_ALLOW_NO_VERIFY=your-value --env GIT_ALLOW_FORCE_PUSH=your-value --env GIT_ALLOW_FLOW_HOOKS=your-value --env GIT_SIGNING_KEY=your-value --env GIT_SIGNING_FORMAT=your-value --env GIT_AUTO_SIGN_COMMITS=your-value --env GIT_AUTO_SIGN_TAGS=your-value -- npx -y @selfagency/git-mcp运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"git": {
"command": "npx",
"args": [
"-y",
"@selfagency/git-mcp"
],
"env": {
"GIT_REPO_PATH": "your-value",
"GIT_ALLOW_NO_VERIFY": "your-value",
"GIT_ALLOW_FORCE_PUSH": "your-value",
"GIT_ALLOW_FLOW_HOOKS": "your-value",
"GIT_SIGNING_KEY": "your-value",
"GIT_SIGNING_FORMAT": "your-value",
"GIT_AUTO_SIGN_COMMITS": "your-value",
"GIT_AUTO_SIGN_TAGS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"git": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@selfagency/git-mcp"
],
"env": {
"GIT_REPO_PATH": "your-value",
"GIT_ALLOW_NO_VERIFY": "your-value",
"GIT_ALLOW_FORCE_PUSH": "your-value",
"GIT_ALLOW_FLOW_HOOKS": "your-value",
"GIT_SIGNING_KEY": "your-value",
"GIT_SIGNING_FORMAT": "your-value",
"GIT_AUTO_SIGN_COMMITS": "your-value",
"GIT_AUTO_SIGN_TAGS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
GIT_REPO_PATH envGIT_ALLOW_NO_VERIFY envGIT_ALLOW_FORCE_PUSH envGIT_ALLOW_FLOW_HOOKS envGIT_SIGNING_FORMAT envGIT_AUTO_SIGN_COMMITS envGIT_AUTO_SIGN_TAGS env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 selfagency 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:GIT_SIGNING_KEY
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.4.2)于23天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:GitHub, Desktop Commander, Cloudflare MCP
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
A Git MCP server that doesn't suck
Exposes the full Git workflow to any MCP-compatible AI agent — inspect, write, branch, remote, stash, rebase, LFS, git-flow, documentation lookup, and more. Designed to be safe by default, composable, and fast. Powered by simple-git.
Built for coding agents in tools like GitHub Copilot, Claude Code, Cursor, and OpenAI Codex, while remaining compatible with any MCP client that can call tools and resources.
skills/git-mcp-workflow/ documents MCP-first Git workflows, recovery, worktrees, releases, and advanced operations for AI agents and coding agents; installable via skills-npm and skill.shgit_but_check / git_jj_check detect GitButler and Jujutsu and guide agents to prefer their native CLIs/MCP (with but teardown guidance) over git-mcp tools when appropriategit_rewrite: reword, squash, rewrite-messages, and backup/restore for safe commit-history rewritinggit_analytics: contributors, churn, activity, summary, and file-stats computed from local git historygit_pr: create/list/merge PRs/MRs on GitHub, GitLab, Forgejo, Gitea, and Bitbucket via provider CLI or REST APIgit_tangled_check / git_entire_check detect Tangled hosting and Entire session/context managementrepo_path per-call or configure a server-level defaultgit_worktree: plain git worktree by path, or branch-addressed worktrees via git flow worktree with path templates and provenance-aware cleanupnpx @selfagency/git-mcp --repo-path /path/to/your/repo
npm install -g @selfagency/git-mcp
git-mcp --repo-path /path/to/your/repo
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": { "git": { "command": "npx", "args": ["-y", "@selfagency/git-mcp", "--repo-path", "/path/to/your/repo"] } } }
Add to .vscode/mcp.json in your project:
{
"servers": { "git": { "command": "npx", "args": ["-y", "@selfagency/git-mcp", "--repo-path", "${workspaceFolder}"] } } }
All configuration is via environment variables. Pass them in your MCP client config:
| Variable | Default | Description |
|---|---|---|
GIT_REPO_PATH | — | Default repository path (also: --repo-path CLI arg) |
GIT_ALLOW_NO_VERIFY | false | Allow --no-verify on commit/push (bypasses hooks) |
GIT_ALLOW_FORCE_PUSH | false | Allow --force on push |
GIT_ALLOW_FLOW_HOOKS | false | Allow git_flow hooks and filters to execute |
GIT_AUTO_SIGN_COMMITS | false | Automatically sign every commit |
GIT_AUTO_SIGN_TAGS | false | Automatically sign every tag |
GIT_SIGNING_KEY | — | Default GPG key ID or SSH key path |
GIT_SIGNING_FORMAT | — | Signing format: openpgp, ssh, or x509 |
GIT_ALLOW_BUT | false | Enable GitButler awareness (git_but_check) |
GIT_ALLOW_JJ | false | Enable Jujutsu awareness (git_jj_check) |
GIT_ALLOW_TANGLED | false | Enable Tangled awareness (git_tangled_check) |
GIT_ALLOW_ENTIRE | false | Enable Entire awareness (git_entire_check) |
BUT_BINARY | but | Override the but executable path |
JJ_BINARY | jj | Override the jj executable path |
ENTIRE_BINARY | entire | Override the entire executable path |
GITHUB_TOKEN | — | GitHub token for git_pr REST fallback |
GITLAB_TOKEN | — | GitLab token for git_pr REST fallback |
FORGEJO_TOKEN | — | Forgejo/Gitea token for git_pr REST fallback |
BITBUCKET_TOKEN | — | Bitbucket token for git_pr REST fallback |
GIT_FORGE_PROVIDER | — | Explicit forge provider for self-hosted instances |
Tools are grouped by domain. Each root tool takes an action parameter that selects the operation. Where an action is marked as default, omitting action will use it.
git_context)| Action | Description |
|---|---|
summary | _(default)_ Full repo snapshot: branch, upstream, pending changes, in-progress operations |
search | Search commit history and working tree content |
get_config | Read a Git config value |
set_config | Write a Git config value |
aliases | List all configured git aliases |
git_status)| Action | Description |
|---|---|
status | _(default)_ Working tree and branch status |
diff | Unstaged, staged, or ref-to-ref diff |
diff_main | Changes from branch divergence point vs main (or configurable base branch) |
git_history)| Action | Description |
|---|---|
log | _(default)_ Commit log with filtering, pagination, revision ranges, and pathspecs |
show | Inspect a single commit |
blame | Line-by-line attribution for a file |
reflog | Full reflog — the recovery ledger |
lg | Compact graph log (--oneline --graph --decorate --all) |
who | Contributor shortlog (supports optional file_path) |
git_commits)| Action | Description |
|---|---|
add | Stage files or hunks |
restore | Discard working tree changes |
unstage | Remove files from the staging area |
commit | Create a commit with message, signing, and author flags |
amend | Amend the last commit without editing the message |
wip | Stage all changes and commit with message WIP |
revert | Create a revert commit for a given ref |
undo | Soft-reset the last commit (reset --soft HEAD~1) |
reset | Reset HEAD with configurable mode (soft/mixed/hard) |
nuke | Hard-reset the last commit — requires confirm=true |
git_branches)| Action | Description |
|---|---|
list | _(default)_ Local and remote branch listing |
create | Create a branch |
delete | Delete a branch |
rename | Rename a branch |
checkout | Switch to a branch or ref |
set_upstream | Set or update tracking upstream |
recent | Recent branches sorted by committer date |
git_remotes)| Action | Description |
|---|---|
list | _(default)_ List configured remotes |
manage | Add, remove, or rename a remote |
fetch | Fetch from a remote |
pull | Pull (fetch + merge/rebase) |
push | Push to a remote; force_with_lease supported |
git_workspace)| Action | Description |
|---|---|
stash | Stash and pop/apply/drop/list/show stash entries |
stash_all | Stash tracked and untracked changes in one operation |
rebase | Start, continue, abort, or skip a rebase |
cherry_pick | Apply one or more commits; supports continue/abort/skip |
merge | Merge branches with full flag control |
bisect | Binary search for a regression (start, good, bad, reset, log) |
tag | Create, list, delete, or push tags; supports GPG/SSH signing |
worktree | Add, list, remove, lock, unlock, prune, or repair linked worktrees |
submodule | Add, update, sync, init, deinit, and list submodules |
git_flow)Drives the git-flow-next CLI, which must be installed and on PATH (brew install git-flow-next, or the releases page). Set GIT_FLOW_BINARY to override the path. When the binary is missing, the tool returns an install hint rather than failing opaquely.
| Operation | Description |
|---|---|
init | Initialize a repository with git-flow branch conventions |
| overview | Show the current flow state and act
只显示了开头部分;其余内容请在仓库中阅读