Github Ruleset Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Github Ruleset Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Branch protection as code. 4 templates, 5 tools, 2-minute setup.
An MCP server that lets Claude (or any MCP client) manage GitHub branch protection rulesets programmatically.
Setting up branch protection manually is tedious. This MCP server lets you say:
Protect myorg/api with standard rulesAnd Claude handles the rest—validating, previewing, and applying the ruleset via GitHub's API.
git clone https://github.com/wilsonhj/github-ruleset-mcp.git
cd github-ruleset-mcp
npm install
npm run buildChoose one of these secure methods:
#### Option A: Environment Variable (Recommended)
Add to your shell profile (~/.zshrc, ~/.bashrc, etc.):
export GITHUB_TOKEN="ghp_your_token_here"Then reload: source ~/.zshrc
#### Option B: macOS Keychain (Most Secure)
# Store token in Keychain
security add-generic-password -a "$USER" -s "github_personal_access_token" -w "ghp_your_token_here"
# Add to ~/.zshrc
echo 'export GITHUB_TOKEN=$(security find-generic-password -a "$USER" -s "github_personal_access_token" -w 2>/dev/null)' >> ~/.zshrc
source ~/.zshrcEdit your Claude Desktop config:
~/Library/Application Support/Claude/claude_desktop_config.json~/.config/claude/claude_desktop_config.json{
"mcpServers": {
"github-ruleset": {
"command": "node",
"args": ["/absolute/path/to/github-ruleset-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}Important: Replace /absolute/path/to/github-ruleset-mcp with the actual path.
Close and reopen Claude Desktop to load the MCP server.
Ask Claude: "List available GitHub ruleset templates"
If you see 4 templates (standard, strict, relaxed, controlled), it's working! ✅
Test the server before adding to Claude Desktop:
# Install MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsThis opens a web UI where you can interactively test all 5 tools.
| Template | When to Use | What It Does |
|---|---|---|
standard | Most repos | 1 approval, CI required, no force push |
strict | Production | 2 approvals, signed commits, code scanning |
relaxed | Dev branches | PR required, no approval needed |
controlled | Releases | Team-gated, staging deploy required |
| Tool | Description |
|---|---|
apply_ruleset | Apply branch protection (dry-run by default) |
check_protection | Verify a branch is protected |
list_rulesets | Show all rulesets in a repo |
delete_ruleset | Remove a ruleset (requires confirmation) |
list_templates | Show available templates |
Protect a new repo:
Apply standard branch protection to myorg/new-servicePre-deployment check:
Verify myorg/api has branch protection before I deployCustom ruleset:
Protect myorg/api main branch requiring 3 approvals and signed commitsgithub-ruleset-mcpIf using classic tokens, you need:
repo — Full repository accessadmin:org_hook — Organization ruleset access (if managing org-level rulesets)The token isn't set in your environment. Verify:
echo $GITHUB_TOKENIf empty, check that:
~/.zshrc)source ~/.zshrc to reloadCheck that:
args path points to the compiled dist/index.jsIf using apply_ruleset, remember it defaults to dry-run mode. Set dry_run: false to actually apply changes.
See docs/ADVANCED.md for:
PRs welcome! Please open an issue first for major changes.
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.