git-graph-mcp
git-graph-mcp
一个本地优先的 Git 提交图终端工具,同时提供标准 MCP stdio 服务。它让人 在终端选择提交或范围,再让 Claude Code、Codex、Cursor 等 MCP 客户端读取 同一份受预算约束的 Git 上下文。

能做什么
在终端查看提交图、分支、提交详情和工作区状态;
保存 commit、range、ref 选择,并在 CLI/TUI/MCP 之间复用;
通过 MCP 读取 graph、status、context、search、diff、history 和 resources;
生成安全的分支动作与 reset 预览,不自动执行 reset/checkout/push;
用
doctor检查 Node.js、Git、仓库、MCP 配置和 stdio 握手。
Related MCP server: org-as-code MCP Server
快速开始
要求:Git 在 PATH 中,正式支持 Node.js 22+。
npm ci
node .\bin\git-graph-mcp.js graph --plain --limit 8
node .\bin\git-graph-mcp.js doctor交互式 TUI:
node .\bin\git-graph-mcp.js graph常用操作:
node .\bin\git-graph-mcp.js status
node .\bin\git-graph-mcp.js search --limit 20
node .\bin\git-graph-mcp.js select commit <commit-oid>
node .\bin\git-graph-mcp.js selected
node .\bin\git-graph-mcp.js doctor --json目标仓库不是当前目录时,为命令追加 --repo <path>。
MCP 配置
仓库根目录的 .mcp.json 使用本地 stdio:
{
"mcpServers": {
"git-graph": {
"type": "stdio",
"command": "node",
"args": ["./bin/git-graph-mcp.js", "mcp"]
}
}
}服务器提供 12 个有界工具和两个只读 resources:
git-graph://default/selection、git-graph://default/status。MCP stdout
只保留协议消息;诊断信息写入 stderr,且不会回显仓库路径、配置值或请求内容。
安全边界
默认工作流是只读的。分支创建要求显式调用、不会移动已有分支;reset 只生成
预览,git_revalidate_plan 会在动作前校验仓库状态指纹。项目不启动网络监听器,
也不上传仓库内容。
开发与发布
npm run check
npm run test:package-install更多内容:
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides batch file operations, search, and essential git workflows via stdio MCP.731Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a Git-native organizational governance system, supporting proposal-validation workflows, decision-making, and audit trail management through 21 MCP tools over stdio transport.1MIT
- FlicenseNot gradedqualityBmaintenanceProfile-driven MCP server for safely inspecting and changing local Git repositories via a Streamable HTTP endpoint with deny-by-default security.1
- FlicenseNot gradedqualityCmaintenanceA local-only MCP server that exposes git repository history, diffs, and status as tools for LLM clients, working entirely against a local git repo on disk.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
TradeOS MCP: ticker search, My Agent, chart TA, macro news. npm stdio or HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShinonomeAya/git-graph-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server