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.
Discovered via github-topic:mcp and last synced 3mo ago.
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)
What you get
Edit prompts in `.claude/skills/` despite `bypassPermissions`
Restores Kitty keyboard protocol, cursor, bracketed paste on exit
"Quoted characters in flag names" prompt on `git commit -m "msg"`
Blocks reads of Claude session/billing files that poison prompt cache via `cch=` substitution
Edit prompts in `.git/hooks/` for pre-commit/pre-push setup
Warns before reading large files via `cat`/`less` that waste context tokens
Blocks access to session JSONL files (prevents 20x cache poisoning)
After
What it does
Backs up session JSONL files on start (protects against silent deletion)
What it blocks
What it covers
Blocks auto-compaction via PreCompact (preserves full context)
Blocks tool calls when estimated session cost exceeds a configurable threshold
Auto-fixes vendored ripgrep +x permission on start (fixes broken commands/skills)
Strips invalid `--no-stat` from `git show` (wastes context on error)
Blocked
Auto-approves WebFetch by domain (fixes broken `domain:*` wildcard)
Rebuilds `sessions-index.json` on exit so `claude --resume` finds all sessions
Blocks Read/Edit/Write outside CWD (prevents operating on wrong project copy)
What It Does
rm -rf, force-push, hard-reset, .env overwrite, npm publish
Hook
Blocked
Waits for MCP servers to initialize on session start (fixes first-turn tool errors)
4-stage alerts
What It Solves
`0` (protection on)
All protected directory prompts (CI/Docker environments)
Alerts when auto-compaction fires (tracks compact-rebuild cycles that burn tokens)
Full JSONL backup before compaction (protects against rate-limit data loss)
Warns when Edit targets a file not recently Read (Read:Edit ratio dropped 70%, [#42796](https://github.com/anthropics/claude-code/issues/42796))
Force-push, main/master push, git clean, branch -D
Issue
destructive-guard
Blocks Read of fake image files (text in .png) that permanently corrupt sessions
Logs every prompt with timestamps to track token consumption patterns
Warns/blocks Edit `replace_all:true` (prevents bulk data corruption)
.env write/edit, API keys in commands, service account files
`0` (protection on)
branch-guard
context-monitor
Safety heuristic prompts for `$()`, backticks, ANSI-C quoting
Blocked
secret-guard