Model Context Protocol (MCP)
SnapBack integrates with AI coding assistants through the Model Context Protocol (MCP), enabling seamless context sharing for snapshots, risk detection, and learning capture.
Two Integration Modes
Local MCP Free
100% local, 100% private. Works entirely on your machine with no cloud connectivity required.
Privacy Guarantee: Local MCP runs entirely offline. No data is sent to SnapBack servers. No internet connection required.
Available Features:
- β Snapshot management
- β Task tracking with learnings
- β Code validation
- β Pattern enforcement
- β Risk analysis (local)
Available to: All tiers (Free, Solo, Team, Enterprise)
Jump to Local MCP Setup β
Backend MCP
Cloud-powered features including advanced AI risk scoring, team collaboration, and encrypted cloud backup.
Coming Soon: Backend MCP features are currently in development. This documentation describes the planned API.
Planned Features:
- βοΈ Encrypted cloud backup
- π€ Advanced Guardian AI risk scoring
- π₯ Team snapshot sharing
- π Cloud-based analytics
Available to: Solo, Team, and Enterprise plans
Jump to Backend MCP Info β
Local MCP Setup
Supported AI Assistants
Claude Code (Cursor)
Configure Cursor to use SnapBackβs local MCP server:
// ~/.cursor/mcp.json
{
"mcpServers": {
"snapback": {
"command": "snap",
"args": ["mcp", "--stdio"],
"type": "stdio"
}
}
}
GitHub Copilot
Coming soon. Track progress at GitHub Discussions.
Continue
Configure in .continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"name": "snapback",
"command": "snap",
"args": ["mcp", "--stdio"]
}
]
}
}
Available MCP Tools
The local MCP server provides a small, focused set of core commands by default. Advanced intelligence tools can be enabled for power users.
Default Surface (Minimal)
Core Commands (7):
- PERCEIVE:
pulse- workspace health check - REASON:
advise,guide- get recommendations and concrete plans - ACT:
snap,check- task and validation - REFLECT:
snap_learn,snap_end- capture learnings - UTILITY:
snap_fix,snap_help- snapshots and help
What you get:
- Clean, focused tool list for AI assistants
- Fast tool discovery and invocation
- Anthropic MCP best-practice compliance
- All essential SnapBack workflows
Full Surface (Advanced)
Set SNAPBACK_MCP_INTELLIGENCE_SURFACE=full to enable advanced tools:
Additional Tools (11):
snap_violation- Report code violations for pattern learninglearning_gc- Learning lifecycle management- Intelligence Layer (5 tools): External context integration
snapback_validate_change,snapback_get_risk_score,snapback_query_patternssnapback_get_context,snapback_suggest_rollback
- Learning Intelligence (5 tools): Pattern-based learning system
intelligence.capture,intelligence.patterns,intelligence.insightsintelligence.explain,intelligence.outcome
Enabling Full Surface:
// In your MCP config (e.g., ~/.cursor/mcp.json)
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": ["@snapback/cli", "mcp", "--stdio"],
"env": {
"SNAPBACK_MCP_INTELLIGENCE_SURFACE": "full"
}
}
}
}
Use full surface when:
- You need proactive risk assessment with external context (GitHub, Sentry, Context7)
- You want pattern-based learning and insights
- Youβre debugging complex production issues
- You need violation tracking and lifecycle management
1. pulse - Workspace Vitals (PERCEIVE)
Quick health check of workspace state before taking action.
Parameters:
{
record_change?: string; // Optional file path to record as change
}
Wire Response:
π«|pulse:elevated|cpm:18|pressure:45|risk:M|changes:7|action:monitor
2. advise - Get Recommendations (REASON)
Get AI-powered advice on next steps based on current workspace state.
Parameters:
{
task?: string; // What you're about to do
files?: string[]; // Files you plan to modify
intent?: 'implement' | 'refactor' | 'debug' | 'test' | 'deploy';
}
Wire Response:
π§ |conf:65|rec:review|warn:2|learn:3|viol:1|hint:check_error_handling
3. snap - Universal Entry Point (ACT)
Start tasks, get context, or quick check. This is the primary tool AI assistants should call first.
Parameters:
{
mode?: 'start' | 'check' | 'context'; // or legacy: 's' | 'c' | 'x'
task?: string; // Task description (for start mode)
files?: string[]; // Files to work on
keywords?: string[]; // Keywords for learning retrieval
intent?: 'implement' | 'debug' | 'refactor' | 'review' | 'explore';
thorough?: boolean; // Enable 7-layer validation (check mode)
compact?: boolean; // Use compact wire format
goal?: { // Goal for task completion validation
metric: 'bundle' | 'performance' | 'coverage';
target: number;
unit: string;
};
}
Modes:
start(ors): Start a task, creates snapshot, loads learningscheck(orc): Quick validation of filescontext(orx): Get current context without starting a task
Usage Example:
// AI assistant starts a task
await mcp.call('snap', {
mode: 'start',
task: 'Refactor authentication module',
files: ['src/auth.ts', 'src/config.ts'],
intent: 'refactor'
});
4. check - Code Validation (ACT)
Validate code against patterns, run builds, check for issues.
Parameters:
{
mode?: 'quick' | 'full' | 'patterns' | 'build' | 'impact' | 'circular'
| 'docs' | 'learnings' | 'architecture' | 'trace' | 'security'
| 'coverage' | 'orphans' | 'health';
files?: string | string[]; // Files to check
diff?: 'staged' | 'changed' | 'uncommitted'; // Auto-detect from git
code?: string; // Code to validate (for patterns mode)
tests?: boolean; // Run tests
compact?: boolean; // Use compact wire format
}
Modes (14 total):
quick: Fast TypeScript + lint check (default)full: Comprehensive 7-layer validationpatterns: Pattern-only style compliancebuild: Build verification (runs pnpm build)impact: Change impact analysis with risk scoringcircular: Circular dependency detectiondocs: Documentation freshness checklearnings: Learning tier maintenance and statsarchitecture: Layer dependency validationtrace: Deep dependency analysis with confidencesecurity: Secret detection and threat scanningcoverage: Test coverage analysisorphans: Find orphan files and skipped testshealth: MCP server diagnostics
5. snap_end - Complete Task (REFLECT)
Complete a task and capture learnings.
Parameters:
{
outcome?: 'completed' | 'abandoned' | 'blocked';
learnings?: string[]; // Key learnings from this task
notes?: string; // Additional completion notes
efficiency?: { // Your estimate of session efficiency
saved?: string; // Tokens saved (e.g., '~15K')
prevented?: string; // Mistakes avoided (e.g., '2 - wrong layer')
helped?: string; // What context helped (e.g., 'auth patterns')
};
survey?: { // Optional self-assessment (helps improve SnapBack)
patterns_used?: number; // How many patterns applied
pitfalls_avoided?: number; // How many mistakes avoided
helpfulness?: number; // Rating 1-5
unhelpful_count?: number; // Count of unhelpful suggestions
};
compact?: boolean; // Use compact wire format
}
Wire Response:
π§’|E|status:OK|learn:2L|files:3F|lines:+45-12
6. snap_fix - Snapshot Operations (UTILITY)
List snapshots, restore, or compare.
Parameters:
{
action?: 'list' | 'restore' | 'diff'; // Operation type (default: list)
id?: string; // Snapshot ID (for restore/diff)
diffWith?: string; // Second snapshot ID (for diff)
dryRun?: boolean; // Preview mode (default: true for safety)
confirm?: boolean; // Required with dryRun:false for actual restore
files?: string[]; // Specific files to restore
compact?: boolean; // Use compact wire format
}
Usage Example:
// List available snapshots
await mcp.call('snap_fix', { action: 'list' });
// Preview restore (default - safe)
await mcp.call('snap_fix', { action: 'restore', id: 'snap_abc123' });
// Actually restore (requires both flags)
await mcp.call('snap_fix', { action: 'restore', id: 'snap_abc123', dryRun: false, confirm: true });
// Compare two snapshots
await mcp.call('snap_fix', { action: 'diff', id: 'snap_before', diffWith: 'snap_after' });
7. snap_help - Help and Discovery (UTILITY)
Get help with SnapBack operations. Returns plain text only (no wire format) - the escape hatch when wire format is confusing.
Parameters:
{
topic?: 'tools' | 'status' | 'wire' | 'modes' | 'thresholds' | 'decision' | 'all';
}
Topics:
tools: List all available tools with modesstatus: Current session statewire: Wire format grammar and field meaningsmodes: Explanation of all snap and check modesthresholds: Auto-promotion rules (3xβpattern, 5xβautomation)decision: Tool selection decision treeall: Comprehensive help (default)
8. snap_learn - Capture Learning (REFLECT)
Capture mid-session insights for future reference. Use this mid-task for immediate insights (vs snap_end for end-of-task summary).
Parameters:
{
trigger: string; // REQUIRED: What situation triggers this learning
action: string; // REQUIRED: What to do when triggered
type?: 'pattern' | 'pitfall' | 'efficiency' | 'discovery' | 'workflow';
source?: string; // Where this learning originated
compact?: boolean;
}
Learning Types:
pattern: Something that worked well (βWhen doing X, always do Yβ)pitfall: Mistake to avoid (βNever do X because Y happensβ)efficiency: Token/time optimization (βUse X instead of Yβ)discovery: New codebase knowledge (βFile X handles Yβ)workflow: Process improvement (βBetter way to do Xβ)
Wire Response:
π§’|L|status:OK|id:learn_abc123|type:pattern
Usage Example:
await mcp.call('snap_learn', {
trigger: 'modifying auth middleware',
action: 'always validate session before token refresh',
type: 'pitfall'
});
9. snap_violation - Report Violation (REFLECT)
Report a mistake for pattern learning. Use for actual bugs/errors (vs snap_learn pitfall for potential mistakes).
Parameters:
{
type: string; // REQUIRED: Violation category (e.g., 'silent_catch')
file: string; // REQUIRED: File where violation occurred
description: string; // REQUIRED: What went wrong
reason?: string; // Why it happened (optional)
prevention: string; // REQUIRED: How to prevent in future
compact?: boolean;
}
Auto-Escalation:
- 1st time: Recorded and tracked
- 3rd time: Promoted to pattern (prevents future occurrences)
- 5th time: Flagged for automation
Wire Response:
π§’|V|status:OK|type:silent_catch|count:3|promote:PROMOTED
Usage Example:
await mcp.call('snap_violation', {
type: 'silent_catch',
file: 'src/auth.ts',
description: 'Catch block swallowed error without logging',
reason: 'Rushed implementation, forgot logging',
prevention: 'Always log in catch blocks with context'
});
Intelligence Layer Tools (Advanced)
Proactive Intelligence: These tools enable AI assistants to evaluate changes before theyβre made by aggregating external context from GitHub, Sentry, and documentation sources. Available on all tiers when external MCP servers are configured.
The Intelligence Layer transforms SnapBack from reactive protection to proactive prevention:
Before: AI makes change β SnapBack snapshots it β User restores if broken
After: AI proposes change β SnapBack evaluates against context β Informed decision before damage
Prerequisites
Intelligence Layer tools require external MCP server connections:
- GitHub MCP (
@modelcontextprotocol/server-github) - Commit history, PR discussions, issue references - Context7 MCP - API documentation validation, deprecation warnings
- Sentry MCP (
@modelcontextprotocol/server-sentry) - Error tracking, stacktraces, failure patterns
Optional Feature: Intelligence Layer tools work alongside core tools but require additional MCP server setup. Core SnapBack functionality works without these integrations.
1. snapback_validate_change - Proactive Change Validation
Validate file changes against aggregated external context before theyβre applied.
Parameters:
{
files: Array<{ // Files to validate
path: string;
content?: string; // New content (optional)
diff?: string; // Git diff (optional)
}>;
context?: {
intent?: string; // Why this change is being made
relatedIssues?: string[]; // GitHub issue references
};
}
Response:
{
validationResult: {
overallRisk: number; // 0-100 risk score
riskLevel: 'low' | 'medium' | 'high' | 'critical';
findings: Array<{
file: string;
type: 'security' | 'deprecation' | 'pattern_violation' | 'error_prone';
severity: 'low' | 'medium' | 'high' | 'critical';
message: string;
source: 'github' | 'sentry' | 'context7' | 'local';
confidence: number; // 0-100
}>;
recommendation: 'proceed' | 'review' | 'block';
context: {
recentErrors?: number; // From Sentry
relatedCommits?: number; // From GitHub
deprecationWarnings?: number; // From Context7
};
};
}
Wire Response:
π|V|score:45|level:medium|findings:3|rec:review|src:github+sentry
Usage Example:
// AI assistant validates before applying changes
const validation = await mcp.call('snapback_validate_change', {
files: [{
path: 'src/auth.ts',
content: '// proposed new content...'
}],
context: {
intent: 'Add JWT token refresh logic',
relatedIssues: ['#123']
}
});
if (validation.validationResult.recommendation === 'block') {
console.warn('High risk detected - review required');
}
2. snapback_get_risk_score - Weighted Risk Assessment
Get comprehensive risk score with weighted factors from multiple sources.
Parameters:
{
files: string[]; // File paths to analyze
includeContext?: boolean; // Include full context details
}
Response:
{
riskScore: number; // 0-100 weighted score
riskLevel: 'low' | 'medium' | 'high' | 'critical';
factors: Array<{
source: 'github' | 'sentry' | 'context7' | 'local';
weight: number; // 0-1 contribution to score
score: number; // 0-100 for this factor
reason: string;
}>;
recommendation: string;
confidence: number; // 0-100 overall confidence
}
Wire Response:
π―|R|score:67|level:high|factors:4|conf:85|rec:snapshot_first
Usage Example:
const risk = await mcp.call('snapback_get_risk_score', {
files: ['src/payment.ts', 'src/api.ts'],
includeContext: true
});
console.log(`Risk: ${risk.riskLevel} (${risk.riskScore}/100)`);
risk.factors.forEach(f => {
console.log(`- ${f.source}: ${f.score} (weight: ${f.weight})`);
});
3. snapback_query_patterns - Pattern Database Query
Query SnapBackβs patterns, violations, and learnings database.
Parameters:
{
query: string; // Search query
type?: 'pattern' | 'violation' | 'learning' | 'all';
filters?: {
files?: string[]; // Filter by file patterns
severity?: string[]; // Filter by severity
since?: string; // ISO date - patterns since date
};
limit?: number; // Max results (default: 10)
}
Response:
{
results: Array<{
type: 'pattern' | 'violation' | 'learning';
id: string;
trigger: string; // When this applies
action: string; // What to do
occurrences: number; // How many times seen
lastSeen: string; // ISO date
confidence: number; // 0-100
relatedFiles: string[];
}>;
total: number;
query: string;
}
Wire Response:
π|P|results:7|type:violation|query:auth|conf:92
Usage Example:
// Check for known auth-related pitfalls
const patterns = await mcp.call('snapback_query_patterns', {
query: 'authentication',
type: 'violation',
filters: { severity: ['high', 'critical'] }
});
patterns.results.forEach(p => {
console.log(`β οΈ ${p.trigger} β ${p.action}`);
});
4. snapback_get_context - Aggregated External Context
Get comprehensive context from all integrated external sources.
Parameters:
{
files: string[]; // Files to get context for
sources?: Array<'github' | 'sentry' | 'context7' | 'local'>; // Filter sources
depth?: 'shallow' | 'deep'; // Context depth
}
Response:
{
context: {
github?: {
recentCommits: Array<{...}>;
relatedPRs: Array<{...}>;
issues: Array<{...}>;
};
sentry?: {
recentErrors: Array<{...}>;
errorFrequency: number;
affectedUsers: number;
};
context7?: {
apiDocs: Array<{...}>;
deprecations: Array<{...}>;
versionInfo: {...};
};
local?: {
snapshots: number;
changeVelocity: number;
aiDetectionSignals: Array<{...}>;
};
};
aggregatedAt: string; // ISO timestamp
sources: string[]; // Active sources
}
Wire Response:
π|C|sources:3|commits:12|errors:5|docs:8|depth:deep
Usage Example:
const context = await mcp.call('snapback_get_context', {
files: ['src/auth.ts'],
sources: ['github', 'sentry'],
depth: 'deep'
});
if (context.context.sentry?.errorFrequency > 10) {
console.warn('High error rate detected in this file');
}
5. snapback_suggest_rollback - Intelligent Rollback Suggestions
Get rollback suggestions based on failure patterns and context.
Parameters:
{
reason?: string; // Why rollback is needed
files?: string[]; // Specific files to consider
includeAnalysis?: boolean; // Include detailed analysis
}
Response:
{
suggestions: Array<{
snapshotId: string;
timestamp: string;
reason: string;
confidence: number; // 0-100
filesAffected: string[];
riskOfRollback: 'low' | 'medium' | 'high';
relatedContext: {
commitsBetween?: number;
errorsSince?: number;
};
}>;
recommended?: string; // Recommended snapshot ID
analysis?: { // If includeAnalysis: true
currentState: {...};
targetState: {...};
impact: {...};
};
}
Wire Response:
π|RB|suggestions:3|recommended:snap_abc|conf:88|risk:low
Usage Example:
const rollback = await mcp.call('snapback_suggest_rollback', {
reason: 'Critical error after auth refactor',
files: ['src/auth.ts'],
includeAnalysis: true
});
const best = rollback.suggestions[0];
console.log(`Suggest rolling back to: ${best.snapshotId}`);
console.log(`Confidence: ${best.confidence}%`);
console.log(`Risk: ${best.riskOfRollback}`);
Setup External MCP Servers
# Install GitHub MCP server
npm install -g @modelcontextprotocol/server-github
# Configure in MCP settings
# Add to your AI assistant's MCP config:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}# Install Sentry MCP server
npm install -g @modelcontextprotocol/server-sentry
# Configure in MCP settings
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["@modelcontextprotocol/server-sentry"],
"env": {
"SENTRY_AUTH_TOKEN": "your_token_here",
"SENTRY_ORG": "your-org",
"SENTRY_PROJECT": "your-project"
}
}
}
}# Install Context7 MCP (requires subscription)
npm install -g @context7/mcp-server
# Configure in MCP settings
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["@context7/mcp-server"],
"env": {
"CONTEXT7_API_KEY": "your_api_key"
}
}
}
}Integration Architecture
AI Assistant
β
βΌ
SnapBack MCP Server (Local)
β
ββββΊ GitHub MCP βββΊ GitHub API
ββββΊ Sentry MCP βββΊ Sentry API
ββββΊ Context7 MCP βββΊ Context7 API
β
βΌ
Aggregated Context
β
βΌ
Risk Engine (Weighted Scoring)
β
βΌ
Intelligence Response
Privacy Note: External MCP servers make API calls using YOUR tokens/credentials. SnapBack orchestrates these calls but doesnβt store or transmit your credentials.
Backend MCP (Planned)
Coming Soon: Backend MCP features are currently in development for Solo, Team, and Enterprise plans.
Whatβs Planned
Backend MCP will add cloud-powered capabilities to your local MCP integration:
Cloud Backup
Automatically sync snapshots to encrypted cloud storage with configurable retention.
Advanced AI Scoring
Cloud-based Guardian AI analyzes code for security risks with higher accuracy.
Team Collaboration
Share snapshots and policies across your team with granular access controls.
Privacy Notice
Privacy & Consent: Backend MCP requires explicit consent before sending data to SnapBack servers. Metadata (file paths, risk scores, timestamps) is uploaded with end-to-end encryption. File contents are never sent unless you explicitly enable cloud backup.
Whatβs Uploaded (with Backend MCP):
- β Snapshot metadata: File paths, sizes, hashes (encrypted)
- β Risk analysis results: Severity scores, violation types (no code content)
- β Session metadata: Session names, durations, tag data
- β Policy configurations: File policies, team .snapbackrc settings
Whatβs Never Uploaded:
- β File contents (unless cloud backup is explicitly enabled)
- β API keys or secrets (always redacted)
- β Personal identifiable information (PII is sanitized)
- β Source code snippets (only metadata and hashes)
Planned Backend Tools
cloud_backup (Planned)
Upload a snapshot to encrypted cloud storage.
Parameters:
{
snapshotId: string;
workspacePath: string;
retention?: number; // days (default: tier-based)
}cloud_restore (Planned)
Restore a snapshot from cloud storage to your local machine.
guardian_ai_score (Planned)
Analyze code using cloud-based Guardian AI for enhanced risk detection.
Key Differences from Local analyze_risk:
- βοΈ Cloud-based ML model (higher accuracy)
- π Confidence scores and explanations
- π§ Suggested fixes for violations
- π Faster analysis for large codebases (parallel processing)
Configuration for All Supported AI Assistants
Auto-Configuration: SnapBack automatically configures MCP for most AI assistants when you install the VS Code extension. The configurations below are provided for manual setup or troubleshooting.
Supported AI Assistants
SnapBack supports 11 AI assistants with automatic MCP configuration:
- Claude Desktop β Anthropicβs desktop app
- Cursor β AI-first code editor
- Windsurf β Codeiumβs AI editor
- Qoder β AI coding assistant
- VS Code β With MCP extensions
- Continue β Open source AI assistant
- Cline β Claude-powered coding assistant
- Zed β High-performance editor
- Roo Code β AI coding companion
- Aider β AI pair programmer (CLI)
- Gemini/Antigravity β Googleβs AI assistant
Multi-Workspace Architecture
How It Works: Each workspace gets its own dedicated MCP server process. If you have 3 Cursor windows open with different projects, SnapBack spawns 3 separate MCP serversβall connecting to one shared daemon for coordination.
Example:
Cursor Workspace A β snap mcp --stdio --workspace /path/to/project-a β Process #1
Cursor Workspace B β snap mcp --stdio --workspace /path/to/project-b β Process #2
Cursor Workspace C β snap mcp --stdio --workspace /path/to/project-c β Process #3
β
All connect to: ~/.snapback/daemon/daemon.sock
Benefits:
- β Isolation β Changes in one workspace donβt affect others
- β Performance β Each server only watches its own files
- β Reliability β If one crashes, others keep working
- β Scalability β No cross-workspace coordination overhead
Manual Configuration by Client
Transport Modes: SnapBack MCP supports two transport modes:
--stdio(recommended): Direct local communication via standard input/outputshim: Bridge mode that proxies stdio to remote SSE server atsnapback-mcp.fly.dev
Always use --stdio for local development unless you specifically need remote SSE connectivity.
Understanding Transport Modes
SnapBackβs MCP server can operate in different transport modes:
--stdio Mode (Recommended)
Direct local communication using standard input/output streams. This is the default and recommended mode for all local development.
snap mcp --stdio --workspace /path/to/project
Characteristics:
- β 100% local, no network requests
- β Fastest response time (no network latency)
- β Works completely offline
- β Full privacy guarantee
- β Supported by all major AI assistants
Use this when: You want local, private MCP functionality (99% of use cases).
shim Mode (Advanced)
A stdio-to-SSE bridge that proxies local stdio requests to a remote Server-Sent Events endpoint at https://snapback-mcp.fly.dev.
snap mcp shim --workspace /path/to/project
Characteristics:
- βοΈ Connects to remote Fly.io server
- π Requires internet connectivity
- β οΈ May encounter 404 errors if server not deployed
- π Intended for stdio-only clients that need remote features
Use this when: You specifically need to connect stdio-only clients (like certain AI assistants) to a remote SSE-enabled MCP server.
Common Mistake: If you see https://snapback-mcp.fly.dev in your AI assistantβs MCP connection status with a 404 error, you likely have shim in your config when you meant to use --stdio.
Check your MCP config file and replace:
"args": ["mcp", "shim", "--workspace", "..."]with:
"args": ["mcp", "--stdio", "--workspace", "..."]1. Claude Desktop
Config File Location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
Note: Claude Desktop doesnβt support ${workspaceFolder} variable. You must either:
- Use a hardcoded path for a specific project
- Omit
--workspace(SnapBack will use current directory)
2. Cursor
Config File Locations:
- Project-level (recommended):
.cursor/mcp.jsonin your project root - Global:
~/.cursor/mcp.json
Project-Level Configuration (Recommended):
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
Global Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
Cursor Multi-Workspace: Cursor automatically replaces ${workspaceFolder} with the active workspace path, so each window gets its own MCP server instance.
3. Windsurf
Config File Location: ~/.codeium/windsurf/mcp_config.json
Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
4. Qoder
Config File Locations:
- macOS:
~/Library/Application Support/Qoder/SharedClientCache/extension/local/mcp.json - Windows:
%APPDATA%\Qoder\mcp.json - Linux:
~/.config/Qoder/mcp.json - Project-level:
.qoder-mcp-config.jsonin your project root
Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
5. VS Code
Config File Location: .vscode/mcp.json in your project root
Configuration:
{
"servers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
Note: VS Code uses "servers" instead of "mcpServers" in the config.
6. Continue
Config File Location: ~/.continue/config.json
Configuration:
{
"experimental": {
"modelContextProtocolServers": [
{
"name": "snapback",
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio"
]
}
]
}
}
Continue Structure: Continue uses a unique array-based structure under experimental.modelContextProtocolServers.
7. Cline
Config File Location: ~/.cline/mcp.json
Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
8. Zed
Config File Location: ~/.config/zed/settings.json
Configuration:
{
"context_servers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio"
]
}
}
}
Note: Zed uses "context_servers" instead of "mcpServers".
9. Roo Code
Config File Location: ~/.roo-code/mcp.json
Configuration:
{
"mcpServers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio",
"--workspace",
"${workspaceFolder}"
]
}
}
}
10. Aider (CLI)
Config File Location: ~/.aider/mcp.yaml
Configuration (YAML):
servers:
snapback:
command: npx
args:
- "@snapback/cli"
- mcp
- --stdio
Aider Format: Aider uses YAML instead of JSON for its configuration.
11. Gemini/Antigravity
Config File Location: ~/.gemini/settings.json
Configuration:
{
"context_servers": {
"snapback": {
"command": "npx",
"args": [
"@snapback/cli",
"mcp",
"--stdio"
]
}
}
}
Troubleshooting MCP Connections
Status Bar Indicators
The SnapBack VS Code extension shows MCP status in the status bar:
| Display | Meaning | Action |
|---|---|---|
SBΒ·MCP β | Connected and healthy | None needed |
SBΒ·MCP β | Disconnected | Click to diagnose |
SBΒ·MCP ~ | Partial (MCP tools work, daemon doesnβt) | Click for details |
SBΒ·MCP $(sync~spin) (1/5) | Reconnecting (attempt 1 of 5) | Wait or diagnose |
SBΒ·MCP β | CLI not installed | Install CLI |
Common Issue: βCheckmark but Disconnectedβ
Symptom: Status bar shows SBΒ·MCP β (checkmark) but Qoder/Cursor canβt use MCP tools.
Whatβs Happening:
- The status bar detects the MCP process is running
- But the daemon socket connection is broken
- This creates a false βconnectedβ state
Why It Affects All AI Assistants:
All MCP server processes connect to the same daemon socket (~/.snapback/daemon/daemon.sock). When the daemon connection breaks:
- β Qoderβs MCP server β Canβt reach daemon
- β Cursorβs MCP server β Canβt reach daemon
- β Claudeβs MCP server β Canβt reach daemon
- β All other AI assistants β Canβt reach daemon
Solution:
-
Quick Fix - Use the New Reconnect Command:
1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P) 2. Run: SnapBack: MCP Reconnect 3. Confirm reconnectionThis forces a fresh daemon connection and fixes ALL workspaces and AI assistants at once.
-
Alternative - Run Diagnostics:
Command Palette β SnapBack: MCP DiagnoseThis shows:
- Actual connection state
- Circuit breaker status
- Queue depth
- Daemon health
-
Reset Configuration (if needed):
Command Palette β SnapBack: MCP ResetThen restart VS Code.
Checking MCP Process Status
See all running MCP servers:
ps aux | grep "snap mcp --stdio"
Expected output for 3 workspaces:
user 12345 snap mcp --stdio --workspace /Users/you/project-a
user 12346 snap mcp --stdio --workspace /Users/you/project-b
user 12347 snap mcp --stdio --workspace /Users/you/project-c
Check daemon socket:
ls -la ~/.snapback/daemon/daemon.sock
If the socket doesnβt exist, the daemon isnβt running.
Multi-Workspace Troubleshooting
Problem: One workspaceβs MCP works, others donβt.
Cause: Each workspace has its own MCP server process with a different workspace path.
Solution:
-
Verify each workspace has correct path:
# Check running processes ps aux | grep "snap mcp" # Look for --workspace arguments # Each should point to its respective project root -
Check project-level configs:
# In each project cat .cursor/mcp.json cat .qoder-mcp-config.json cat .vscode/mcp.json -
Ensure
${workspaceFolder}variable is used:- Good:
"--workspace", "${workspaceFolder}" - Bad:
"--workspace", "/hardcoded/path/to/one/project"
- Good:
CLI Not Installed
Symptom: Status bar shows SBΒ·MCP β with βCLI not installedβ message.
Solution:
-
Install SnapBack CLI globally:
npm install -g @snapback/cli -
Verify installation:
snap --version npx @snapback/cli --version -
Restart your AI assistant (Cursor, Qoder, etc.)
Configuration Priority
SnapBack looks for MCP configuration in this order:
-
Project-level config (highest priority)
.cursor/mcp.json.qoder-mcp-config.json.vscode/mcp.json.windsurf/mcp.json
-
Global config
~/.cursor/mcp.json~/Library/Application Support/Qoder/.../mcp.json- etc.
Best Practice: Use project-level configs for multi-workspace setups. This ensures each workspace gets its own configuration without conflicts.
Auto-Configuration
How it works:
- Install SnapBack VS Code extension
- Extension auto-detects installed AI assistants
- Silently configures MCP for each one
- Shows toast confirming protection is active
No manual configuration needed!
Supported for auto-configuration:
- β Claude Desktop
- β Cursor
- β Windsurf
- β Qoder
- β VS Code
- β Continue
- β Cline
- β Zed
- β Roo Code
Manual configuration needed:
- β οΈ Aider (CLI tool, no auto-detect)
- β οΈ Gemini (less common, may need manual setup)
To manually trigger auto-configuration:
Command Palette β SnapBack: Configure MCP
Validation Commands
Check your MCP configuration:
# Scan for all AI assistants
snap mcp scan
# Validate configurations
snap mcp validate
# Repair broken configurations
snap mcp repair
VS Code commands:
SnapBack: MCP Diagnose β Show connection status
SnapBack: MCP Reconnect β Force reconnection
SnapBack: MCP Reset β Reset configuration state
SnapBack: MCP Validate β Check all configurations
SnapBack: MCP Status β Quick status check
Next Steps
- Install SnapBack β Get started in 2 minutes
- Configure for Cursor β Cursor-specific setup
- Configure for Copilot β GitHub Copilot integration
- Learn about AI detection β How SnapBack detects AI changes