Skip to main content
Glama

Git Prompts MCP Server

by ceshine

Git 提示 MCP 服务器

该存储库提供了一个模型上下文协议 (MCP) 服务器,该服务器提供了多个命令来根据 Git 存储库的内容生成提示。

(该存储库从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 与指定祖先分支或提交之间的差异结果。
  2. /generate-pr-desc <ancestor_branch_or_commit> :根据 HEAD 与指定祖先分支或提交之间的差异结果生成拉取请求描述。
  • 注意:这与/git-diff大致相同,但它包含在输出末尾生成拉取请求描述的说明。
  1. /git-cached-diff :填充阶段性变更和 HEAD 的差异结果。

例子:

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

执照

MIT 许可证。详情请参阅许可证

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

local-only server

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

一个基于 Git 存储库内容生成提示的模型上下文协议服务器,包括从差异生成 PR 描述的命令。

  1. 安装
    1. 手动安装
  2. 用法
    1. 作为 Zed Editor 的 MCP 服务器
  3. 执照

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
      Last updated -
      12
      54,999
      JavaScript
      MIT License
    • A
      security
      A
      license
      A
      quality
      A Model Context Protocol server for creating commit messages from git staged files.
      Last updated -
      2
      1
      TypeScript
      MIT License
    • A
      security
      A
      license
      A
      quality
      A Model Context Protocol server that enables Large Language Models to interact with Git repositories through a robust API, supporting operations like repository initialization, cloning, file staging, committing, and branch management.
      Last updated -
      21
      584
      84
      TypeScript
      Apache 2.0
    • A
      security
      F
      license
      A
      quality
      A Model Context Protocol server that automatically generates structured release notes from Git repository tags, analyzing differences between tags and saving formatted Markdown output to the .iris directory.
      Last updated -
      1
      0
      JavaScript

    View all related MCP servers

    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/ceshine/git-prompts-mcp-server'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server