github-token-mcp
github-token-mcp
spec.md의 구현. devcontainer 내의 에이전트에게 GitHub App installation access token을 매번 발급하는 호스트 전용 MCP 서버.
기술 구성
MCP server:
@modelcontextprotocol/serverv2 (createMcpHandler+McpServer)를 Streamable HTTP로 배포GitHub App 인증:
@octokit/auth-app의createAppAuth(JWT 생성 및 토큰 교환은 자체 구현하지 않음)비밀 키 획득:
@1password/sdk의DesktopAuth— CLI 셸 아웃이 아닌 1Password desktop app에서의 생체 인증/시스템 인증 프롬프트를 매번 요구Bearer 인증:
@modelcontextprotocol/express의requireBearerAuth. devcontainer 측은 고정된 공유 토큰을 제시
Related MCP server: GitHub MCP Server
설정
npm install
cp .env.example .env # 値を埋めるGITHUB_APP_ID/GITHUB_APP_INSTALLATION_ID: 대상 GitHub App / 설치GITHUB_APP_PRIVATE_KEY_OP_REF: 비밀 키의 1Password secret reference (op://vault/item/field)OP_ACCOUNT_NAME: 1Password desktop app 사이드바에 표시되는 계정 이름 (DesktopAuth용)MCP_BEARER_TOKEN: devcontainer 측이Authorization: Bearer <token>으로 제시하는 공유 시크릿
1Password desktop app 측에서 Settings > Developer > Integrate with other apps를 활성화해 두어야 합니다.
npm run dev # tsx watch で起動
npm run build && npm start구현 상태 (골자)
get_installation_token도구의 타입 정의 및 입력 검증repos 커버리지 검증 →
repo_not_installedpermissions 부분 집합 검증 →
permission_escalation_denied1Password를 통한 비밀 키 획득 →
key_unavailable@octokit/auth-app으로의 토큰 발행 위임 →github_api_errorStreamable HTTP + Bearer 인증을 통한 배포
실제 GitHub App / 1Password vault에 대한 동작 확인 (인간의 인증 정보 준비 필요)
devcontainer 측의 사용 패턴 (spec.md에서 명시적으로 후순위로 미룸)
디렉토리 구성
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