github-mcp
Servidor MCP de GitHub
Servidor MCP local de OpenCode para flujos de trabajo seguros de desarrollador en GitHub: extraer main, crear una rama de función, enviarla y abrir una solicitud de extracción lista para revisión.
Entorno
Establezca estas variables en su shell. No confirme secretos reales.
export GH_TOKEN="your_github_token_here"
export GITHUB_MCP_ALLOWED_ROOTS="/Users/matiasbinagora/Projects"
export GITHUB_MCP_DEFAULT_BASE_BRANCH="main"
export GITHUB_MCP_DEFAULT_REMOTE="origin"
export GITHUB_MCP_REQUIRE_CLEAN_WORKTREE="true"Se recomienda GH_TOKEN. Si no está configurado, el servidor aún puede funcionar cuando gh ya está autenticado localmente.
Related MCP server: GitHub MCP Server
Compilación
npm install
npm run buildPrueba de humo
Esto crea un repositorio local temporal, extrae main, crea una rama de prueba, confirma un archivo, envía la rama y verifica que la rama remota exista.
npm run smokePrueba de integración de GitHub
Esto crea una rama real y una PR lista para revisión en el repositorio de prueba configurado.
export GITHUB_MCP_SMOKE_REPO_PATH="/Users/matiasbinagora/Projects/binagora"
npm run smoke:githubConfiguración de OpenCode
Agregue esto a la configuración global de OpenCode en ~/.config/opencode/opencode.json.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"github": {
"type": "local",
"command": ["node", "/Users/matiasbinagora/Projects/github-mcp/dist/index.js"],
"enabled": true,
"environment": {
"GH_TOKEN": "{env:GH_TOKEN}",
"GITHUB_MCP_ALLOWED_ROOTS": "/Users/matiasbinagora/Projects",
"GITHUB_MCP_DEFAULT_BASE_BRANCH": "main",
"GITHUB_MCP_DEFAULT_REMOTE": "origin",
"GITHUB_MCP_REQUIRE_CLEAN_WORKTREE": "true"
}
}
}
}Si OpenCode se inicia antes de que su shell exporte GH_TOKEN, use este comando en su lugar para que el servidor MCP cargue ~/.zshrc antes de iniciarse:
"command": [
"zsh",
"-lc",
"source \"$HOME/.zshrc\" >/dev/null 2>&1; exec node \"/Users/matiasbinagora/Projects/github-mcp/dist/index.js\""
]Herramientas
github_repo_statusgithub_pull_maingithub_create_feature_branchgithub_push_feature_branchgithub_create_pull_requestgithub_prepare_feature_workflow
Notas de seguridad
Los repositorios deben estar dentro de
GITHUB_MCP_ALLOWED_ROOTS.No se expone ninguna herramienta de ejecución de shell genérica.
Se rechazan las inserciones directas a
mainomaster.Las inserciones forzadas y la eliminación de ramas no están implementadas.
Se requiere un árbol de trabajo limpio antes de extraer, crear ramas y crear PR de forma predeterminada.
Los nombres de las ramas se validan con
git check-ref-format --branch.
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
- FlicenseNot gradedqualityDmaintenanceStandalone MCP server for GitHub that enables repository management, branch operations, pull request handling, and commit retrieval via tools listed in the README.1
- AlicenseBqualityBmaintenanceSimple MCP server for GitHub operations, currently supports creating repositories.5111MIT
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that handles git operations on behalf of AI coding assistants, running as a local HTTP service without external network exposure by default.MIT
- FlicenseBqualityBmaintenanceA lightweight MCP server that acts as a secure proxy for AI assistants to run local Git operations and GitHub API macros simultaneously.1
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
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/matiasnjacob/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server