Git Prompts MCP Server

by ceshine
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides tools for generating prompts based on Git repository content, including the ability to generate PR descriptions by comparing differences between branches or commits.

GitがMCPサーバーにプロンプトを出す

このリポジトリは、Git リポジトリの内容に基づいてプロンプトを生成するためのいくつかのコマンドを提供するモデル コンテキスト プロトコル (MCP) サーバーを提供します。

(このリポジトリは、MarkItDown MCP サーバーとサンプルGit MCP サーバーから多大なインスピレーションを得ています。)

インストール

手動インストール

  1. このリポジトリをクローンする
  2. 依存関係をインストール: uv sync --frozen

使用法

Zed EditorのMCPサーバーとして

次の内容をsettings.jsonに追加します。

"context_servers": { "git_prompt_mcp": { "command": { "path": "uv", "args": [ "--directory", "/path/to/local/git_prompts_mcp_server", "run", "git-prompts-mcp-server", "/path/to/repo/", // parent folder of the .git directory "--excludes", // exclude files and directories from diff results "**/uv.lock", "--excludes", "**/.gitignore", "--format", // format for diff results "json" // options: json, text ] }, "settings": {} } }

コマンド

サーバーは次のコマンドに応答します。

  1. /git-diff <ancestor_branch_or_commit> : HEAD と指定された祖先ブランチまたはコミット間の diff 結果を入力します。
  2. /generate-pr-desc <ancestor_branch_or_commit> : HEAD と指定された祖先ブランチまたはコミット間の diff 結果に基づいて、プル リクエストの説明を生成します。
  • 注: これは/git-diffとほぼ同じですが、出力の最後にプル リクエストの説明を生成するための手順が含まれています。
  1. /git-cached-diff : ステージングされた変更と HEAD の diff 結果を入力します。

例:

  1. /generate-pr-desc main
  2. /git-diff dev
  3. /git-cached-diff

ライセンス

MITライセンス。詳細はライセンスを参照してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

差分から PR の説明を生成するコマンドを含む、Git リポジトリの内容に基づいてプロンプトを生成するモデル コンテキスト プロトコル サーバー。

  1. Installation
    1. Manual Installation
  2. Usage
    1. As a MCP Server for Zed Editor
  3. License
    ID: pslnaj9dsy