GitHub MCP Agent
GitHub MCP Agent
用自然语言提问关于 GitHub 仓库的问题,并获取基于实时 GitHub 数据的答案。在 Cloudflare 上,一个 Worker 调用任意 LLM 提供商(Google、OpenAI、DeepSeek、Cloudflare、Groq 或自定义兼容 OpenAI 的 API)并实现工具调用,通过 REST API 实现 GitHub 工具。在本地,你仍然可以运行原始的 Streamlit 应用,通过 Docker 与官方的 GitHub MCP 服务器通信。
这是来自 Shubhamsaboo/awesome-llm-apps 的 GitHub MCP 代理的独立打包。原始代码位于一个大型示例集合中;此仓库是一个自包含的项目,你可以克隆、运行和部署。
功能
将应用指向任意 owner/repo,输入一个问题,即可获得基于实时 GitHub 数据的结构化答案——而不是通用的 LLM 猜测。典型问题:
哪些 issue 被标记为 bug?
哪些 pull request 仍需审核?
最近合并了什么?
这个仓库活跃度如何?
代理以 markdown 格式输出答案,包括表格和指向 GitHub 的链接(如有帮助)。
Related MCP server: GitHub Tools MCP Server
特性
自然语言查询:针对 issues、pull requests、仓库元数据、文件和搜索
Cloudflare Worker + 静态聊天 UI:用于托管使用(任意 LLM 提供商 + GitHub REST)
官方 GitHub MCP 服务器(可选本地路径):通过 Docker 运行原始 Streamlit 应用
自带 LLM 密钥:Google、OpenAI、DeepSeek、Cloudflare Workers AI、Anthropic、Groq、OpenRouter、Mistral、xAI、Together 或任何兼容 OpenAI 的端点
侧边栏认证、提供商选择器和模型字段、查询模板和自定义问题
可选的
.env/.dev.vars加载:可将密钥保留在 UI 之外
托管架构(Cloudflare)
Streamlit 和 GitHub MCP Docker 镜像无法在 Cloudflare Pages/Workers 上运行。托管应用是同一产品的 Cloudflare 原生重构:
┌─────────────────┐ POST /api/chat (SSE) ┌──────────────────┐
│ Static chat UI │ ────────────────────────────► │ Cloudflare Worker│
│ public/ │ │ Any LLM + tools │
└─────────────────┘ └────────┬─────────┘
│ GitHub REST
▼
┌──────────────────┐
│ api.github.com │
└──────────────────┘Worker 从
public/提供聊天 UI,并处理/api/*。聊天请求调用你选择的 LLM,并附带与 MCP 的
repos、issues和pull_requests工具集(加上文件和搜索)等效的 GitHub 工具。Worker 使用
GITHUB_TOKEN针对 GitHub REST API 执行这些工具。令牌可以来自 Wrangler 密钥或侧边栏(
X-LLM-Key、X-GitHub-Token)。侧边栏值会覆盖该请求的密钥。
在 Cloudflare 上部署
前提条件
Node.js 18+
一个 Cloudflare 账户
来自任意提供商(Google、OpenAI、DeepSeek、Cloudflare、Groq……)的 LLM API 密钥
GitHub 个人访问令牌(不要提交)
git clone https://github.com/MadanMohan0537/github-mcp-agent.git
cd github-mcp-agent
npm install
npx wrangler login
npx wrangler secret put LLM_API_KEY
npx wrangler secret put GITHUB_TOKEN
npx wrangler secret put LLM_PROVIDER
npm run deploy部署后,Wrangler 会打印一个 *.workers.dev URL。UI 和 API 同源。
本地 Cloudflare 开发
copy .dev.vars.example .dev.vars使用真实密钥编辑 .dev.vars(切勿提交),然后:
npm run dev打开 Wrangler 打印的 URL(通常是 http://127.0.0.1:8787)。
变量 | 必需 | 用途 |
| 是(用于查询) | 任意提供商密钥:Google、OpenAI、DeepSeek、Groq、Cloudflare 等。 |
| 否 |
|
| 否 | 该提供商的模型 ID |
| 自定义 / Cloudflare 覆盖 | 兼容 OpenAI 的基础 URL |
| Cloudflare Workers AI | 用于构建 Workers AI URL 的账户 ID |
| 是(用于查询) | 认证 GitHub REST 调用 |
提供商别名 | 否 |
|
你也可以在侧边栏中输入密钥。该字段标记为 LLM API key,并非仅限 OpenAI。侧边栏值仅作为请求头发送到此 Worker。
令牌作用域:
公共仓库:
public_repo足够私有仓库:
repo
可选的本地路径:Streamlit + GitHub MCP Docker
原始的 Python 应用未做更改。它使用 Agno、Streamlit 和 ghcr.io/github/github-mcp-server。
┌─────────────────┐ natural-language query ┌──────────────────┐
│ Streamlit UI │ ───────────────────────────────► │ Agno Agent │
│ github_agent.py│ │ (any LLM) │
└─────────────────┘ └────────┬─────────┘
│ MCP tools
▼
┌──────────────────┐
│ Docker container │
│ github-mcp-server│
└────────┬─────────┘
│ GitHub API
▼
┌──────────────────┐
│ api.github.com │
└──────────────────┘前提条件
要求 | 说明 |
Python 3.10+ | 针对 3.12 开发 |
必须运行;GitHub MCP 服务器是一个容器 | |
LLM API 密钥 | Google、OpenAI、DeepSeek、Cloudflare、Groq 或任何兼容 OpenAI 的提供商 |
GitHub 个人访问令牌 |
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .env
streamlit run github_agent.py或者在安装虚拟环境后运行 . un.ps1 / run.bat。打开 Streamlit 打印的 URL(通常是 http://localhost:8501)。
首次 Docker 拉取 ghcr.io/github/github-mcp-server 可能需要一分钟。查询超时时间为 120 秒。
使用示例
仓库:Shubhamsaboo/awesome-llm-apps
Issues
在 Shubhamsaboo/awesome-llm-apps 中查找标记为 bug 的 issue哪些 issue 正在被积极讨论?
Pull requests
哪些 PR 需要审核?显示最近合并的 PR
仓库
显示仓库健康指标显示仓库活动模式分析代码质量趋势
将每个问题集中在一个领域(issues、PRs 或仓库统计)。宽泛的提示耗时更长,且答案更嘈杂。
项目布局
github-mcp-agent/
├── public/ # Cloudflare static chat UI
├── src/ # Worker: multi-provider LLM agent + GitHub REST tools
├── wrangler.toml # Workers + assets project
├── package.json # npm run dev / npm run deploy
├── github_agent.py # Optional local Streamlit + MCP Docker app
├── requirements.txt
├── .env.example
├── .dev.vars.example
├── LICENSE # Apache License 2.0 (from the original project)
├── NOTICE
└── README.md故障排除
症状 | 检查内容 |
| 侧边栏密钥、 |
| 侧边栏令牌、 |
Worker 部署要求登录 | 运行 |
Docker 错误 / 未找到 | 仅 Streamlit 路径需要;安装 Docker 并启动守护进程 |
超时 / 答案被截断 | 缩小查询范围;托管工具结果会被裁剪以保持 Worker/LLM 限制 |
关于 | Streamlit 路径:从此仓库的 |
来自 GitHub 的 401 / 权限错误 | 令牌过期,或缺少 |
归属
基于 Shubhamsaboo/awesome-llm-apps 中的 GitHub MCP Agent,具体为:
mcp_ai_agents/github_mcp_agent
上游教程:Build an MCP GitHub agent in less than 50 lines of code。
此仓库是一个独立的独立检出,包含文档、Cloudflare Workers 主机和小的打包更改。它不是官方的 GitHub 或 Cloudflare 产品。
许可证
原始 awesome-llm-apps 项目采用 Apache License 2.0 许可。此衍生作品保留该许可证。请参阅 NOTICE 了解来源归属。
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
- AlicenseAqualityDmaintenanceAn MCP server that enables analyzing and querying GitHub repositories through the GitHub Chat API, allowing users to index repositories and ask questions about their code, architecture and tech stack.286MIT
- Flicense-quality-maintenanceModel Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.1
- Flicense-qualityDmaintenanceA production-ready server featuring over 28 tools for comprehensive GitHub analysis, including repository metadata, issue tracking, and workflow monitoring. It enables users to search repositories, analyze contributor activity, and inspect codebase health through natural language.1
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server that connects Claude AI directly to the GitHub API, enabling natural language queries for live repository data, issues, PRs, and contributions.1
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
GibsonAI MCP server: manage your databases with natural language
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
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/MadanMohan0537/github-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server