Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Connector

License: MIT

把 GitHub 接入 Qoder:底层复用本机已安装并登录的 gh CLI,通过一个轻量 MCP server(无第三方依赖)暴露 PR、Issue、仓库分析、Actions/Release 四类能力。

  • 零额外凭据:沿用 gh auth login 的登录态(也支持 GH_TOKEN / GH_HOST 切换账号或 GitHub Enterprise)。
  • 零依赖安装:MCP server 是单文件 Node 脚本,启动器自动解析 node / gh 路径。
  • 写操作可控:只读工具可直接查询;创建、评论、审查、合并等写操作在 Qoder 中会先请求确认。

安装

1. 作为插件市场安装(推荐)

# Qoder CN
qoderclicn plugin marketplace add 'https://github.com/NuclearKAI/github-connector.git'
qoderclicn plugin install github-connector@github-connector
qoderclicn plugin list

# Qoder 国际版
qodercli plugin marketplace add 'https://github.com/NuclearKAI/github-connector.git'
qodercli plugin install github-connector@github-connector

没有 CLI 时,也可以在 Qoder 桌面端:扩展 → 插件 → 添加,填入仓库地址。

2. 从 Git 克隆后本地安装

# Qoder CN(国际版把 .qoder-cn 换成 .qoder)
mkdir -p "$HOME/.qoder-cn/plugins/marketplaces"
git clone https://github.com/NuclearKAI/github-connector.git \
  "$HOME/.qoder-cn/plugins/marketplaces/github-connector" --depth 1

然后在 ~/.qoder-cn/plugins/installed_plugins_v2.jsonplugins 中登记:

"github-connector@local": [
  {
    "scope": "user",
    "installPath": "/Users/<you>/.qoder-cn/plugins/marketplaces/github-connector",
    "version": "1.0.0",
    "installedAt": "2026-09-15T14:07:01.000Z",
    "lastUpdated": "2026-09-15T14:07:01.000Z",
    "userVisible": true
  }
]

并在 ~/.qoder-cn/settings.json 中启用:

{ "enabledPlugins": { "github-connector@local": true } }

重启 Qoder(或重载插件)后生效。

3. 从 ZIP 安装(企业/离线)

下载 github-connector-1.0.0.zip,在 Qoder 桌面端 扩展 → 插件 → 添加 中选择该文件。

前置条件

gh auth status   # 需要处于已登录状态

目录结构

github-connector/
├── .qoder-plugin/
│   ├── plugin.json          # 插件清单
│   └── marketplace.json     # 单插件仓库的市场清单(Qoder)
├── .claude-plugin/
│   └── marketplace.json     # 兼容 Claude Code 的市场清单
├── mcp.json                 # Connector 声明(mcpServers.github)
├── bin/github-connector     # 启动器:解析 node / gh 路径
├── server/github-connector.mjs  # MCP stdio server(零依赖,29 个工具)
├── LICENSE
└── README.md

提供的能力

分组 工具
状态 github_status
仓库分析 github_repo_viewgithub_file_treegithub_file_readgithub_commits_listgithub_branches_listgithub_contributorsgithub_searchgithub_api_get
PR github_pr_listgithub_pr_viewgithub_pr_checksgithub_pr_creategithub_pr_reviewgithub_pr_mergegithub_pr_commentgithub_pr_close
Issue github_issue_listgithub_issue_viewgithub_issue_creategithub_issue_editgithub_issue_commentgithub_issue_close
CI/Actions github_run_listgithub_run_viewgithub_run_rerun
Release github_release_listgithub_release_viewgithub_release_create

写操作(*_create*_edit*_comment*_review*_merge*_close*_rerun)会修改 GitHub 上的真实状态,调用前应先向用户确认目标与内容。

repo 参数缺省时使用当前工作目录的仓库;不在仓库中时请显式传入 "owner/name"

环境变量

变量 作用
GITHUB_CONNECTOR_GH 指定 gh 可执行文件路径(默认 gh
GITHUB_CONNECTOR_DEBUG 设为 1 时向 stderr 输出调试日志
GH_TOKEN / GH_HOST 透传给 gh CLI,用于切换账号或 GitHub Enterprise

开发

# 语法检查
node --check server/github-connector.mjs

# 交互式冒烟测试(握手 + 工具列表)
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
  | bin/github-connector

许可

MIT © 2026 NuclearKAI

About

Qoder plugin: connect GitHub through your local gh CLI — PR review & merge, issue triage, repo analysis, Actions/CI and releases. Zero-dependency MCP connector.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages