SnapBack MCP Server

SnapBack MCP Server

Enables AI-powered code safety analysis including risk detection, secret scanning, dependency checking, and code snapshot management. Works offline for basic features with optional cloud integration for advanced ML analysis and team collaboration.

Category
Visit Server

README

SnapBack MCP Server

npm version License

AI-powered code analysis and snapshot management via Model Context Protocol

Integrate SnapBack's code safety features directly into Claude Desktop, Cursor, and any MCP-compatible AI tool.

Quick Start

npm install -g @snapback/mcp-server
snapback-mcp

Works immediately - no configuration required!

Features

πŸ†“ Free (No Account Needed)

  • βœ… Risk Analysis: Detect secrets, vulnerabilities in code changes
  • βœ… Dependency Checking: Validate package.json changes
  • βœ… Local Analysis: Basic secret detection and security scanning
  • βœ… Offline Mode: Works without internet connection
  • βœ… Context7 Integration: Library documentation and code search

☁️ Pro Features (Optional API Key)

Get a free API key from snapback.dev to unlock:

  • πŸ” Advanced ML Analysis: AI-powered risk detection
  • πŸ” Snapshot Management: Create and restore code snapshots
  • πŸ” Cloud Sync: Access snapshots across devices
  • πŸ” Team Sharing: Collaborate on code safety

Installation

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "snapback": {
      "command": "npx",
      "args": ["-y", "@snapback/mcp-server"]
    }
  }
}

With API Key (Optional)

{
  "mcpServers": {
    "snapback": {
      "command": "npx",
      "args": ["-y", "@snapback/mcp-server"],
      "env": {
        "SNAPBACK_API_KEY": "your_api_key_here"
      }
    }
  }
}

Cursor / Other MCP Clients

# Install globally
npm install -g @snapback/mcp-server

# Run with stdio transport
snapback-mcp

Available Tools

snapback.analyze_risk

Analyze code changes for potential security risks before applying them.

When to use:

  • Before accepting AI-generated code
  • When reviewing complex changes
  • For critical files (auth, database, config)

Example:

// AI detects you want to add authentication
// Before applying changes, it calls:
snapback.analyze_risk({
  changes: [
    { added: true, value: "const API_KEY = 'sk_live_...';" }
  ]
})
// Returns: ⚠️ HIGH RISK: Hardcoded secret detected

snapback.check_dependencies

Check for dependency-related risks when package.json changes.

Example:

snapback.check_dependencies({
  before: { "lodash": "^4.17.15" },
  after: { "lodash": "^4.17.21" }
})
// Returns: ℹ️ Security update available

snapback.create_snapshot (Pro)

Create a code snapshot before risky changes.

Example:

snapback.create_snapshot({
  reason: "Before major refactor",
  files: ["src/auth.ts", "src/db.ts"]
})
// Returns: βœ… Snapshot created: snap_xyz123

snapback.list_snapshots (Pro)

List all available snapshots.

snapback.restore_snapshot (Pro)

Restore code from a previous snapshot.

Context7 Tools

  • ctx7.resolve-library-id: Find library documentation
  • ctx7.get-library-docs: Fetch library docs and examples

Configuration

Environment Variables

# Optional: SnapBack API key for Pro features
SNAPBACK_API_KEY=sk_...

# Optional: Custom API URL
SNAPBACK_API_URL=https://api.snapback.dev

# Optional: Context7 API key for enhanced docs
CONTEXT7_API_KEY=...

# Optional: Log level
LOG_LEVEL=info

Offline Mode

Works perfectly without any configuration or API keys:

# No env vars needed!
npx @snapback/mcp-server

What works offline:

  • Risk analysis (basic)
  • Dependency checking
  • Secret detection
  • Context7 library search (cached)

What requires API key:

  • Advanced ML risk analysis
  • Snapshot creation/restoration
  • Cloud sync
  • Team features

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   AI Tool       β”‚  (Claude, Cursor, etc.)
β”‚   (MCP Client)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚ MCP Protocol
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  SnapBack MCP Server                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Free Tools   β”‚  β”‚  Pro Tools       β”‚ β”‚
β”‚  β”‚ - analyze    β”‚  β”‚  - snapshots     β”‚ β”‚
β”‚  β”‚ - check_deps β”‚  β”‚  - cloud sync    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚
        β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”
        β”‚        β”‚
   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚ Local  β”‚ β”‚ SnapBack  β”‚
   β”‚Analysisβ”‚ β”‚    API    β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Development

Running Locally

git clone https://github.com/snapback-dev/mcp-server.git
cd mcp-server

pnpm install
pnpm build
pnpm start

Testing

# Run tests
pnpm test

# Test without API key (offline mode)
unset SNAPBACK_API_KEY
pnpm start

# Test with API key
export SNAPBACK_API_KEY=sk_test_...
pnpm start

Building

pnpm build

# Output: dist/index.js (ESM)

Troubleshooting

Server won't start

  1. Check Node.js version: node -v (requires 18+)
  2. Clear cache: rm -rf node_modules && npm install
  3. Check permissions: chmod +x $(which snapback-mcp)

API key not working

  1. Verify key format: sk_live_... or sk_test_...
  2. Check env var: echo $SNAPBACK_API_KEY
  3. Get new key: snapback.dev/settings/api

Tools not showing in Claude

  1. Restart Claude Desktop completely
  2. Check config file syntax (JSON must be valid)
  3. Look for errors in Claude's console logs

Security

  • All secrets handled via environment variables
  • No data sent to SnapBack without API key
  • Local analysis runs offline
  • Open source - audit the code yourself

Report security issues: security@snapback.dev

Links

License

Apache-2.0 Β© SnapBack

Related

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured