Skip to main content
Glama
ShinonomeAya

git-graph-mcp

by ShinonomeAya

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: worktree-map

クイックスタート

要件: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 個の有界ツールと 2 つの読み取り専用リソースを提供します: git-graph://default/selection、git-graph://default/status。MCP stdout にはプロトコルメッセージのみが含まれます。診断情報は stderr に書き込まれ、リポジトリパス、設定値、リクエスト内容はエコーされません。

セキュリティ境界

デフォルトのワークフローは読み取り専用です。ブランチの作成は明示的な呼び出しを必要とし、既存のブランチは移動されません。reset はプレビューのみを生成し、 git_revalidate_plan はアクションの前にリポジトリ状態のフィンガープリントを検証します。プロジェクトはネットワークリスナーを起動せず、 リポジトリの内容もアップロードしません。

開発とリリース

npm run check
npm run test:package-install

詳細:

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server that visualizes git branch genealogy and worktree locations within a repository, marking the current session position. Supports creating branches/worktrees, safe deletion/cleanup, and session navigation with fallback guidance.
    2
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    A local git MCP server. It exposes 12 git operations to an MCP client over stdio, allowing the client to inspect and work with a git repository on your machine, including status, diffs, log, branches, staging, and commits.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables people and AI agents to query local code repositories as graphs through stdio MCP tools for project listing, search, dependency tracing, impact analysis, bridge detection, node inspection, bounded code reading, and optional LSP definition/reference lookups.
    MIT