Skip to main content
Glama
GitHub Notifications MCP Server

GitHub Notifications MCP Server

by mcollina

GitHub 通知 MCP 服务器

一个 MCP(模型上下文协议)服务器,提供用于管理 GitHub 通知的工具。该服务器允许像 Claude 这样的 AI 助手通过自然语言命令帮助您管理 GitHub 通知。

特征

  • 列出并过滤您的 GitHub 通知

  • 将通知标记为已读

  • 查看通知线程详细信息

  • 订阅或取消订阅通知线程

  • 将话题标记为已完成

  • 管理特定于存储库的通知

  • 控制存储库通知设置(所有活动、默认或静音)

Related MCP server: mcp-github-server

先决条件

  • Node.js 18 或更高版本

  • 带有notifications或repo范围的 GitHub 个人访问令牌(经典)

安装

  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、默认(参与和@mentions)或忽略(静音)

示例提示

以下是服务器连接后您可以在 Claude Desktop 中使用的一些示例提示:

  • “你能查看我的 GitHub 通知吗?”

  • “显示过去 24 小时内未读的通知。”

  • “将我的所有通知标记为已读。”

  • “您能告诉我有关通知线程 12345 的信息吗?”

  • “取消我订阅主题 12345。”

  • “我对 octocat/Hello-World 存储库有哪些通知?”

  • “将来自 octocat/Hello-World 存储库的所有通知标记为已读。”

  • “监视 octocat/Hello-World 存储库上的所有活动。”

  • “将 octocat/Hello-World 存储库设置为默认设置(参与和 @mentions)。”

  • “检查 octocat/Hello-World 存储库的通知设置。”

  • “将来自 octocat/Hello-World 存储库的所有通知静音。”

发展

URL 处理

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

  • API网址: 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

执照

麻省理工学院

Available Tools

11 tools
delete-thread-subscriptionA

Unsubscribe from a GitHub notification thread

Inputs: thread_id (required).

get-threadC

Get information about a GitHub notification thread

Inputs: thread_id (required).

get-thread-subscriptionA

Get subscription status for a GitHub notification thread

Inputs: thread_id (required).

list-notificationsC

List GitHub notifications for the authenticated user

Inputs: all, participating, since, before, +2 more.

list-repo-notificationsC

List GitHub notifications for a specific repository

Inputs: owner (required), repo (required), all, participating, +4 more.

manage-repo-subscriptionC

Manage repository subscription settings including fine-grained notification preferences

Inputs: owner (required), repo (required), action (required), options.

mark-notifications-readC

Mark GitHub notifications as read

Inputs: last_read_at, read.

mark-repo-notifications-readC

Mark GitHub notifications for a specific repository as read

Inputs: owner (required), repo (required), last_read_at, read.

mark-thread-doneC

Mark a GitHub notification thread as done

Inputs: thread_id (required).

mark-thread-readC

Mark a GitHub notification thread as read

Inputs: thread_id (required).

set-thread-subscriptionC

Subscribe to a GitHub notification thread

Inputs: thread_id (required), ignored.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific notification actions like listing, marking, or managing subscriptions. The descriptions precisely differentiate operations by scope (e.g., list-notifications vs. list-repo-notifications) and action type, leaving no ambiguity for agent selection.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with hyphens, such as 'list-notifications' and 'mark-thread-read'. The naming is uniform across the set, making it predictable and easy for agents to parse and understand the intended operations.

    Tool Count5/5

    With 11 tools, the server is well-scoped for GitHub notifications, covering key operations like listing, marking, and managing subscriptions. Each tool serves a specific function without redundancy, making the count appropriate for the domain's complexity and user needs.

    Completeness5/5

    The tool set provides complete coverage for GitHub notification workflows, including CRUD-like operations (list, get, mark, delete) and lifecycle management (subscriptions, read/done status). There are no obvious gaps, ensuring agents can handle all typical notification tasks without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.
      4
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that gives Claude live access to your GitHub workspace — PR reviews, issue triaging, repo search, and weekly digest reports through natural language.
      7
      MIT