Skip to content
MCP server

github-security-mcp MCP Server

GitHub security posture audit tools for AI agents — organization, repository, Actions, secrets, supply chain analysis via MCP

github-security-mcp scores 36 (Limited), licensed MIT and written in TypeScript. It installs as a local process. It declares 39 tools. Filed under Developer tools, Security, Version control. GitHub shows 15 stars. Package registries report about 98 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by badcharsMITTypeScript15 stars
Trust score
36Limited
Trust score 36 of 100, Limited

Limited trust

36 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 36 comes from

0 + 5 + 7 + 10 + 4 + 10 = 36. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance5 / 20

How recently the repository saw a commit or release.

Maintenance: 5 of 20 points.
Popularity7 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 7 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "badchars-github-security-mcp": {      "command": "npx",      "args": [        "-y",        "github-security-mcp@0.1.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools39Tool docs quality grade D

All capabilities

About


The Problem

GitHub security is fragmented. You need separate tools for org settings, repo configurations, Actions workflow analysis, secret scanning, supply chain, and access control. No single tool covers it all, and none work with AI agents.

Traditional workflow:
  manually check org settings                →  click through 15 pages
  run github-advisory-db for each repo       →  one at a time
  grep workflows for script injection        →  miss half the patterns
  review collaborator access                 →  spreadsheet hell
  check secret scanning alerts               →  another dashboard
  ──────────────────────────────────────────
  Total: hours of manual work per org

github-security-mcp gives your AI agent 39 tools and 45 security checks via the Model Context Protocol. The agent calls GitHub APIs directly, understands what it finds, and tells you exactly what to fix.

With github-security-mcp:
  You: "Audit my GitHub org for security issues and prioritize the fixes"

  Agent: → checks org settings (2FA, SSO, member privileges)
         → scans repos (branch protection, secret scanning, Dependabot)
         → analyzes workflows (script injection, unpinned actions, OIDC)
         → reviews access (teams, collaborators, PATs, GitHub Apps)
         → "12 critical, 8 high — here are the top 5 to fix now"

How It's Different

Existing tools focus on one slice of GitHub security. github-security-mcp covers the full stack and works with any AI agent.

ToolWhat it doesWhat it can't do
AllstarEnforce repo settings via GitHub AppNo Actions analysis, no secret scanning, no access audit
ScorecardOpenSSF security score for reposSingle-repo focus, no org-level checks, no real-time interaction
LegitifyOrg + repo policy enforcementCLI output, no AI integration, limited Actions analysis
step-security/harden-runnerRuntime Actions securityOnly Actions, no org/repo/access checks
GitGuardianSecret detection in commitsSaaS only, no self-hosted, limited to secrets domain
SocketSupply chain risk analysisPackage-focused, no org/Actions/access analysis

All of these are excellent tools. github-security-mcp doesn't replace them — it fills the gap of giving an AI agent unified, interactive access across all GitHub security domains.


Quick Start

Install

git clone https://github.com/badchars/github-security-mcp.git
cd github-security-mcp
bun install

Set up authentication

# Classic PAT (requires: repo, admin:org, admin:org_hook, admin:repo_hook)
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Fine-grained PAT (preferred — least privilege)
# Organization: Members (read), Administration (read)
# Repository: Administration, Code scanning, Dependabot, Secret scanning,
#             Actions, Environments, Webhooks (all read-only)

Connect to your AI agent

claude mcp add github-security -- bun run /path/to/github-security-mcp/src/index.ts

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "github-security": {
      "command": "bun",
      "args": ["run", "/path/to/github-security-mcp/src/index.ts"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Same JSON config format. Point the command to your installation path.

Start auditing

You: "Audit my GitHub org for security misconfigurations"

That's it. The agent handles the rest.


What The AI Can Do

Full Organization Audit

You: "Run a complete security audit on our GitHub org"

Agent: → github_run_all {org: "myorg", repo: "main-app"}
       → 45 checks across 6 categories
       → github_audit_report
       → "34 findings: 4 critical, 7 high, 12 medium.
          Critical #1: No branch protection on main (REPO-001)
          Critical #2: Script injection in deploy.yml (ACT-001)
          Critical #3: 3 critical Dependabot alerts unfixed 90+ days (REPO-007)
          Critical #4: Unresolved secret scanning alerts (SEC-002)
          Here are the exact fixes for each..."

Actions Workflow Security

You: "Check our CI/CD workflows for supply chain risks"

Agent: → github_check_workflow_injection
         Found ${{ github.event.issue.title }} in run: block (deploy.yml:47)
       → github_check_workflow_pinning
         12 actions use tags instead of SHA pins
       → github_check_workflow_pr_target
         build.yml uses pull_request_target with checkout — critical risk
       → github_check_workflow_permissions
         Default GITHUB_TOKEN has write-all permissions
       → "4 supply chain risks found. The PR target + checkout pattern
          allows any fork to execute arbitrary code with write access
          to your repo. Fix this first."

Access Control Review

You: "Who has too much access to our repositories?"

Agent: → github_check_team_permissions
         "platform" team has admin on 47 repos, only 3 members
       → github_check_collaborators
         8 outside collaborators with write access
       → github_check_app_permissions
         "old-ci-bot" GitHub App has admin + all repos
       → github_check_pat_usage
         14 classic PATs with repo scope (should be fine-grained)
       → "Reduce blast radius: restrict platform team to maintain,
          remove 3 stale outside collaborators, limit old-ci-bot
          to specific repos, migrate classic PATs to fine-grained."

Secret Exposure Detection

You: "Are we properly protecting secrets across our repos?"

Agent: → github_check_secret_scanning
         Secret scanning disabled on 5 private repos
       → github_check_push_protection
         3 push protection bypasses in the last month
       → github_check_secret_patterns
         No custom secret patterns defined
       → github_check_secret_scoping
         2 org secrets available to all repos (should be scoped)
       → "Enable secret scanning on all repos, review the 3 bypasses,
          add custom patterns for internal API keys, and scope
          org secrets to only the repos that need them."

Tools Reference (39 tools)

ToolDescription
github_check_org_security2FA enforcement, default repo visibility, member creation privileges
github_check_org_ssoSSO/SAML configuration via GraphQL
github_check_org_membersOutside collaborators, stale member detection
github_check_org_appsOAuth credential authorizations, GitHub App installation permissions
github_check_org_webhooksInsecure webhook URLs (HTTP, no secret)
github_check_org_audit_logSuspicious audit log activity (Enterprise)
github_list_org_reposList all repos in an org with security metadata
ToolDescription
github_check_repo_branch_protectionBranch protection rules on default branch
github_check_repo_secretsSecret scanning and push protection enablement
github_check_repo_code_scanningCodeQL / code scanning enabled, open alerts
github_check_repo_dependabotDependabot enabled, critical alert triage
github_check_repo_settingsSECURITY.md, private vulnerability reporting, fork restrictions
github_check_repo_webhooksInsecure repo-level webhook URLs
github_check_repo_deploy_keysDeploy key permissions (read-only vs read-write)
github_check_repo_codeownersCODEOWNERS file presence and enforcement
ToolDescription
github_check_workflow_injectionScript injection via ${{ github.event.* }} in run: blocks
github_check_workflow_pr_targetpull_request_target + checkout pattern (critical)
github_check_workflow_permissionsGITHUB_TOKEN default permission scope
github_check_workflow_pinningUnpinned third-party actions (tag vs SHA)
github_check_workflow_runnersSelf-hosted runner exposure
github_check_workflow_environmentsMissing environment protection rules
github_check_workflow_secretsSecret exfiltration patterns in workflows
github_check_workflow_oidcOIDC subject claim customization
ToolDescription
github_check_secret_scanningCoverage gaps and unresolved alerts
github_check_push_protectionPush protection bypass tracking
github_check_secret_patternsCustom secret pattern configuration
github_check_secret_scopingEnvironment, repo, and org-level secret scoping
ToolDescription
github_check_dependency_graphDependency graph enablement
github_check_dependabot_updatesDependabot security updates configuration
github_check_sbomSBOM generation capability
github_check_vulnerabilitiesKnown vulnerabilities, critical unfixed > 90 days
ToolDescription
github_check_team_permissionsTeam permission levels across repos
github_check_collaboratorsExternal collaborator access audit
github_check_app_permissionsGitHub App permission scope review
github_check_pat_usageClassic vs fine-grained PAT usage
ToolDescription
github_list_checksBrowse all 45 checks, filter by category/severity
github_audit_summaryAggregate findings by category, severity, status
github_audit_reportFull markdown or JSON audit report
github_run_allExecute all checks for an org/repo

Check Registry (45 checks)

IDCheckSeverity
ORG-0012FA not enforcedCRITICAL
ORG-002Default repo visibility is publicHIGH
ORG-003Members can create public reposMEDIUM
ORG-004SSO/SAML not configuredHIGH
ORG-005Outside collaborators with accessMEDIUM
ORG-006Stale organization membersLOW
ORG-007Risky OAuth app authorizationsHIGH
ORG-008Over-permissive GitHub App installationsHIGH
ORG-009Insecure webhook URLsMEDIUM
ORG-010Suspicious audit log activityINFO
IDCheckSeverity
REPO-001Missing or weak branch protectionCRITICAL
REPO-002Secret scanning not enabledHIGH
REPO-003Push protection not enabledHIGH
REPO-004Code scanning not enabledMEDIUM
REPO-005Open code scanning alertsHIGH
REPO-006Dependabot not enabledMEDIUM
REPO-007Critical Dependabot alertsCRITICAL
REPO-008No SECURITY.md policy fileLOW
REPO-009Private vulnerability reporting offLOW
REPO-010Unrestricted fork settingsLOW
REPO-011Insecure repo webhooksMEDIUM
REPO-012Read-write deploy keysHIGH
REPO-013Missing CODEOWNERS fileLOW
IDCheckSeverity
ACT-001Script injection via untrusted inputsCRITICAL
ACT-002pull_request_target with checkoutCRITICAL
ACT-003Over-permissive GITHUB_TOKENHIGH
ACT-004Unpinned third-party actionsMEDIUM
ACT-005Self-hosted runner exposureHIGH
ACT-006Missing environment protection rulesMEDIUM
ACT-007Secret exfiltration patternsHIGH
ACT-008OIDC misconfigurationMEDIUM
IDCheckSeverity
SEC-001Secret scanning coverage gapsHIGH
SEC-002Unresolved secret scanning alertsCRITICAL
SEC-003Push protection bypassesHIGH
SEC-004No custom secret patternsLOW
SEC-005Overly broad secret scopingMEDIUM
IDCheckSeverity
SUP-001Dependency graph not enabledMEDIUM
SUP-002Dependabot security updates offHIGH
SUP-003No SBOM generationLOW
SUP-004Critical known vulnerabilitiesCRITICAL
SUP-005Stale unfixed vulnerabilities (>90 days)HIGH
IDCheckSeverity
ACC-001Over-permissive team accessHIGH
ACC-002External collaborators with write+MEDIUM
ACC-003Over-scoped GitHub AppsHIGH
ACC-004Classic PATs with broad scopesHIGH

Architecture

src/
├── index.ts                    Entry point + MCP stdio
├── types/
│   └── index.ts                CheckResult, ToolDef, ToolContext, ToolResult
├── github/
│   └── client.ts               GitHubClientFactory (lazy Octokit + GraphQL)
├── protocol/
│   ├── tools.ts                39 tool definitions (Zod schemas)
│   └── mcp-server.ts           MCP server + stdio transport
├── org/                        Organization checks (ORG-001..010)
│   ├── security.ts             2FA, visibility, member privileges
│   ├── sso.ts                  SSO/SAML via GraphQL
│   ├── members.ts              Outside collaborators, stale members
│   ├── apps.ts                 OAuth apps, GitHub App installations
│   ├── webhooks.ts             Insecure webhook URLs
│   └── audit-log.ts            Suspicious audit log patterns
├── repo/                       Repository checks (REPO-001..013)
│   ├── branch-protection.ts    Branch protection rules
│   ├── secret-scanning.ts      Secret scanning + push protection
│   ├── code-scanning.ts        CodeQL enabled, open alerts
│   ├── dependabot.ts           Dependabot enabled, critical alerts
│   ├── settings.ts             SECURITY.md, vuln reporting, forks
│   ├── webhooks.ts             Insecure repo webhooks
│   ├── deploy-keys.ts          Deploy key permissions
│   └── codeowners.ts           CODEOWNERS file
├── actions/                    GitHub Actions checks (ACT-001..008)
│   ├── injection.ts            Script injection via untrusted inputs
│   ├── pr-target.ts            pull_request_target + checkout
│   ├── permissions.ts          GITHUB_TOKEN default permissions
│   ├── pinning.ts              Unpinned third-party actions
│   ├── runners.ts              Self-hosted runner exposure
│   ├── environments.ts         Environment protection rules
│   ├── secrets.ts              Secret exfiltration patterns
│   └── oidc.ts                 OIDC configuration
├── secrets/                    Secret management checks (SEC-001..005)
│   ├── scanning.ts             Coverage + alert triage
│   ├── push-protection.ts      Push protection bypasses
│   ├── patterns.ts             Custom secret patterns
│   └── scoping.ts              Env/repo/org secret scoping
├── supply-chain/               Supply chain checks (SUP-001..005)
│   ├── dependency-graph.ts     Dependency graph enabled
│   ├── dependabot-updates.ts   Security updates config
│   ├── sbom.ts                 SBOM generation
│   └── vulnerabilities.ts      Known vulns, stale unfixed
├── access/                     Access control checks (ACC-001..004)
│   ├── teams.ts                Team permission audit
│   ├── collaborators.ts        External collaborators
│   ├── github-apps.ts          GitHub App permissions
│   └── tokens.ts               Classic vs fine-grained PATs
└── meta/                       Aggregation + reporting
    ├── list-checks.ts          CHECK_REGISTRY (45 checks)
    ├── summary.ts              Findings aggregation
    ├── report.ts               Markdown/JSON report
    └── run-all.ts              Execute all checks

Design decisions:

  • Single Octokit instance — GitHub API is global (no regions). Lazy initialization on first API call.
  • Uniform CheckResult — Every check returns the same structure: checkId, severity, status, details, remediation. Same pattern as cloud-audit-mcp.
  • Static workflow analysis — Actions checks fetch YAML via Contents API and use regex analysis. GitHub has no parsed workflow API.
  • Enterprise graceful degradation — Enterprise-only features (audit log, credential authorizations, SSO) return NOT_APPLICABLE instead of errors.
  • In-memory findings — Session-scoped findings array. No database, no persistence. Run github_audit_summary or github_audit_report to aggregate.
  • 4 dependencies — @modelcontextprotocol/sdk, @octokit/rest, @octokit/graphql, zod. Nothing else.

Authentication

Token TypeRequired Scopes
Classic PATrepo, admin:org, admin:org_hook, admin:repo_hook
Fine-grained PAT (recommended)Org: Members + Administration (read). Repo: Administration, Code scanning, Dependabot, Secret scanning, Actions, Environments, Webhooks (read)
GitHub AppSame repository/org permissions as fine-grained PAT

The token is read from the GITHUB_TOKEN environment variable.


Part of the MCP Security Suite

ProjectDomainTools
hackbrowser-mcpBrowser-based security testing39 tools, Firefox, injection testing
cloud-audit-mcpCloud security (AWS/Azure/GCP)38 tools, 60+ checks
github-security-mcpGitHub security posture39 tools, 45 checks

Limitations

  • Requires a GitHub PAT or GitHub App token with appropriate scopes
  • Some checks require GitHub Enterprise Cloud (audit log, credential authorizations, SSO) — these gracefully return NOT_APPLICABLE on free/Team plans
  • Actions workflow analysis is regex-based (no AST parsing) — may miss complex injection patterns
  • Rate limiting: GitHub API allows 5,000 requests/hour for authenticated users. A full org audit with many repos may approach this limit
  • macOS / Linux (Windows not tested)

Frequently asked questions

What is github-security-mcp MCP Server?

GitHub security posture audit tools for AI agents — organization, repository, Actions, secrets, supply chain analysis via MCP

How do I install github-security-mcp MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. github-security-mcp MCP Server runs locally from the npm package github-security-mcp with the command npx -y github-security-mcp@0.1.0.

Is github-security-mcp MCP Server free and open source?

Yes. github-security-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does github-security-mcp MCP Server support remote (HTTP) connections?

No remote endpoint is listed for github-security-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does github-security-mcp MCP Server provide?

github-security-mcp MCP Server provides 39 tools, including github_audit_report, github_audit_summary, github_check_app_permissions, and github_check_collaborators. See the full tool list for descriptions and parameters.

How is github-security-mcp MCP Server's trust score calculated?

github-security-mcp MCP Server scores 36 out of 100 (Limited). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server