Token导航 LogoToken导航TokenDH.com
MCP Merge Request Summarizer logo
开发工具stdio官方级别未说明来源级核验

MCP Merge Request Summarizer

MCP Server

一个自动从git日志生成全面合并请求摘要的MCP工具,能够分析提交历史、分类变更并生成结构化的合并请求描述。

工具数

4

提示词数

0

GitHub Stars

1

资源数

0
开发工具代码管理PythonClaude代码审查Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

sonicjoy

提供方

sonicjoy

最后核验

2026/5/17 20:25

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -e .

详细介绍

MCP合并请求摘要生成器

一个MCP(模型上下文协议)工具,可以从git日志中自动生成全面的合并请求摘要。此工具分析提交历史记录,对更改进行分类,并生成适合合并请求描述的结构化摘要。

🚀 特性

  • 自动提交分析:分析分支之间的git日志以了解变化
  • 智能分类:按类型对提交进行分类(功能、错误修复、重构等)
  • 综合总结:使用以下内容生成详细的合并请求描述:

- 概述和统计 - 关键变更和重大承诺 - 分类更改(功能、错误修复、重构) - 中断更改检测 - 文件分类和影响分析 - 预计审核时间

  • 多种输出格式:支持Markdown和JSON输出
  • 柔性集成:独立工作或作为MCP服务器工作
  • 交叉平台的:与Windows、macOS和Linux兼容

📦 安装

🚀 快速入门(推荐)

  1. 克隆存储库:
   git clone https://github.com/yourusername/mcp-merge-request-summarizer.git
   cd mcp-merge-request-summarizer
  1. 运行安装脚本:

- 窗户: 双击 install.bat 或奔跑 install.bat 在PowerShell中 - Mac/Linux:chmod +x install.sh && ./install.sh

  1. 配置编辑器:

- 看 QUICK_START.md 30秒的设置说明 - 或检查 configs/README.md 有关详细的配置选项

手动安装

git clone https://github.com/yourusername/mcp-merge-request-summarizer.git
cd mcp-merge-request-summarizer
pip install -e .

来自PyPI

pip install mcp-merge-request-summarizer

备注:此包尚未发布到PyPI。目前,请使用安装脚本或手动安装。

🔧 用法

作为独立工具

# Basic usage (compares current branch against develop)
python -m mcp_mr_summarizer.cli

# Specify different branches
python -m mcp_mr_summarizer.cli --base main --current feature/new-feature

# Output to file
python -m mcp_mr_summarizer.cli --output mr_summary.md

# JSON output
python -m mcp_mr_summarizer.cli --format json --output summary.json

# Help
python -m mcp_mr_summarizer.cli --help

作为MCP服务器

  1. 配置您的MCP客户端 (例如,克劳德桌面、光标、VSCode):
   {
     "mcp.servers": {
       "merge-request-summarizer": {
         "command": "python",
         "args": ["-m", "mcp_mr_summarizer.server"]
       }
     }
   }
  1. 设置工作目录上下文 (推荐):
   # Set your working directory so repo_path="." works correctly
   await set_working_directory("/path/to/your/git/repo")
  1. 使用工具和资源 通过您的MCP客户端界面:

工具(动作)

  • set_working_directory:设置代理的工作目录上下文
  • get_working_directory:获取当前工作目录上下文
  • generate_merge_request_summary:创建完整的MR摘要
  • analyze_git_commits:提供详细的提交分析

资源(数据)

  • git://repo/status:当前存储库状态和信息
  • git://commits/{base_branch}..{current_branch}:在分支机构之间提交历史记录
  • git://branches:所有存储库分支的列表
  • git://files/changed/{base_branch}..{current_branch}:文件在分支之间更改

📊 输出示例

# feat: 4 new features and improvements

## Overview
This merge request contains 9 commits with 35 files changed (1543 insertions, 1485 deletions).

## Key Changes
- Refactor mappers in MLB, NBA, NHL, and NFL to use object initializer syntax (bdf5d9c) - 3028 lines changed
- Refactor season stats services to use base class and improve dependency injection (30de323) - 1976 lines changed

