Github

io.github.davidweb3-ctrl由 GitHub 账号 davidweb3-ctrl 发布v1.0.0更新于 Oct 24, 2026

GitHub MCP Server - List PRs, issues, repo info, and search code

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手读取 GitHub 仓库:列出和查看拉取请求与议题、获取仓库信息、搜索代码。

可以做什么
列出和查看拉取请求,可按状态、源分支和目标分支筛选,支持排序与分页,并可选择包含单个 PR 的 diff。列出和查看议题,可按状态、标签、负责人和创建者筛选,并可选择包含评论。获取指定所有者和仓库的仓库信息与统计。使用 GitHub 代码搜索语法跨 GitHub 搜索代码,支持排序与分页。
适用场景
适合在工作过程中让助手查询 GitHub 动态:查看开放的拉取请求、阅读议题讨论、检查仓库元数据,或在 GitHub 上查找代码示例。它只读取数据,适合查看和研究,而不是修改仓库。
运行要求
通过 npm(npx 或全局安装)作为本地进程运行。需要在 GITHUB_TOKEN 环境变量中提供 GitHub 个人访问令牌,并需要访问 GitHub API 的网络连接。
安装前请注意
服务器需要 GITHUB_TOKEN 中的 GitHub 个人访问令牌;请尽量缩小其权限范围,因为该令牌的权限决定了助手能访问的内容。查询和结果会发送到 GitHub API。所列工具只读取数据,但令牌本身是需要保护的凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Github,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

GitHub MCP Server

[npm version] [License: MIT]

A Model Context Protocol (MCP) server for GitHub operations. This server enables AI assistants to interact with GitHub repositories through a standardized interface.

Features

  • 🔍 List & View Pull Requests - Browse PRs with filtering options
  • 📋 List & View Issues - Access issues with labels, assignees, and comments
  • 📊 Repository Info - Get repository statistics and metadata
  • 🔎 Code Search - Search code across GitHub repositories

Installation

bash
npm install -g @bountyclaw/mcp-github-server

Configuration

Set your GitHub token as an environment variable:

bash
export GITHUB_TOKEN=your_github_token_here

Or pass it when creating the client programmatically.

Usage with Claude Code

Add to your Claude Code MCP settings:

json
{  "mcpServers": {    "github": {      "command": "npx",      "args": ["-y", "@bountyclaw/mcp-github-server"],      "env": {        "GITHUB_TOKEN": "your_github_token_here"      }    }  }}

Available Tools

1. github_pr_list

List pull requests for a repository.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • state (enum, optional): Filter by state (open, closed, all)
  • head (string, optional): Filter by head branch
  • base (string, optional): Filter by base branch
  • sort (enum, optional): Sort field
  • direction (enum, optional): Sort direction
  • per_page (number, optional): Results per page (max 100)
  • page (number, optional): Page number

2. github_pr_view

View details of a specific pull request.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • pull_number (number, required): PR number
  • include_diff (boolean, optional): Include diff content

3. github_issue_list

List issues for a repository.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • state (enum, optional): Filter by state
  • labels (string, optional): Comma-separated label names
  • assignee (string, optional): Filter by assignee
  • creator (string, optional): Filter by creator
  • sort (enum, optional): Sort field
  • direction (enum, optional): Sort direction
  • per_page (number, optional): Results per page
  • page (number, optional): Page number

4. github_issue_view

View details of a specific issue.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name
  • issue_number (number, required): Issue number
  • include_comments (boolean, optional): Include comments

5. github_repo_info

Get repository information and statistics.

Input:

  • owner (string, required): Repository owner
  • repo (string, required): Repository name

6. github_search_code

Search code across GitHub.

Input:

  • query (string, required): Search query (GitHub code search syntax)
  • sort (enum, optional): Sort field (indexed, best-match)
  • order (enum, optional): Sort order
  • per_page (number, optional): Results per page
  • page (number, optional): Page number

Example Queries

"List open PRs in facebook/react""Show me issue #123 in microsoft/vscode""Get info about the kubernetes/kubernetes repo""Search for 'useEffect' in TypeScript files"

Development

bash
# Install dependenciesnpm install
# Buildnpm run build
# Run testsnpm test
# Run tests with coveragenpm run test:coverage
# Lintnpm run lint
# Formatnpm run format

Testing

The project includes comprehensive unit tests with 90%+ coverage:

  • GitHub API client tests
  • Tool handler tests for all 6 tools
  • Error handling tests
  • Input validation tests
bash
npm test

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Built with 🦞 by BountyClaw

来源:README.md,提交 361f6bc

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分