Local MCP Integration Free
SnapBack integrates with AI coding assistants through the Model Context Protocol (MCP), enabling seamless context sharing while working entirely offline. The local MCP integration is available on all tiers and requires no cloud connectivity.
Privacy Guarantee
š 100% Local, 100% Private: Local MCP integration works entirely on your machine. No data is sent to SnapBack servers. No internet connection required.
Available MCP Tools
The local MCP server provides the following tools to AI assistants:
1. create_snapshot
Create a snapshot of your current workspace state.
Parameters:
{
workspacePath: string;
message?: string;
tags?: string[];
}
Usage Example:
// AI assistant can invoke this to create a snapshot before making changes
await mcp.call('create_snapshot', {
workspacePath: '/Users/dev/my-project',
message: 'Before refactoring authentication',
tags: ['refactor', 'auth']
});
2. analyze_risk
Analyze files for security risks using SnapBackās Guardian policy engine.
Parameters:
{
filePaths: string[];
workspacePath: string;
}
Returns:
{
findings: Array<{
file: string;
type: 'secret' | 'mock_leakage' | 'phantom_dependency';
severity: 'low' | 'medium' | 'high' | 'critical';
line: number;
message: string;
}>;
riskScore: number; // 0-10
}
Usage Example:
// AI assistant checks for risks before suggesting code
const result = await mcp.call('analyze_risk', {
filePaths: ['src/config.ts', 'src/auth.ts'],
workspacePath: '/Users/dev/my-project'
});
3. check_deps
Check for phantom dependencies and missing imports.
Parameters:
{
workspacePath: string;
packageManager?: 'npm' | 'yarn' | 'pnpm';
}
Returns:
{
phantomDeps: string[];
missingDeps: string[];
warnings: string[];
}
Supported AI Assistants
Claude Code (Cursor)
Cursorās integration with Claude can leverage SnapBackās local MCP server:
// ~/.cursor/mcp-config.json
{
"mcpServers": {
"snapback": {
"command": "snapback",
"args": ["mcp", "start"],
"type": "stdio"
}
}
}
GitHub Copilot
GitHub Copilot can use SnapBackās MCP context for risk-aware suggestions:
// VS Code settings.json
{
"github.copilot.advanced": {
"mcpServers": ["snapback"]
}
}
Cline (formerly Claude Dev)
Configure Cline to use SnapBackās local MCP:
// Cline settings
{
"mcp.servers": {
"snapback": {
"command": "snapback mcp start"
}
}
}
Configuration
Enabling Local MCP
Local MCP is enabled by default. To configure settings:
// .snapbackconfig
{
"mcp": {
"local": {
"enabled": true,
"port": 3333, // Optional: custom port
"autoStart": true // Start MCP server when extension activates
}
}
}
VS Code Extension Settings
// VS Code settings.json
{
"snapback.mcp.local.enabled": true,
"snapback.mcp.local.autoStart": true,
"snapback.mcp.local.logLevel": "info" // debug | info | warn | error
}
How It Works
The local MCP server operates entirely on your machine:
- Startup: SnapBack extension starts a local MCP server on
localhost:3333 - Connection: AI assistants connect to the local server via stdio or HTTP
- Tool Invocation: Assistants call MCP tools to interact with SnapBack
- Response: SnapBack processes requests locally and returns results
- No Network: All operations happen offlineāno external requests
Context Shared Locally
The local MCP integration provides AI assistants with:
Protection Levels
File protection metadata to avoid risky modifications:
{
"protectionLevels": {
"src/config.ts": "warn",
"src/.env": "block",
"src/secrets.json": "block"
}
}
Session Context
Current session information for better assistance:
{
"currentSession": {
"id": "session_12345",
"name": "Implement authentication",
"duration": 2400, // seconds
"filesModified": ["src/auth.ts", "src/config.ts"],
"snapshotCount": 3
}
}
Risk Analysis Results
Recent security findings to avoid introducing similar risks:
{
"recentFindings": [
{
"type": "secret",
"file": "src/config.ts",
"severity": "high",
"resolved": true,
"timestamp": "2024-01-15T10:30:00Z"
}
]
}
Privacy and Security
What Stays on Your Machine
- Everything: All data, snapshots, and analysis results remain local
- File contents and code
- Protection levels and policies
- Session metadata
- Risk analysis findings
- Configuration settings
Whatās Never Shared
Local MCP integration never sends data externally:
- ā No file contents to cloud
- ā No code snippets to servers
- ā No personal information transmitted
- ā No usage telemetry (unless you opt-in separately)
Troubleshooting
MCP Server Not Starting
# Check if MCP server is running
snapback mcp status
# Start MCP server manually
snapback mcp start
# Check logs for errors
snapback mcp logs
AI Assistant Canāt Connect
- Verify MCP server is running:
snapback mcp status - Check port configuration (default: 3333)
- Restart your AI assistant
- Enable debug logging:
snapback --log-level debug mcp start
Performance Issues
If MCP operations are slow:
- Reduce snapshot retention to free up disk space
- Exclude large files from risk analysis via
.snapbackignore - Disable auto-snapshots during heavy AI assistance sessions
CLI Commands
# Start local MCP server
snapback mcp start
# Check MCP server status
snapback mcp status
# Stop MCP server
snapback mcp stop
# View MCP logs
snapback mcp logs [--tail 100]
# Test MCP connection
snapback mcp test
# Show shared context (for debugging)
snapback mcp context --format json
Best Practices
šÆ Enable Before AI Sessions
Start the MCP server before beginning intensive AI-assisted coding sessions.
š”ļø Trust but Verify
Even with MCP context, always review AI suggestions before accepting them.
š Monitor Risk Scores
Check risk analysis results regularly to ensure your codebase stays secure.
š Update Protection Levels
Keep protection levels current so AI assistants have accurate safety context.
Upgrade to Backend MCP
Want cloud-powered features like advanced AI scoring and team collaboration?
Backend MCP (available on Solo, Team, and Enterprise plans) adds:
- ā Cloud-based Guardian AI risk scoring
- ā Team snapshot sharing
- ā Cloud backup and restore
- ā API access with authentication
Related Documentation
- Protection Levels - Configure file protection
- AI Detection - Understand risk analysis
- Session Time-Travel - Navigate your coding history
- CLI Reference - Command-line tools
Privacy First: SnapBack works 100% offline on the Free plan. MCP is optional and requires explicit consent on paid plans. Learn more ā