Skip to content
MCP server

SQLite MCP Sidecar

Agent-safe MCP sidecar giving read-only default access to one live SQLite database

Pricing
Open source
Platforms
self-hosted, API, Linux
Runs
Remotely
Version
0.1.3
Listing updated
3 days ago

About SQLite MCP Sidecar

SQLite MCP Sidecar is an open-source MCP server for databases. It runs as a hosted remote server, so there is nothing to install locally.

Giving an agent a raw SQL connection exposes the whole file, and one DELETE with a wrong predicate cannot be undone. This sidecar runs next to the application that owns the database as another SQLite client, so the owning app does not change, and it speaks MCP over HTTP at /db/mcp with a static bearer token. There is no OAuth.

It is designed for an authorized agent that makes a mistake, not only for unauthorized callers. The README lists structured writes, a mandatory predicate, a row limit that counts cascades and a per-minute write budget. Permission sets are schema, read, write, backup, diagnostics and danger-raw-write, with schema and read as the default. Row output uses the TOON format to cost fewer tokens than JSON.

One sidecar process serves one database, because request budgets and the idempotency cache live in memory; the README says not to scale it to replicas. The database file must already exist and its mount must be writable even for read-only use, because of SQLite's WAL shared-memory file. It is built on .NET 10 and ships as a Docker image, and runs in production beside the MCP Canary API.

Install

Run in a terminal

claude mcp add sqlite-mcp-sidecar --env SQLITE_SIDECAR_DB='<SQLITE_SIDECAR_DB>' --env SQLITE_SIDECAR_TOKEN='<SQLITE_SIDECAR_TOKEN>' -- docker run -i --rm -e SQLITE_SIDECAR_DB -e SQLITE_SIDECAR_TOKEN ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3

Add to claude_desktop_config.json

{
  "mcpServers": {
    "sqlite-mcp-sidecar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SQLITE_SIDECAR_DB",
        "-e",
        "SQLITE_SIDECAR_TOKEN",
        "ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
      ],
      "env": {
        "SQLITE_SIDECAR_DB": "<SQLITE_SIDECAR_DB>",
        "SQLITE_SIDECAR_TOKEN": "<SQLITE_SIDECAR_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "sqlite-mcp-sidecar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SQLITE_SIDECAR_DB",
        "-e",
        "SQLITE_SIDECAR_TOKEN",
        "ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
      ],
      "env": {
        "SQLITE_SIDECAR_DB": "<SQLITE_SIDECAR_DB>",
        "SQLITE_SIDECAR_TOKEN": "<SQLITE_SIDECAR_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "sqlite-mcp-sidecar": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SQLITE_SIDECAR_DB",
        "-e",
        "SQLITE_SIDECAR_TOKEN",
        "ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
      ],
      "env": {
        "SQLITE_SIDECAR_DB": "<SQLITE_SIDECAR_DB>",
        "SQLITE_SIDECAR_TOKEN": "<SQLITE_SIDECAR_TOKEN>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "sqlite-mcp-sidecar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SQLITE_SIDECAR_DB",
        "-e",
        "SQLITE_SIDECAR_TOKEN",
        "ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
      ],
      "env": {
        "SQLITE_SIDECAR_DB": "<SQLITE_SIDECAR_DB>",
        "SQLITE_SIDECAR_TOKEN": "<SQLITE_SIDECAR_TOKEN>"
      }
    }
  }
}

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

{
  "mcpServers": {
    "sqlite-mcp-sidecar": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SQLITE_SIDECAR_DB",
        "-e",
        "SQLITE_SIDECAR_TOKEN",
        "ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3"
      ],
      "env": {
        "SQLITE_SIDECAR_DB": "<SQLITE_SIDECAR_DB>",
        "SQLITE_SIDECAR_TOKEN": "<SQLITE_SIDECAR_TOKEN>"
      }
    }
  }
}

Configuration

  • SQLITE_SIDECAR_DBPath of the existing SQLite file inside the containerRequired
  • SQLITE_SIDECAR_TOKENDeployment bearer token (a long random string)Required
  • SQLITE_SIDECAR_PERMISSIONSPermission set: schema, read, write, backup, diagnostics, danger-raw-write

What it does

Read-only by default
Starts with the schema and read permission set unless you grant more.
Bounded writes
Structured writes need a predicate, a row limit counting cascades and a per-minute budget.
Six permission sets
Schema, read, write, backup, diagnostics and danger-raw-write.
No change to the host app
Runs as a separate SQLite client beside the application that owns the file.
Token-efficient output
Returns rows in TOON format rather than JSON.
Container deployment
Docker image with a bearer token and a path to the existing database.

Good for

  • Let a coding agent inspect a production SQLite database read-only
  • Allow an agent to change a few rows under a row limit
  • Take a backup through an agent-accessible tool
  • Diagnose an app's live database without giving shell access

Pricing

Open source

Free to run; Docker image on ghcr.io

Prices change. Check xakpc.dev before you buy.

SQLite MCP Sidecar FAQ

How is access authenticated?

With a static bearer token set as SQLITE_SIDECAR_TOKEN, sent in an Authorization header. There is no OAuth.

Can I run multiple replicas?

No. The README says one sidecar serves one database, since budgets and the idempotency cache live in process memory.

Does it create the database?

No. The SQLite file must already exist; creating one could hide a wrong path.

Why must the mount be writable?

SQLite opens the -shm file read-write for read-only connections to a WAL database.

How many tools does it have?

The README has a section titled The eight tools.

Is SQLite MCP Sidecar free?

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

How do I add SQLite MCP Sidecar to Claude Code?

Run this command in your terminal: claude mcp add sqlite-mcp-sidecar --env SQLITE_SIDECAR_DB='<SQLITE_SIDECAR_DB>' --env SQLITE_SIDECAR_TOKEN='<SQLITE_SIDECAR_TOKEN>' -- docker run -i --rm -e SQLITE_SIDECAR_DB -e SQLITE_SIDECAR_TOKEN ghcr.io/xakpc/sqlite-mcp-sidecar:0.1.3

What are the best alternatives to SQLite MCP Sidecar?

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

Alternatives to SQLite MCP Sidecar

  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