一个提供工具来管理 GitHub 通知的 MCP(Model Context Protocol)服务器。此服务器允许像 Claude 这样的 AI 助手通过自然语言命令帮助您管理 GitHub 通知。
notifications
或 repo
范围的 GitHub 个人访问令牌(经典版)克隆此仓库
git clone https://github.com/yourusername/github-notifications-mcp-server.git cd github-notifications-mcp-server
安装依赖项
npm install
构建项目
npm run build
创建一个包含您的 GitHub 令牌的 .env
文件
GITHUB_TOKEN=your_github_personal_access_token_here
npm start
将服务器添加到您的 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 |
管理仓库订阅:所有活动、默认(参与和 @提及)或忽略(静音) |
以下是一些在连接服务器后可以与 Claude Desktop 一起使用的示例提示:
这台服务器会自动将 GitHub API URL 转换为其对应的网页 UI 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