Skip to content
MCP server

LiteScope

Dry-run, snapshot and rewind AI writes to SQLite, Cloudflare D1 and Turso databases

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.9.0
Listing updated
1 day ago

About LiteScope

LiteScope is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

The core promise is that an agent should never write blind. Every write is a dry run by default that reports the exact rows affected, and each applied write captures a rewind point first: a local snapshot, or a Cloudflare D1 Time Travel bookmark, so a single call can undo it. The README's example is asking Claude to delete inactive users, seeing the blast radius, approving, and later saying undo that.

Beyond safety it is a pure-Go operations toolkit for SQLite fleets: one-command health checks with an HTML report, SQLITE_BUSY diagnosis, VACUUM INTO backups, schema and data diffs, schema lint for CI, missing-index advice, Mermaid ERDs, portable SQL export, CSV to SQLite import, and Prometheus metrics for Grafana.

The server is read-only unless started with --allow-writes, and D1 sources need a Cloudflare API token and account ID. The code is AGPL-3.0; a hosted dashboard is the only paid part. A Claude Code plugin adds five skills.

Install

Run in a terminal

claude mcp add litescope --env CLOUDFLARE_API_TOKEN='<CLOUDFLARE_API_TOKEN>' -- npx -y litescope

Add to claude_desktop_config.json

{
  "mcpServers": {
    "litescope": {
      "command": "npx",
      "args": [
        "-y",
        "litescope"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "litescope": {
      "command": "npx",
      "args": [
        "-y",
        "litescope"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "litescope": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "litescope"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "litescope": {
      "command": "npx",
      "args": [
        "-y",
        "litescope"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "litescope": {
      "command": "npx",
      "args": [
        "-y",
        "litescope"
      ],
      "env": {
        "CLOUDFLARE_API_TOKEN": "<CLOUDFLARE_API_TOKEN>"
      }
    }
  }
}

Configuration

  • CLOUDFLARE_API_TOKENCloudflare API token — only needed for Cloudflare D1 sources (d1://...)
  • CLOUDFLARE_ACCOUNT_IDCloudflare account ID — only needed for Cloudflare D1 sources

What it does

Dry-run writes
Shows exact rows affected before anything changes.
One-call undo
Rewind via a local snapshot or D1 Time Travel bookmark.
Lock diagnosis
Explains SQLITE_BUSY with the PRAGMA fix.
Schema diff and lint
Compares databases and flags design smells for CI.
Fleet metrics
Exposes health and drift as Prometheus text.
Read-only default
Writes need --allow-writes.

Good for

  • Let an agent edit a D1 table with an undo path
  • Diagnose a locked SQLite database
  • Diff local and production schemas for a migration
  • Back up Turso databases with retention
  • Import a CSV into a typed database

Pricing

Open source

AGPL-3.0, free; optional paid hosted dashboard

Prices change. Check litescope-site.pages.dev before you buy.

LiteScope FAQ

Is it free?

Yes, AGPL-3.0; only a hosted dashboard is paid.

Can it write by default?

No. Writes require --allow-writes and are dry-run first.

What does D1 need?

A Cloudflare API token and account ID.

How do I add it to Claude Code?

Run claude mcp add litescope -- litescope mcp.

Is LiteScope free?

Yes. LiteScope is open source, so you can use and self-host it for free.

How do I add LiteScope to Claude Code?

Run this command in your terminal: claude mcp add litescope --env CLOUDFLARE_API_TOKEN='<CLOUDFLARE_API_TOKEN>' -- npx -y litescope

What are the best alternatives to LiteScope?

The closest alternatives to LiteScope are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to LiteScope

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools