ghe-mcp-gateway
Provides tools to list Dependabot alerts as part of security posture auditing.
Provides tools for GitHub Enterprise administration, including repository management, access governance, audit-log review, webhook management, and secret-scanning triage.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ghe-mcp-gateway list repos in the org that haven't been updated in 3 months"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ghe-mcp-gateway
An MCP (Model Context Protocol) server that exposes GitHub Enterprise administration operations as agent tools. Point Claude (Code or Desktop) at it and ask things like "list private repos in the org with no recent pushes" or "who has admin on payments-api?" - the model calls the GitHub API through typed, permissioned tools instead of raw curl.
Built as a working reference for GitHub Enterprise Cloud administration: repository management, access governance, audit-log review, webhook management, and secret-scanning triage.
Why
Admin work is repetitive API calls (access reviews, alert triage, config audits). Wrapping the GitHub REST/GraphQL API as MCP tools lets an agent do the legwork while keeping a human in the loop - and keeps writes behind an explicit safety switch.
Related MCP server: GitHub MCP Server
Tools (21)
Category | Tools |
Repository admin |
|
Access & teams |
|
Branch protection |
|
Security (GHAS) |
|
Audit log |
|
Webhooks |
|
Escape hatch |
|
* write operation - blocked unless GITHUB_MCP_READ_ONLY=false.
Companion skill
.claude/skills/github-admin/SKILL.md packages these
tools into admin playbooks - access review/certification, leaked-secret response, repo
onboarding & governance, security-posture audit, and access changes. Open Claude Code in this
repo and the /github-admin skill is available; it drives the MCP tools with a read-first,
least-privilege, confirm-before-write discipline.
Setup
uv sync # create venv + install deps
cp .env.example .env # then add your GITHUB_TOKENSuggested token scopes (classic): repo, read:org, admin:org, read:audit_log,
admin:org_hook, security_events. For GitHub Enterprise Server, set GITHUB_API_URL to
https://<host>/api/v3.
Run
# stdio server (how MCP clients launch it)
uv run github-admin-mcp
# quick manual check with the MCP Inspector
uv run mcp dev src/github_admin_mcp/server.pyRegister with Claude Code
claude mcp add github-admin -- uv run --directory /Users/mikeholzinger/src/github_mcp github-admin-mcp(or add an entry to your client's MCP config pointing at the same command).
60-second demo
# 1. add your token (read-only by default - safe)
cp .env.example .env && $EDITOR .env # set GITHUB_TOKEN
# 2. register the server + open Claude Code in this repo
claude mcp add github-admin -- uv run --directory "$PWD" github-admin-mcp
claude
# 3. the /github-admin skill is now available. Try, in natural language:
# "Run an access review on the <org> organization"
# "Audit the security posture of <org>/<repo>"
# "Who has admin on <org>/<repo>?"
# The skill calls the MCP tools read-only and reports an auditor-ready summary.Safety
Read-only by default (
GITHUB_MCP_READ_ONLY=true); mutating tools refuse until you opt in.No credentials in code - token comes from the environment.
.envis git-ignored.
Layout
src/github_admin_mcp/
client.py # async REST + GraphQL client (auth, pagination, GHES-aware, read-only guard)
server.py # FastMCP server; one @mcp.tool() per operation
docs/
GITHUB_API_REFERENCE.md # the endpoint research this server is built onExample GitHub Actions workflows
Healthcare-oriented admin automation lives in .github/workflows/ with the logic in
scripts/ (Python + requests). All follow least-privilege permissions: and pin actions.
Workflow | Trigger | What it does |
Access Review ( | Monthly cron + manual | Certifies repo access org-wide; flags outside collaborators, admin grants, write-on-archived; emits a JSON evidence artifact (13-mo retention) and files a tracking issue. |
Secret Scanning Alerts ( |
| Real-time + safety-net notification to a security Slack channel. Sends metadata only - never the secret value. |
Repository Governance ( | Org | Enforces the branch-protection baseline (PR + 2 reviews, Code Owner, signed commits, no force-push/delete, conversation resolution, Dependabot). Dry-run by default; auto-applies to brand-new repos. |
Required CI config: secret ORG_ADMIN_TOKEN (org PAT/App), secret SECURITY_SLACK_WEBHOOK,
and variable GITHUB_ORG. The scripts honor GITHUB_API_URL for GitHub Enterprise Server.
Roadmap
Branch-protection / rulesets tools, team-repo access management
Secret-scanning alert resolution, code-scanning + Dependabot alerts
Audit-log streaming config; enterprise-level endpoints
A companion Claude skill that drives these tools for common admin playbooks
Available Tools
21 toolsget_branch_protectionB
Get the branch-protection configuration for a branch (404 -> unprotected).
Inputs: repo (required), owner (required), branch.
get_org_audit_logA
Query an organization's audit log (requires org-owner token w/ read:audit_log).
phrase: GitHub audit-log search syntax, e.g. 'action:repo.create actor:octocat'. include: web | git | all.
Inputs: org (required), phrase, include. Returns: result
get_org_rulesetA
Get the full definition of a single org ruleset (rules, conditions, bypass actors).
Inputs: org (required), ruleset_id (required).
get_repo_permissionA
Get a user's effective permission level on a repo (admin/write/read/none).
Inputs: repo (required), owner (required), username (required).
get_repositoryC
Get full details for a single repository (settings, visibility, permissions).
Inputs: repo (required), owner (required).
graphql_queryA
Run an arbitrary GraphQL query against GitHub's v4 API.
Useful for nested fetches (e.g. org -> teams -> members) in one round trip.
Inputs: query (required), variables.
list_code_scanning_alertsB
List CodeQL/code-scanning alerts for a repo. state: open | closed | dismissed | fixed.
Inputs: repo (required), owner (required), state. Returns: result
list_dependabot_alertsA
List Dependabot vulnerability alerts. state: open | dismissed | fixed | auto_dismissed.
Inputs: repo (required), owner (required), state. Returns: result
list_organization_membersC
List members of an organization. role: all | admin | member.
Inputs: org (required), role. Returns: result
list_org_rulesetsB
List organization-level rulesets (the modern, scalable branch-protection model).
Inputs: org (required). Returns: result
list_org_webhooksB
List organization-level webhooks (events, active state, target URL).
Inputs: org (required). Returns: result
list_repo_collaboratorsB
List collaborators on a repo with their permission level.
affiliation: outside | direct | all.
Inputs: repo (required), owner (required), affiliation. Returns: result
list_repositoriesA
List repositories for an org or user.
owner: org login or username. owner_type: "org" or "user". type_filter: all | public | private | forks | sources | member (org) / owner|member (user). Returns trimmed repo records (name, visibility, default_branch, archived, pushed_at).
Inputs: owner (required), owner_type, type_filter. Returns: result
list_secret_scanning_alertsA
List secret-scanning alerts for a repo, or for an org if repo is omitted.
state: open | resolved. Requires GHAS/secret-scanning enabled and a token with access.
Inputs: owner (required), repo, state. Returns: result
list_team_membersC
List members of a team. role: all | maintainer | member.
Inputs: org (required), team_slug (required), role. Returns: result
list_team_reposB
List repositories a team can access, with the team's permission on each.
Inputs: org (required), team_slug (required). Returns: result
list_teamsC
List all teams in an organization (slug, name, privacy, parent).
Inputs: org (required). Returns: result
resolve_secret_scanning_alertA
Resolve a secret-scanning alert. WRITE OPERATION.
resolution: false_positive | wont_fix | revoked | used_in_tests. Use after the credential has actually been revoked/rotated. Blocked unless GITHUB_MCP_READ_ONLY=false.
Inputs: repo (required), owner (required), alert_number (required), comment, +1 more.
set_branch_protectionA
Apply a baseline branch-protection policy. WRITE OPERATION.
Requires PRs with required_reviews approvals, optional Code Owner review,
blocks force-push/deletion, requires conversation resolution + linear history.
Blocked unless GITHUB_MCP_READ_ONLY=false.
Inputs: repo (required), owner (required), branch, enforce_admins, +2 more.
set_repo_collaborator_permissionA
Add or update a collaborator's permission on a repo. WRITE OPERATION.
permission: pull | triage | push | maintain | admin. Blocked unless GITHUB_MCP_READ_ONLY=false.
Inputs: repo (required), owner (required), username (required), permission.
set_team_repo_permissionA
Grant or update a team's permission on a repo. WRITE OPERATION.
permission: pull | triage | push | maintain | admin. Blocked unless GITHUB_MCP_READ_ONLY=false.
Inputs: org (required), repo (required), owner (required), team_slug (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct resource or action (e.g., get vs list, different alert types, branch protection vs permissions). There is no ambiguity between tools; they are clearly differentiated by their target and verb.
Most tools follow a consistent verb_noun pattern (get_*, list_*, set_*, resolve_*) in snake_case. The only outlier is 'graphql_query', which deviates from the pattern but is a generic utility.
21 tools is slightly above the typical well-scoped range (3-15), but given the breadth of GitHub admin functionality covered (branch protection, security alerts, permissions, webhooks), it is still reasonable and not excessive.
The tool set covers reading many resources and some write operations (permissions, branch protection, alert resolution). However, it lacks create/delete operations for repos, teams, and webhooks, which are notable gaps for a full admin gateway.
Maintenance
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
GitHub security scanning, code audit, and workflow automation for repositories.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceAn autonomous GitHub management engine that enables control over repositories, branches, security alerts, and Actions workflows through natural language. It utilizes a zero-local-footprint architecture by storing all configuration and audit logs within a private state repository on GitHub.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform GitHub operations such as creating repositories, issues, pull requests, and more through natural language.-
- AlicenseAqualityCmaintenanceEnables asking natural-language questions about any GitHub repository and receiving answers grounded in the actual code, with read-only enforcement and automatic repository fetching.17 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to answer natural-language GitHub queries by listing repositories, issues, pull requests, branches, commits, and files, as well as performing writes with dry-run and confirmation safeguards.-