Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

support GitHub App installation‑token authentication (server‑to‑server) for MCP #311

Open
Labels
enhancementNew feature or request
@Svetlanko

Description

@Svetlanko

Describe the feature or problem you’d like to solve

MCP can currently authenticate with:

Both approaches depend on credentials that are bound to ahuman account.
In enterprises(including ours) PAT creation isoften blocked, and a device‑code token still requires a privileged “service user” to stay alive.
That leaves 24 × 7, org‑wide automation brittle and out of step with GitHub’s own security guidance.

ConcernFine‑grained  PATOAuth device‑code
👤 Identity couplingSingle user  → breaks on off‑boardingNeeds service user
⏳ Secret lifetimeUp to 1 year; manual/scripted rotation8 h access token + 6 mo refresh token
🔍 Audit clarityTraffic appears as that useroauth-app/<app> (as @user)
🛡️ Org policiesPATs often disallowedRefresh token is still long‑lived

So, neither option is ideal for a headless, fleet‑wide MCP deployment.

Visual cheat‑sheet (PAT vs device‑code vs GitHub App installation):
Image

Proposed solution

AllowGitHub App installation‑token (server‑to‑server) authentication.

  • install the App at org/enterprise scope with the minimum perms MCP needs (contents:read,metadata:read, etc)
  • store only the App’s private key in AWS Secrets Manager / KMS
  • at runtime MCP signs a short‑lived JWT → exchanges it for a 60‑minute installation token → refreshes automatically
  • audit events appear asgithub‑app/mcp‑server

Benefits

  • zero human coupling – no PATs, survives re‑orgs and off‑boarding
  • short‑lived creds – ≤ 60 min window if a token leaks
  • governance – admins can see/change App permissions & repo list in one click
  • clear audit trail – bot traffic is obvious (github‑app/…)
  • future‑proof – aligns MCP with GitHub’s move away from long‑lived personal tokens

Additional context

Suggested implementation approach

  1. add--auth=github-app flag
  2. readAPP_ID,INSTALLATION_ID, private‑key path/env var
  3. generate JWT (RS256) →POST /app/installations/{id}/access_tokens
  4. inject token into existing GitHub client; transparently refresh on HTTP 401/expiry

Architecture sketch of MCP + GitHub App flow:
Image

Happy to help spec out more, test, etc - just let me know what’s useful 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp