mcpField
G
GitHub Notifications MCP Server

GitHub Notifications MCP Server

本地服务
github.com/mcollina版本控制1682 周前更新

关于 GitHub Notifications MCP Server

GitHub Notifications MCP Server 让 AI 助手通过自然语言管理 GitHub 通知,涵盖通知筛选、线程操作以及仓库级订阅设置。

主要功能

  1. 01列出并筛选通知
  2. 02将通知和线程标为已读
  3. 03查看线程详情
  4. 04订阅或取消订阅线程
  5. 05管理仓库通知设置

适用场景

  1. 01查看未读 GitHub 通知
  2. 02静音或关注仓库动态
  3. 03将通知线程标记为完成

MCP 相关

该 MCP 服务向客户端提供列出和管理 GitHub 通知、线程及仓库通知设置的工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

暂未收录安装方式

我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。

代码仓库

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

GitHub 通知 MCP 服务

一个用于管理 GitHub 通知的 MCP(Model Context Protocol)服务。此服务可让 Claude 等 AI 助手通过自然语言命令帮助你管理 GitHub 通知。

功能

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

前提条件

  • Node.js 18 或更高版本
  • 具有 notifications 或 repo 权限范围的 GitHub 个人访问令牌(classic)

安装

  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. 创建包含 GitHub 令牌的 .env 文件

    GITHUB_TOKEN=your_github_personal_access_token_here
    

用法

直接运行服务
npm start
与 Claude Desktop 搭配使用

将服务添加到 claude_desktop_config.json 文件中:

{
  "mcpServers": {
    "github-notifications": {
      "command": "node",
      "args": ["/absolute/path/to/github-notifications-mcp-server/build/index.js"],
      "env": {
        "GITHUB_TOKEN": "your_github_personal_access_token_here"
      }
    }
  }
}

可用工具

工具名称描述
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管理仓库订阅:all_activity、default(参与的讨论和 @提及)或 ignore(静音)

示例提示词

连接服务后,你可以在 Claude Desktop 中使用以下示例提示词:

  • “可以帮我查看 GitHub 通知吗?”
  • “显示过去 24 小时内未读的通知。”
  • “将我的所有通知标记为已读。”
  • “可以告诉我有关通知线程 12345 的信息吗?”
  • “取消订阅线程 12345。”
  • “octocat/Hello-World 仓库有哪些通知?”
  • “将 octocat/Hello-World 仓库的所有通知标记为已读。”
  • “关注 octocat/Hello-World 仓库的所有活动。”
  • “将 octocat/Hello-World 仓库设为默认设置(参与的讨论和 @提及)。”
  • “查看 octocat/Hello-World 仓库的通知设置。”
  • “静音 octocat/Hello-World 仓库的所有通知。”

开发

URL 处理

此服务会自动将 GitHub API URL 转换为对应的 Web 界面 URL。例如:

  • API URL:https://api.github.com/repos/nodejs/node/pulls/57557
  • 转换为:https://github.com/nodejs/node/pull/57557

转换会处理以下内容:

  • 将域名从 api.github.com/repos 转换为 github.com
  • 修正拉取请求的路径(将 pulls 改为 pull)
  • 保留其他路径段
项目结构
github-notifications-mcp-server/
├── src/                    # Source code
│   ├── tools/              # Tool implementations
│   ├── types/              # Type definitions
│   ├── utils/              # Utility functions
│   ├── index.ts            # Entry point
│   └── server.ts           # Server configuration
├── build/                  # Compiled JavaScript
├── .env                    # Environment variables
├── package.json            # Dependencies
├── tsconfig.json           # TypeScript configuration
└── README.md               # Documentation
构建
npm run build
测试

运行自动化测试:

npm test

手动测试 URL 转换:

npm run test:url

许可证

MIT

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。