github-mcp-proxy
github-mcp-proxy
Un servidor MCP de GitHub autohospedado que se ejecuta en Cloudflare Workers, diseñado para uso personal o de equipos pequeños con barreras de seguridad por repositorio para agentes de IA.
Cualquier agente compatible con MCP (Claude, Codex, ChatGPT, Cursor, Cline, …) puede conectarse, con un control estricto sobre qué repositorios puede tocar y cómo.
[!WARNING] Si necesitas seguridad o estabilidad, utiliza el servidor MCP oficial de GitHub. Puedes hacer fork libremente; los problemas de seguridad son tu responsabilidad una vez realizado el fork.
Por qué
Los tokens genéricos de GitHub otorgan al agente acceso total a la cuenta. Este servidor limita eso:
Niveles de permiso por repositorio —
read/issues/fullProtección de ramas — las nuevas ramas deben coincidir con un prefijo (por defecto
claude/);main/masternunca son editablesPolítica de mensajes de commit — Conventional Commits, validados en el lado del servidor
Lista blanca de etiquetas —
allowedLabelspor repositorio; el servidor nunca crea etiquetas automáticamente en GitHubRutas prohibidas —
.github/workflows/**siempre bloqueadoRegistro de auditoría — cada escritura añade automáticamente trailers
Signed-off-by/Assisted-byo un pie de página que identifica al agente y al modelo
Related MCP server: Kontrol
Arquitectura
MCP agent ──(Streamable HTTP + OAuth)──▶ Cloudflare Worker
│
├── workers-oauth-provider (OAuth 2.1 server to MCP clients)
├── GitHub OAuth (OAuth client to github.com)
├── KV (session tokens)
├── Durable Object (MCP agent state)
└── Octokit (GitHub REST)La configuración (ghmcp.config.ts) se empaqueta con el Worker en el momento del despliegue; no hay lecturas de KV en tiempo de ejecución, validado mediante satisfies.
Inicio rápido
git clone <your-fork>
cd kz-github-mcp
npm install
cp ghmcp.config.sample.ts ghmcp.config.ts # edit: repos you want to expose
cp wrangler.sample.jsonc wrangler.jsonc # edit: KV id + worker name
cp .env.example .env # edit: for local dev onlyCrea una GitHub OAuth App (Página de inicio = https://<worker>.<subdomain>.workers.dev, Callback = /callback), luego:
wrangler kv namespace create "OAUTH_KV" # add the id to wrangler.jsonc
wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET
wrangler secret put COOKIE_ENCRYPTION_KEY # openssl rand -hex 32
npm run deployDesarrollo local: mismo flujo con una segunda OAuth App apuntando a http://localhost:8788, credenciales en .env, luego npm run dev.
Despliegue continuo (opcional)
.github/workflows/deploy.yml despliega en Cloudflare en cada push a main. Configura dos secretos de repositorio en GitHub Settings → Secrets and variables → Actions:
Secreto | Dónde obtenerlo |
| Cloudflare dashboard → My Profile → API Tokens → crea un token con la plantilla "Edit Cloudflare Workers" |
| Cloudflare dashboard → barra lateral derecha de cualquier página de Workers |
Las credenciales de GitHub OAuth (GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, COOKIE_ENCRYPTION_KEY) residen como secretos de Wrangler en el propio Worker, no en GitHub Actions; solo necesitas configurarlos una vez con wrangler secret put.
Consulta docs/ARCHITECTURE.md para saber cómo funciona, y docs/CONFIG.md para cada campo de configuración.
Conectar un agente de IA
Claude (claude.ai) — Settings → Connectors → Add custom connector → pega https://<worker>.<subdomain>.workers.dev/sse.
Claude Code / Codex / Cursor / Cline — añade a la configuración MCP del cliente:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["mcp-remote", "https://<worker>.<subdomain>.workers.dev/sse"]
}
}
}Cualquier host MCP — apúntalo al mismo endpoint /sse. El flujo de OAuth se ejecuta en la primera conexión.
Para enseñar al agente cómo usar las herramientas correctamente, incluye SKILL.md en su prompt del sistema / instrucciones del proyecto / directorio de habilidades.
Herramientas
Prefijadas con ghmcp_. Cada una declara un nivel de permiso mínimo; el servidor deniega las llamadas por debajo de ese nivel.
Categoría | Herramientas | Nivel mín. |
Usuario |
| read |
Repositorio |
| read |
Issues |
| read |
Issues |
| issues |
PRs |
| read |
PRs |
| issues |
Archivos |
| full |
Acciones |
| read |
Cualquier herramienta puede desactivarse mediante disabledTools en la configuración.
Validación
npm run validate-configUtiliza la CLI gh para confirmar que cada repositorio en ghmcp.config.ts existe y que cada etiqueta en allowedLabels está presente en GitHub. Se ejecuta automáticamente como un hook prebuild, por lo que un error tipográfico hace que falle npm run build.
Licencia
Originalmente derivado de cloudflare/ai/demos/remote-mcp-github-oauth. Bajo licencia MIT.
Esta herramienta está bajo licencia MIT. — ver LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
AgentGuard — 20-tool AI safety MCP: policy preflight, risk scoring, audit logging, rate limits.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA local MCP server that provides controlled repository access with policy-based file filtering, secret redaction, and audit logging for AI coding agents.-
- AlicenseNot gradedqualityBmaintenanceA self-hosted MCP server that enables AI coding agents to read, edit, search, and run code in local projects with human review loops and policy controls.MIT
- AlicenseCqualityBmaintenanceA policy-aware MCP server for GitHub and GitHub Actions that enables safe AI-assisted infrastructure workflows—inspecting repositories, preparing branches and pull requests, and constrained remote mutations behind explicit preview-bound approval tokens.18MIT
- AlicenseNot gradedqualityBmaintenanceA local-first MCP server that lets AI agents use gated APIs without holding keys, enforcing declarative policies, injecting secrets server-side, and auditing access without content.2Apache 2.0
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/kazaminn/github-mcp-proxy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server