Skip to main content
Glama

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 build

Prueba 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 smoke

Prueba 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:github

Configuració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_status

  • github_pull_main

  • github_create_feature_branch

  • github_push_feature_branch

  • github_create_pull_request

  • github_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 main o master.

  • 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.

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Standalone MCP server for GitHub that enables repository management, branch operations, pull request handling, and commit retrieval via tools listed in the README.
    1
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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
  • F
    license
    B
    quality
    B
    maintenance
    A lightweight MCP server that acts as a secure proxy for AI assistants to run local Git operations and GitHub API macros simultaneously.
    1

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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