GitHub MCP
GitHub MCP
一个通用的、只读的远程 MCP 连接器,用于查询通过 GitHub App 安装所选定的 GitHub 仓库。它专为自托管而设计,不包含任何 GitHub、Cloudflare 或 MCP 客户端的账户标识符。
该连接器使用两层授权机制:
用户授权 GitHub App 以证明其 GitHub 身份。只有操作者配置的登录账号才能完成连接。
工具调用使用短期有效的 GitHub App 安装令牌,并限定作用范围仅限被请求的已安装仓库。
GitHub 用户令牌在身份验证完成后即被丢弃。该连接器不暴露任何写入工具。
功能
发现 GitHub App 安装中所选定的仓库。
搜索代码并获取文本文件或目录列表。
检查提交、拉取请求、差异、审查和评论。
检查议题及议题评论。
使用 OAuth、PKCE 和 Dynamic Client Registration 对远程 MCP 客户端进行身份验证。
Related MCP server: GitHub MCP Server
本地开发
要求:Node 22 或更高版本,以及 Yarn 1.22。
yarn install
yarn type-check
yarn lint
yarn test
yarn build测试使用模拟身份和模拟的 GitHub 服务。本地验证无需 GitHub App 或 Cloudflare 账户。
要让 Worker 对接真实服务运行,请遵循操作设置者指南。请勿将 wrangler.jsonc、本地机密或 GitHub App 私钥提交到版本库。
MCP 工具
工具 | 用途 |
| 列出在应用安装中选择的仓库。 |
| 在单个已安装的仓库内搜索。 |
| 列出仓库在某个引用(ref)下的目录。 |
| 获取 UTF-8 文本文件,可选择按行范围获取。 |
| 检查仓库历史。 |
| 检查拉取请求、文件、审查和评论。 |
| 获取拉取请求的统一差异(unified diff)。 |
| 检查议题及评论。 |
结果为 GitHub API 实时响应,并经过规范化处理(不包含,包含规范 URL 的有限 JSON)。分页默认一次 20 项,最多 50 项。文本和 diff 输出上限为 100,000 个字符。
安全模型
AUTHORIZED_GITHUB_LOGINS为必填项;为空时默认拒绝(fail closed)。GitHub App 的安装决定了哪些仓库对连接器 `to 可用。
每次仓库工具调用仅生成一个对该仓库有效的一小时令牌。
所需 GitHub App 权限为只读的 Metadata、Contents、Issues 和 Pull Requests。
OAuth 授权码、用户令牌、安装令牌、客户端机密和私钥永远不会被返回,也不会被有意记录到日志中。
本项目定位为个人或小团队使用的连接器,而非托管的多租户服务。
许可证
本项目基于 MIT 许可证 发布。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRead-only GitHub MCP server that lets assistants search and read repositories, issues, pull requests, commits, and file contents, scoped to the user's personal access token.MIT
- AlicenseNot gradedqualityDmaintenanceEnables GitHub API integration via MCP, allowing search, repository details, file contents, and issue management.452ISC
- FlicenseNot gradedqualityCmaintenanceRead-only MCP server for the GitHub REST API that enables agents to query repositories, issues, files, and users without any write access.
- AlicenseNot gradedqualityCmaintenanceProvides read-only access to GitHub repositories and issues through standardized MCP tools, with caching to handle API rate limits.1MIT
Related MCP Connectors
GitHub Private MCP Pack — access private repos, org data via OAuth.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Read-only GitHub bounty, agent harness, Actions failure, flake, and MCP tool-drift decisions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/charlesnpx/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server