# SQLite MCP Sidecar

> SQLite MCP Sidecar is an open-source MCP server for databases. Agent-safe MCP sidecar giving read-only default access to one live SQLite database. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, API, Linux
- **Website:** https://xakpc.dev
- **Repository:** https://github.com/xakpc/sqlite-mcp-sidecar
- **MCP Registry name:** dev.xakpc/sqlite-mcp-sidecar
- **Categories:** databases, developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/sqlite-mcp-sidecar