### 🚀 New Features (4)
- Add soccer metrics extraction methods and register soccer season stats service (176930f)
- Update services to use constructor injection for dependencies (29f1c46)
- Update CbStatsDaemon and CbStatsFeedPublicApi to use async host run methods (22c1202)
- Refactor PoolSeasonStatsController and related services (3a28ab4)

### 🔧 Refactoring (3)
- Refactor mappers in MLB, NBA, NHL, and NFL to use object initializer syntax (bdf5d9c)
- Refactor season stats services to use base class and improve dependency injection (30de323)
- Refactor logging in season stats services to use consistent casing (fd7b8b9)

### 📊 Summary
- **Total Commits:** 9
- **Files Changed:** 35
- **Lines Added:** 1543
- **Lines Removed:** 1485
- **Estimated Review Time:** 1h 15m

🛠️ 配置

快速配置(推荐)

对于VSCode/游标:

  1. 打开设置(Ctrl/Cmd+,)
  2. 对于VSCode: 搜索“mcp”,然后单击“在settings.json中编辑”
  3. 对于光标: 首选 工具和集成新建MCP服务器
  4. 添加此配置:

VSCode(settings.json):

{
  "mcp.servers": {
    "merge-request-summarizer": {
      "command": "python",
      "args": ["-m", "mcp_mr_summarizer.server"]
    }
  }
}

光标(GUI或settings.json):

  • 姓名: merge-request-summarizer
  • 命令: python
  • 论据: ["-m", "mcp_mr_summarizer.server"]

游标(可选JSON格式):

{
  "mcpServers": {
    "merge-request-summarizer": {
      "command": "python",
      "args": ["-m", "mcp_mr_summarizer.server"]
    }
  }
}

对于Claude Desktop:

  1. 转到“设置”→ MCP服务器
  2. 使用此配置添加新服务器:
{
  "mcpServers": {
    "merge-request-summarizer": {
      "command": "python",
      "args": ["-m", "mcp_mr_summarizer.server"]
    }
  }
}

即用型配置文件

从复制相应的配置 configs/ 文件夹:

  • configs/vscode_settings.json -对于VSCode
  • configs/cursor_settings.json -对于光标
  • configs/claude_desktop_config.json -适用于克劳德桌面

configs/README.md 有关详细的设置说明。

🎯 定制

添加自定义提交类别

通过修改来扩展分类 categorize_commit 方法:

def categorize_commit(self, commit: CommitInfo) -> List[str]:
    categories = []
    message_lower = commit.message.lower()
    
    # Add your custom patterns
    if any(word in message_lower for word in ['security', 'vulnerability']):
        categories.append('security')
    
    # ... existing patterns ...
    
    return categories

自定义文件类别

添加自定义文件类型类别:

def _categorize_files(self, files: set) -> Dict[str, List[str]]:
    categories = {
        'Services': [],
        'Models': [],
        'Controllers': [],
        'Tests': [],
        'Configuration': [],
        'Documentation': [],
        'CustomCategory': [],  # Add your custom category
        'Other': []
    }
    
    for file in files:
        if 'CustomPattern' in file:  # Add your custom pattern
            categories['CustomCategory'].append(file)
        # ... existing patterns ...
    
    return categories

🧪 测试

# Run tests
python -m pytest tests/

# Run with coverage
python -m pytest tests/ --cov=mcp_mr_summarizer --cov-report=html

🤝 贡献

  1. 分叉存储库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 进行更改
  4. 为您的更改添加测试
  5. 运行测试套件
  6. 提交您的更改(git commit -m 'Add some amazing feature')
  7. 推到分支(git push origin feature/amazing-feature)
  8. 打开拉取请求

📝 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

  • 为模型上下文协议(MCP)生态系统构建
  • 受到对更好的合并请求文档需求的启发
  • 感谢所有贡献者和用户

📞 支持

  • 问题:
  • 讨论:
  • 文档: 维基

______________________________________________________________________

由以下材料制成❤️ 适用于希望更好地合并请求摘要的开发人员

目录标签

目录标签

开发工具代码管理PythonClaude代码审查本地部署自动化Git集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP