You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub Enterprise security features cost $21/user/month.
This gives your AI agent the same visibility for free — org, repos, Actions, secrets, supply chain.
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.
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 Code
claude mcp add github-security -- bun run /path/to/github-security-mcp/src/index.ts
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
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)
Organization (7)
Tool
Description
github_check_org_security
2FA enforcement, default repo visibility, member creation privileges