SnapBack
Filter documentation by plan tier

Backend MCP Tools

🚧 Coming Soon: Backend MCP features are currently in development. This documentation describes the planned API for Solo, Team, and Enterprise plans. The local MCP tools (snap, check, etc.) are available now on all tiers.

Backend MCP will extend SnapBack’s local MCP integration with cloud-powered features including advanced AI risk scoring, team collaboration, and cloud backup. Available on Solo, Team, and Enterprise plans.

πŸš€ Unlock Backend MCP: Upgrade to Solo, Team, or Enterprise to access cloud features, API authentication, and team collaboration.

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

When Backend MCP is enabled:

  • βœ“ 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 MCP Tools

The following tools are planned for Backend MCP. They are not yet available.

1. cloud_backup (Planned)

Upload a snapshot to encrypted cloud storage.

Parameters:

{
  snapshotId: string;
  workspacePath: string;
  retention?: number; // days (default: tier-based)
}

Response:

{
  cloudSnapshotId: string;
  uploadedAt: string; // ISO 8601
  size: number; // bytes
  retention: number; // days
  expiresAt: string; // ISO 8601
}

Usage Example:

// AI assistant can back up important snapshots to cloud
const result = await mcp.call('cloud_backup', {
  snapshotId: 'snap_local_12345',
  workspacePath: '/Users/dev/my-project',
  retention: 90 // Override tier default
});
Upgrade to Solo

2. cloud_restore (Planned)

Restore a snapshot from cloud storage to your local machine.

Parameters:

{
  cloudSnapshotId: string;
  targetPath: string;
  options?: {
    overwrite?: boolean;
    excludePatterns?: string[];
  };
}

Response:

{
  restoredFiles: number;
  skippedFiles: number;
  errors: string[];
  localSnapshotId: string;
}
Upgrade to Solo

3. guardian_ai_score (Planned)

Analyze code using cloud-based Guardian AI for enhanced risk detection.

Parameters:

{
  filePaths: string[];
  workspacePath: string;
  options?: {
    includeExplanations?: boolean;
    threshold?: 'low' | 'medium' | 'high';
  };
}

Response:

{
  findings: Array<{
    file: string;
    type: 'secret' | 'mock_leakage' | 'phantom_dependency' | 'ai_risk';
    severity: 'low' | 'medium' | 'high' | 'critical';
    line: number;
    column: number;
    message: string;
    explanation?: string; // Only if includeExplanations: true
    suggestedFix?: string;
  }>;
  overallRisk: number; // 0-10 with decimal precision
  confidence: number; // 0-100 (AI model confidence)
}

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)
Upgrade to Solo

4. team_share_snapshot (Planned)

Share a snapshot with team members.

Parameters:

{
  snapshotId: string;
  teamId: string;
  permissions: {
    members?: string[]; // User IDs, omit for all team members
    canRestore?: boolean; // Default: true
    canDelete?: boolean; // Default: false
  };
}

Response:

{
  sharedSnapshotId: string;
  shareUrl: string;
  sharedWith: number; // Member count
  expiresAt?: string; // Optional expiration
}
Upgrade to Team

5. team_get_shared

List snapshots shared with your team.

Parameters:

{
  teamId: string;
  filters?: {
    sharedBy?: string; // User ID
    tags?: string[];
    since?: string; // ISO 8601 date
  };
}

Response:

{
  snapshots: Array<{
    id: string;
    name: string;
    sharedBy: string;
    sharedAt: string;
    size: number;
    tags: string[];
    canRestore: boolean;
  }>;
  total: number;
}
Upgrade to Team

Authentication

Backend MCP requires API key authentication:

Obtaining an API Key

  1. Upgrade to Solo, Team, or Enterprise
  2. Navigate to Dashboard β†’ Settings β†’ API Keys
  3. Click β€œGenerate New Key”
  4. Copy the key (displayed once only)
  5. Store securely in your environment variables

API Key Format:

sb_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

Scopes (configurable per key):

  • snapshots:read - List and download snapshots
  • snapshots:write - Create and upload snapshots
  • snapshots:delete - Delete snapshots
  • guardian:analyze - Use Guardian AI scoring
  • team:read - View team snapshots
  • team:write - Share snapshots with team
Upgrade to Solo

Configuring Authentication

# Set API key as environment variable
export SNAPBACK_API_KEY="sb_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"

# Or add to .snapbackconfig
{
  "mcp": {
    "backend": {
      "enabled": true,
      "apiKey": "${SNAPBACK_API_KEY}", // Use env var reference
      "endpoint": "https://api.snapback.dev" // Optional: custom endpoint
    }
  }
}

Security Best Practices:

  • βœ“ Store API keys in environment variables (not version control)
  • βœ“ Use separate keys for development and production
  • βœ“ Rotate keys every 90 days
  • βœ“ Revoke compromised keys immediately via dashboard

Configuration

