Skip to main content
Glama
appare45

github-token-mcp

by appare45

github-token-mcp

Implementierung von spec.md. Ein dedizierter MCP-Server, der innerhalb eines Devcontainers als Host fungiert und bei Bedarf GitHub App-Installationszugriffstoken für den Agenten ausstellt.

Technische Architektur

  • MCP-Server: @modelcontextprotocol/server v2 (createMcpHandler + McpServer), bereitgestellt über Streamable HTTP

  • GitHub App-Authentifizierung: createAppAuth von @octokit/auth-app (JWT-Erstellung und Token-Austausch werden nicht selbst implementiert)

  • Privaten Schlüssel abrufen: DesktopAuth aus @1password/sdk – fordert bei jedem Mal eine biometrische Authentifizierung oder Systemauthentifizierung über die 1Password-Desktop-App an, anstatt die CLI zu verwenden

  • Bearer-Authentifizierung: requireBearerAuth von @modelcontextprotocol/express. Die Devcontainerseite präsentiert ein festes, gemeinsam genutztes Token

Related MCP server: GitHub MCP Server

Einrichtung

npm install
cp .env.example .env  # 値を埋める
  • GITHUB_APP_ID / GITHUB_APP_INSTALLATION_ID: Die entsprechende GitHub App / Installation

  • GITHUB_APP_PRIVATE_KEY_OP_REF: Die 1Password-Secret-Referenz für den privaten Schlüssel (op://vault/item/field)

  • OP_ACCOUNT_NAME: Der in der Seitenleiste der 1Password-Desktop-App angezeigte Kontoname (für DesktopAuth)

  • MCP_BEARER_TOKEN: Das gemeinsame Geheimnis, das die Devcontainerseite im Format Authorization: Bearer <token> präsentiert

Stellen Sie sicher, dass in der 1Password-Desktop-App unter Einstellungen > Entwickler > In andere Apps integrieren die Option aktiviert ist.

npm run dev    # tsx watch で起動
npm run build && npm start

Implementierungsstatus (Kern)

  • Typdefinition und Eingabevalidierung für das Tool get_installation_token

  • Überprüfung der Repos-Abdeckung → repo_not_installed

  • Überprüfung der Berechtigungsteilmengen → permission_escalation_denied

  • Abruf des privaten Schlüssels über 1Password → key_unavailable

  • Delegierung der Tokenausstellung an @octokit/auth-appgithub_api_error

  • Bereitstellung über Streamable HTTP + Bearer-Authentifizierung

  • Funktionstest mit einer echten GitHub App / 1Password-Vault (erfordert manuelle Vorbereitung der Anmeldeinformationen)

  • Nutzungsmuster auf der Devcontainerseite (im spec.md explizit zurückgestellt)

Verzeichnisstruktur

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配信)
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
<1hResponse 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
    -
    quality
    D
    maintenance
    Enables 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.
  • F
    license
    -
    quality
    D
    maintenance
    Mints short-lived, scoped GitHub App installation tokens on demand for AI agents to access git repositories or the GitHub API.
  • F
    license
    -
    quality
    D
    maintenance
    Provides GitHub App authentication for Git and API operations, enabling temporary token generation for private repository access.

View all related MCP servers

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.

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/appare45/github-token-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server