GitHub MCP Agent
A server that enables natural-language queries about GitHub repositories and returns answers backed by live GitHub data.
README
GitHub MCP Agent
Ask natural-language questions about GitHub repositories and get answers backed by live GitHub data. On Cloudflare, a Worker calls any LLM provider (Google, OpenAI, DeepSeek, Cloudflare, Groq, or a custom OpenAI-compatible API) with tool calling and implements GitHub tools through the REST API. Locally, you can still run the original Streamlit app that talks to the official GitHub MCP server over Docker.
This is a standalone packaging of the GitHub MCP agent from Shubhamsaboo/awesome-llm-apps. The original lives inside a large examples collection; this repository is a self-contained project you can clone, run, and deploy.
What it does
Point the app at any owner/repo, type a question, and get a structured answer backed by live GitHub data — not a generic LLM guess. Typical questions:
- Which issues are labeled as bugs?
- Which pull requests still need review?
- What has merged recently?
- How active is this repository?
The agent formats answers in markdown, including tables and links back to GitHub when they help.
Features
- Natural-language queries over issues, pull requests, repository metadata, files, and search
- Cloudflare Worker + static chat UI for hosted use (any LLM provider + GitHub REST)
- Official GitHub MCP server (optional local path) via Docker for the original Streamlit app
- Bring your own LLM key: Google, OpenAI, DeepSeek, Cloudflare Workers AI, Anthropic, Groq, OpenRouter, Mistral, xAI, Together, or any OpenAI-compatible endpoint
- Sidebar auth, provider picker, and model field, query templates, and custom questions
- Optional
.env/.dev.varsloading so you can keep keys out of the UI
Hosted architecture (Cloudflare)
Streamlit and the GitHub MCP Docker image cannot run on Cloudflare Pages/Workers. The hosted app is a Cloudflare-native rebuild of the same product:
┌─────────────────┐ POST /api/chat (SSE) ┌──────────────────┐
│ Static chat UI │ ────────────────────────────► │ Cloudflare Worker│
│ public/ │ │ Any LLM + tools │
└─────────────────┘ └────────┬─────────┘
│ GitHub REST
▼
┌──────────────────┐
│ api.github.com │
└──────────────────┘
- The Worker serves the chat UI from
public/and handles/api/*. - Chat requests call your chosen LLM with GitHub tools equivalent to the MCP
repos,issues, andpull_requeststoolsets (plus files and search). - The Worker executes those tools against the GitHub REST API using
GITHUB_TOKEN. - Tokens can come from Wrangler secrets or from the sidebar (
X-LLM-Key,X-GitHub-Token). Sidebar values override secrets for that request.
Deploy on Cloudflare
Prerequisites
- Node.js 18+
- A Cloudflare account
- An LLM API key from any provider (Google, OpenAI, DeepSeek, Cloudflare, Groq, …)
- GitHub personal access token (not committed)
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
After deploy, Wrangler prints a *.workers.dev URL. The UI and API are same-origin.
Local Cloudflare development
copy .dev.vars.example .dev.vars
Edit .dev.vars with real keys (never commit it), then:
npm run dev
Open the URL Wrangler prints (usually http://127.0.0.1:8787).
| Variable | Required | Purpose |
|---|---|---|
LLM_API_KEY |
Yes (for queries) | Any provider key: Google, OpenAI, DeepSeek, Groq, Cloudflare, etc. |
LLM_PROVIDER |
No | openai, google, deepseek, cloudflare, anthropic, groq, openrouter, mistral, xai, together, or custom |
LLM_MODEL |
No | Model id for that provider |
LLM_BASE_URL |
Custom / Cloudflare override | OpenAI-compatible base URL |
CLOUDFLARE_ACCOUNT_ID |
Cloudflare Workers AI | Account id used to build the Workers AI URL |
GITHUB_TOKEN |
Yes (for queries) | Authenticates GitHub REST calls |
| Provider aliases | No | GOOGLE_API_KEY, OPENAI_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, … |
You can also type keys into the sidebar. The field is labeled LLM API key, not OpenAI-only. Sidebar values are sent only to this Worker as request headers.
Token scopes:
- Public repositories:
public_repois enough - Private repositories:
repo
Optional local path: Streamlit + GitHub MCP Docker
The original Python app is unchanged. It uses Agno, Streamlit, and 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 │
└──────────────────┘
Prerequisites
| Requirement | Notes |
|---|---|
| Python 3.10+ | Developed against 3.12 |
| Docker | Must be running; the GitHub MCP server is a container |
| LLM API key | Google, OpenAI, DeepSeek, Cloudflare, Groq, or any OpenAI-compatible provider |
| GitHub personal access token | From github.com/settings/tokens |
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
copy .env.example .env
streamlit run github_agent.py
Or .\run.ps1 / run.bat after the venv is installed. Open the URL Streamlit prints (usually http://localhost:8501).
First Docker pull of ghcr.io/github/github-mcp-server can take a minute. Queries time out after 120 seconds.
Example usage
Repository: Shubhamsaboo/awesome-llm-apps
Issues
Find issues labeled as bugs in Shubhamsaboo/awesome-llm-appsWhat issues are being actively discussed?
Pull requests
What PRs need review?Show me recent merged PRs
Repository
Show repository health metricsShow repository activity patternsAnalyze code quality trends
Keep each question focused on one area (issues, PRs, or repo stats). Broad prompts take longer and produce noisier answers.
Project layout
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
Troubleshooting
| Symptom | What to check |
|---|---|
LLM API key not provided |
Sidebar key, .dev.vars, or npx wrangler secret put LLM_API_KEY |
GitHub token not provided |
Sidebar token, .dev.vars, or npx wrangler secret put GITHUB_TOKEN |
| Worker deploy asks you to log in | Run npx wrangler login and complete the browser OAuth flow |
Docker errors / docker not found |
Only needed for the Streamlit path; install Docker and start the daemon |
| Timeout / truncated answers | Narrow the query; hosted tool results are clipped to keep Worker/LLM limits |
ImportError about McpError / mcp |
Streamlit path: install from this repo’s requirements.txt (mcp>=1.9,<2.0) |
| 401 / permission errors from GitHub | Token expired, or missing repo / public_repo scope |
Attribution
Based on GitHub MCP Agent in Shubhamsaboo/awesome-llm-apps, specifically:
mcp_ai_agents/github_mcp_agent
Upstream tutorial: Build an MCP GitHub agent in less than 50 lines of code.
This repository is an independent standalone checkout with documentation, a Cloudflare Workers host, and small packaging changes. It is not an official GitHub or Cloudflare product.
License
The original awesome-llm-apps project is licensed under the Apache License 2.0. This derivative keeps that license. See NOTICE for source attribution.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。