GitHub Notifications MCP Server

GitHub Notifications MCP Server

site icon
2025.03.31 13
TypeScriptGitHub 通知管理AI 助手集成交流协作
GitHub Notifications MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,专门用于管理 GitHub 通知。它允许像 Claude 这样的 AI 助手通过自然语言命令帮助用户管理 GitHub 通知。该服务提供了丰富的功能,包括列出和过滤通知、标记通知为已读、查看通知线程详情、订阅或取消订阅线程、管理仓库特定通知等。
View on GitHub

Overview

基本能力

产品定位

GitHub Notifications MCP Server 是一个专门用于管理 GitHub 通知的服务,旨在通过自然语言命令简化 GitHub 通知的管理流程。

核心功能

  • 列出和过滤 GitHub 通知
  • 标记通知为已读
  • 查看通知线程详情
  • 订阅或取消订阅通知线程
  • 标记线程为完成
  • 管理仓库特定通知
  • 控制仓库通知设置(所有活动、默认或静音)

适用场景

  • 开发者需要快速查看和管理 GitHub 通知
  • 团队协作中需要批量处理通知
  • 需要自动化管理 GitHub 通知的工作流

工具列表

工具名称 描述
list-notifications 列出认证用户的所有 GitHub 通知
mark-notifications-read 将所有通知标记为已读
get-thread 获取通知线程的信息
mark-thread-read 将特定线程标记为已读
mark-thread-done 将线程标记为完成
get-thread-subscription 获取线程的订阅状态
set-thread-subscription 订阅线程
delete-thread-subscription 取消订阅线程
list-repo-notifications 列出特定仓库的通知
mark-repo-notifications-read 将仓库的通知标记为已读
manage-repo-subscription 管理仓库订阅:所有活动、默认(参与和@提及)或忽略(静音)

常见问题解答

  • 如何获取 GitHub 个人访问令牌? 需要创建一个 GitHub 个人访问令牌(经典),并确保包含 notificationsrepo 范围。
  • 如何与 Claude Desktop 集成? 需要在 claude_desktop_config.json 文件中添加服务器配置。

使用教程

使用依赖

  • Node.js 18 或更高版本
  • GitHub 个人访问令牌(经典)包含 notificationsrepo 范围

安装教程

  1. 克隆仓库 git clone https://github.com/yourusername/github-notifications-mcp-server.git cd github-notifications-mcp-server

  2. 安装依赖 npm install

  3. 构建项目 npm run build

  4. 创建 .env 文件并添加 GitHub 令牌 GITHUB_TOKEN=your_github_personal_access_token_here

调试方式

  • 直接运行服务器 npm start
  • 运行自动化测试 npm test
  • 手动测试 URL 转换 npm run test:url

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。