Using SnapBack with Claude Code
SnapBack integrates directly with Claude Code through the Model Context Protocol (MCP). This isn’t just detection—Claude can query SnapBack’s local risk engine before making changes.
Two Levels of Integration
Level 1: Automatic Detection (Free)
Like Cursor and Copilot, SnapBack automatically detects Claude Code activity:
- Recognizes Claude Code edit patterns
- Creates snapshots before changes
- Enables one-click restore
Level 2: MCP Integration (Pro)
With MCP enabled, Claude becomes aware of SnapBack:
You: "Refactor the auth module"
Claude: [Checks with SnapBack]
SnapBack: "High-risk operation. auth.ts has caused 3
restores in the past week. Snapshot created."
Claude: "I've noted this is a sensitive area. Proceeding
carefully with a snapshot ready..."
Setting Up MCP Integration
Step 1: Install the SnapBack CLI
npm install -g @snapback/cli
Step 2: Configure MCP
snapback mcp install
This adds SnapBack to your Claude Code MCP configuration.
Step 3: Restart Claude Code
Claude Code will now query SnapBack before risky operations.
MCP integration requires SnapBack Pro. For advanced features, explore MCP integration and CLI commands.
What MCP Enables
| Capability | Free | Pro (MCP) |
|---|---|---|
| Detect Claude Code activity | Yes | Yes |
| Auto-snapshot before changes | Yes | Yes |
| Claude asks SnapBack about risk | No | Yes |
| Claude sees your restore history | No | Yes |
| Smart snapshot on risky operations | No | Yes |
MCP Tools Available
When MCP is enabled, Claude Code can use these tools:
snapback_analyze_risk
Claude asks: “Is this operation risky?”
{
"files": ["src/auth.ts", "src/config.ts"],
"operation": "refactor"
}
SnapBack responds with risk score and historical context.
snapback_create_snapshot
Claude requests a snapshot before proceeding:
{
"message": "Before auth refactor",
"files": ["src/auth.ts"]
}
snapback_check_history
Claude asks about past issues:
{
"file": "src/auth.ts"
}
SnapBack responds with restore history for that file.
Privacy Note
All MCP communication is local.
Claude queries SnapBack on your machine. No data is sent to external servers.
SnapBack’s risk engine runs entirely locally.