Enabling Backend MCP

// .snapbackconfig
{
  "mcp": {
    "local": {
      "enabled": true // Keep local MCP enabled
    },
    "backend": {
      "enabled": true,
      "apiKey": "${SNAPBACK_API_KEY}",
      "cloudBackup": {
        "auto": true, // Auto-backup after each snapshot
        "retention": 90, // Days (tier-dependent)
        "exclude": ["node_modules/", ".git/", "*.log"]
      },
      "guardianAI": {
        "enabled": true,
        "threshold": "medium", // low | medium | high
        "autoAnalyze": true // Analyze on save
      }
    }
  }
}

VS Code Extension Settings

// VS Code settings.json
{
  "snapback.mcp.backend.enabled": true,
  "snapback.mcp.backend.cloudBackup.auto": true,
  "snapback.mcp.backend.guardianAI.enabled": true,
  "snapback.mcp.backend.guardianAI.threshold": "medium"
}

Tier-Specific Limits

FeatureSoloTeamEnterprise
Cloud Storage5GB50GB100GB+
Cloud Retention30 days90 daysCustom
API Rate Limit100/hr500/hrUnlimited
Guardian AI Calls50/hr200/hrUnlimited
Team Members110Unlimited
Snapshot SharingβŒβœ“βœ“
SSO/SAMLβŒβŒβœ“

See full comparison β†’

Usage Examples

Automatic Cloud Backup

// AI assistant creates and backs up snapshot
const snapshot = await mcp.call('create_snapshot', {
  workspacePath: '/Users/dev/my-project',
  message: 'Before refactoring'
});

const backup = await mcp.call('cloud_backup', {
  snapshotId: snapshot.id,
  workspacePath: '/Users/dev/my-project'
});

console.log(`Snapshot backed up to cloud: ${backup.cloudSnapshotId}`);

Advanced Risk Analysis

// AI assistant analyzes code with Guardian AI
const analysis = await mcp.call('guardian_ai_score', {
  filePaths: ['src/auth.ts', 'src/api.ts'],
  workspacePath: '/Users/dev/my-project',
  options: {
    includeExplanations: true,
    threshold: 'medium'
  }
});

for (const finding of analysis.findings) {
  console.log(`${finding.severity}: ${finding.message}`);
  if (finding.suggestedFix) {
    console.log(`Suggested fix: ${finding.suggestedFix}`);
  }
}

Team Collaboration

// Share snapshot with team
const share = await mcp.call('team_share_snapshot', {
  snapshotId: 'snap_12345',
  teamId: 'team_acme',
  permissions: {
    canRestore: true,
    canDelete: false
  }
});

console.log(`Shared with ${share.sharedWith} team members`);
console.log(`Share URL: ${share.shareUrl}`);

Troubleshooting

Authentication Errors

# Verify API key is set
echo $SNAPBACK_API_KEY

# Test API connection
snapback mcp test-backend

# Check API key permissions
snapback api whoami

Common Issues:

  • 401 Unauthorized: Invalid or expired API key
  • 403 Forbidden: Insufficient permissions (check scopes)
  • 429 Too Many Requests: Rate limit exceeded (upgrade tier)

Cloud Backup Failures

  1. Check storage quota: snapback cloud status
  2. Verify network connectivity: ping api.snapback.dev
  3. Review excluded patterns: Ensure important files aren’t excluded
  4. Check logs: snapback mcp logs --backend

Guardian AI Timeout

If Guardian AI analysis times out:

  1. Reduce file count per analysis (max 50 files recommended)
  2. Increase timeout in config: guardianAI.timeout: 30000 (ms)
  3. Check rate limits: snapback api limits

CLI Commands

# Test backend MCP connection
snapback mcp test-backend

# Check cloud storage status
snapback cloud status

# List cloud snapshots
snapback cloud list [--limit 10]

# Upload snapshot to cloud
snapback cloud backup <snapshot-id>

# Restore from cloud
snapback cloud restore <cloud-snapshot-id> [--target ./restored]

# Analyze with Guardian AI
snapback guardian analyze <file-paths...> [--cloud]

# Team commands (Team+ only)
snapback team share <snapshot-id> [--members user1,user2]
snapback team list-shared

Best Practices

πŸ” Secure Your API Key

Never commit API keys to version control. Use environment variables or secure vaults.

☁️ Configure Retention

Set appropriate retention periods to balance storage costs and recovery needs.

πŸ€– Use Guardian AI Selectively

Run cloud analysis on critical files to conserve rate limits and reduce latency.

πŸ‘₯ Review Team Permissions

Regularly audit who has access to shared snapshots and revoke as needed.

Privacy First: SnapBack works 100% offline on the Free plan. MCP is optional and requires explicit consent on paid plans. Learn more β†’

Privacy First: SnapBack works 100% offline on the Free plan. MCP is optional and requires explicit consent on paid plans. Learn more β†’