github-token-mcp
github-token-mcp
Реализация spec.md. MCP-сервер, предназначенный только для хоста, который выдает GitHub App installation access token по запросу агентам внутри devcontainer.
Техническая структура
MCP server:
@modelcontextprotocol/serverv2 (createMcpHandler+McpServer) в режиме Streamable HTTPGitHub App аутентификация:
@octokit/auth-appсcreateAppAuth(JWT-генерация и обмен токенами не реализуются вручную)Получение закрытого ключа:
@1password/sdkсDesktopAuth— запрос биометрической/системной аутентификации через 1Password desktop app при каждом обращении, без вызова CLIBearer-аутентификация:
@modelcontextprotocol/expressсrequireBearerAuth. Сторона devcontainer предъявляет фиксированный общий токен
Related MCP server: onepassword-mcp-server
Настройка
npm install
cp .env.example .env # 値を埋めるGITHUB_APP_ID/GITHUB_APP_INSTALLATION_ID: целевое GitHub App / установкаGITHUB_APP_PRIVATE_KEY_OP_REF: secret reference закрытого ключа в 1Password (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Проверка покрытия репозиториев →
repo_not_installedПроверка подмножества разрешений →
permission_escalation_deniedПолучение закрытого ключа через 1Password →
key_unavailableДелегирование выдачи токена
@octokit/auth-app→github_api_errorДоставка через Streamable HTTP + Bearer-аутентификация
Проверка работы с реальным GitHub App / хранилищем 1Password (требуется подготовка учётных данных человеком)
Шаблон использования на стороне 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 Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Manage repositories, users, releases, and automate GitHub workflows
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…
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables 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.
- FlicenseBqualityDmaintenanceEnables secure retrieval of credentials from 1Password vaults for use by AI agents, supporting integration with browser automation for automated login.1
- FlicenseNot gradedqualityDmaintenanceMints short-lived, scoped GitHub App installation tokens on demand for AI agents to access git repositories or the GitHub API.
- FlicenseNot gradedqualityDmaintenanceProvides GitHub App authentication for Git and API operations, enabling temporary token generation for private repository access.
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/gh-token-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server