cc-safe-setup

data-ai MCP Server

One command to make Claude Code safe for autonomous operation. Prevents rm -rf, secret leaks, force-pushes, broken deployments. 715 example hooks, 9,200+ tests, 30K+ installs — built from 800+ hours of real autonomous CC operation.

VerifiedInstall Ready
data-aidata-ai
8 views49 stars4 forksv30.0.0MIT

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

VerifiedInstall Ready
Source
github-topic:mcp
Stars
49
Last synced
3mo ago
Install
Instructions detected

Install

1. Install the package

npx cc-safe-setup

2. Add to claude_desktop_config.json

{
  "mcpServers": {
    "cc-safe-setup": {
      "command": "npx",
      "args": [
        "cc-safe-setup"
      ]
    }
  }
}

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)

46
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (46)

Resource

What you get

edit-always-allow

Edit prompts in `.claude/skills/` despite `bypassPermissions`

terminal-state-restore

Restores Kitty keyboard protocol, cursor, bracketed paste on exit

quoted-flag-approver

"Quoted characters in flag names" prompt on `git commit -m "msg"`

cch-cache-guard

Blocks reads of Claude session/billing files that poison prompt cache via `cch=` substitution

allow-git-hooks-dir

Edit prompts in `.git/hooks/` for pre-commit/pre-push setup

large-read-guard

Warns before reading large files via `cat`/`less` that waste context tokens

conversation-history-guard

Blocks access to session JSONL files (prevents 20x cache poisoning)

Before

After

Tool

What it does

session-backup-on-start

Backs up session JSONL files on start (protects against silent deletion)

Plugin

What it blocks

Guide

What it covers

compact-blocker

Blocks auto-compaction via PreCompact (preserves full context)

token-budget-guard

Blocks tool calls when estimated session cost exceeds a configurable threshold

ripgrep-permission-fix

Auto-fixes vendored ripgrep +x permission on start (fixes broken commands/skills)

git-show-flag-sanitizer

Strips invalid `--no-stat` from `git show` (wastes context on error)

Unprotected

Blocked

webfetch-domain-allow

Auto-approves WebFetch by domain (fixes broken `domain:*` wildcard)

session-index-repair

Rebuilds `sessions-index.json` on exit so `claude --resume` finds all sessions

working-directory-fence

Blocks Read/Edit/Write outside CWD (prevents operating on wrong project copy)

Command

What It Does

safety-essentials

rm -rf, force-push, hard-reset, .env overwrite, npm publish

Variable

Hook

Possible

Blocked

mcp-warmup-wait

Waits for MCP servers to initialize on session start (fixes first-turn tool errors)

None

4-stage alerts

Hook

What It Solves

branch-guard

`0` (protection on)

allow-protected-dirs

All protected directory prompts (CI/Docker environments)

compact-alert-notification

Alerts when auto-compaction fires (tracks compact-rebuild cycles that burn tokens)

pre-compact-transcript-backup

Full JSONL backup before compaction (protects against rate-limit data loss)

read-before-edit

Warns when Edit targets a file not recently Read (Read:Edit ratio dropped 70%, [#42796](https://github.com/anthropics/claude-code/issues/42796))

git-protection

Force-push, main/master push, git clean, branch -D

Problem

Issue

CC_SAFE_DELETE_DIRS

destructive-guard

image-file-validator

Blocks Read of fake image files (text in .png) that permanently corrupt sessions

prompt-usage-logger

Logs every prompt with timestamps to track token consumption patterns

replace-all-guard

Warns/blocks Edit `replace_all:true` (prevents bulk data corruption)

credential-guard

.env write/edit, API keys in commands, service account files

destructive-guard

`0` (protection on)

CC_PROTECT_BRANCHES

branch-guard

CC_CONTEXT_MISSION_FILE

context-monitor

bash-heuristic-approver

Safety heuristic prompts for `$()`, backticks, ANSI-C quoting

Allowed

Blocked

CC_SECRET_PATTERNS

secret-guard