github-token-mcp
github-token-mcp
Implementación de spec.md. Servidor MCP exclusivo para el host que emite un token de acceso de instalación de GitHub App en cada ocasión para los agentes dentro de devcontainer.
Arquitectura técnica
MCP server:
@modelcontextprotocol/serverv2 (createMcpHandler+McpServer) servido mediante Streamable HTTP.Autenticación de GitHub App:
createAppAuthde@octokit/auth-app(la generación de JWT y el intercambio de tokens no se implementan manualmente).Obtención de la clave privada:
DesktopAuthde@1password/sdk— solicita cada vez el aviso de autenticación biométrica/del sistema en la aplicación de escritorio de 1Password, en lugar de un shell out a la CLI.Autenticación Bearer:
requireBearerAuthde@modelcontextprotocol/express. El lado devcontainer presenta un token compartido fijo.
Related MCP server: GitHub MCP Server
Configuración
npm install
cp .env.example .env # 値を埋めるGITHUB_APP_ID/GITHUB_APP_INSTALLATION_ID: la GitHub App / instalación de destino.GITHUB_APP_PRIVATE_KEY_OP_REF: referencia secreta de 1Password de la clave privada (op://vault/item/field).OP_ACCOUNT_NAME: nombre de cuenta mostrado en la barra lateral de la aplicación de escritorio de 1Password (paraDesktopAuth).MCP_BEARER_TOKEN: secreto compartido que el lado devcontainer presenta medianteAuthorization: Bearer <token>.
En la aplicación de escritorio de 1Password, debe habilitarse Settings > Developer > Integrate with other apps.
npm run dev # tsx watch で起動
npm run build && npm startEstado de implementación (resumen)
Definición de tipos y validación de entrada de la herramienta
get_installation_token.Verificación de cobertura de repos →
repo_not_installed.Verificación de subconjunto de permisos →
permission_escalation_denied.Obtención de la clave privada a través de 1Password →
key_unavailable.Delegación de emisión de tokens a
@octokit/auth-app→github_api_error.Distribución mediante Streamable HTTP + autenticación Bearer.
Verificación de funcionamiento con una GitHub App / vault de 1Password reales (requiere la preparación manual de credenciales de autenticación).
Patrón de uso en el lado devcontainer (explícitamente pospuesto en spec.md).
Estructura de directorios
src/
config.ts 環境変数ロード
errors.ts spec.md の4種類のエラーコードに対応するTokenError
op-secret.ts 1Password DesktopAuth 経由の秘密鍵取得
github-auth.ts installation repos/permissions 検証 + createAppAuth 呼び出し
tools/get-installation-token.ts get_installation_token ツール本体
server.ts McpServer ファクトリ(ツール登録)
index.ts HTTPエントリポイント(bearer認証 + createMcpHandler配信)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
- Alicense-qualityCmaintenanceA web application for securely managing GitHub tokens and providing centralized access to various development tools integrated with GitHub accounts.44MIT
- Flicense-qualityDmaintenanceEnables access to GitHub repositories and data through the GitHub API. Supports retrieving repositories, issues, pull requests, and searching code across GitHub with authentication via personal access tokens.
- Flicense-qualityDmaintenanceMints short-lived, scoped GitHub App installation tokens on demand for AI agents to access git repositories or the GitHub API.
- Flicense-qualityDmaintenanceProvides GitHub App authentication for Git and API operations, enabling temporary token generation for private repository access.
Related MCP Connectors
Issue, rotate and revoke scoped API-key passes for 25+ providers — the agent never sees a real key
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
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/appare45/github-token-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server