github-token-mcp
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/serverv2 (createMcpHandler+McpServer), bereitgestellt über Streamable HTTPGitHub App-Authentifizierung:
createAppAuthvon@octokit/auth-app(JWT-Erstellung und Token-Austausch werden nicht selbst implementiert)Privaten Schlüssel abrufen:
DesktopAuthaus@1password/sdk– fordert bei jedem Mal eine biometrische Authentifizierung oder Systemauthentifizierung über die 1Password-Desktop-App an, anstatt die CLI zu verwendenBearer-Authentifizierung:
requireBearerAuthvon@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 / InstallationGITHUB_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ürDesktopAuth)MCP_BEARER_TOKEN: Das gemeinsame Geheimnis, das die Devcontainerseite im FormatAuthorization: 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 startImplementierungsstatus (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_deniedAbruf des privaten Schlüssels über 1Password →
key_unavailableDelegierung der Tokenausstellung an
@octokit/auth-app→github_api_errorBereitstellung ü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配信)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