发行说明服务器
一个从GitHub存储库生成精美发布说明的MCP服务器。它高效地获取提交,按类型组织它们,并以干净、可读的格式呈现它们。
特性
- 🎯 按日期或SHA进行智能提交过滤
- 📊 按类型(功能、修复等)分组提交
- 🔍 用PR数据丰富承诺
- 📈 包括详细统计数据
- 🎨 使用表情符号清除标记格式
- ⚡ 使用GitHub的高效API
since参数
安装
npm install
npm run build用法
将此服务器添加到MCP配置中:
{
"mcpServers": {
"release-notes": {
"command": "node",
"args": ["/path/to/release-notes-server/build/index.js"],
"env": {
"GITHUB_TOKEN": "your-github-token"
}
}
}
}可用工具
generate_release_notes
为GitHub存储库生成发行说明。
参数:
{
"owner": string, // Repository owner
"repo": string, // Repository name
"commitRange": {
"fromCommit"?: string, // Starting commit SHA
"toCommit"?: string // Ending commit SHA
},
"format": {
"type": "markdown", // Output format
"groupBy": "type", // How to group commits
"includeStats": boolean // Include commit statistics
}
}例子:
const result = await use_mcp_tool({
server_name: "release-notes",
tool_name: "generate_release_notes",
arguments: {
owner: "owner",
repo: "repo",
commitRange: {
fromCommit: "abc123" // Get commits from this SHA
},
format: {
type: "markdown",
groupBy: "type",
includeStats: true
}
}
});输出格式
生成的发行说明包括:
- 带有生成日期和统计信息的标题
- 按提交类型分组的部分:
- 🚀 特性 - 🐛 修复 - 📚 文档 - ⚡ 演出 - ♻️ 重构 - 🧪 测试 - 🏗️ 构建 - 🔧 其他
- 详细统计数据包括:
- 提交总数 - 突破性变化 - 按类型提交 - 作者承诺
环境变量
GITHUB_TOKEN:具有repo访问权限的GitHub个人访问令牌
实现细节
服务器通过以下方式实现了高效的提交获取:
- 使用GitHub
since参数(如果可能),以减少API调用 - 需要时,退回到基于SHA的过滤
- 正确处理分页
- 维护发布说明的最新首次订购
- 在可用时用PR数据丰富承诺
许可证
麻省理工学院
