Skip to main content
MCP server CX Codex

SQLite MCP Sidecar — Claude Code MCP server: setup and overview

Runs alongside an existing SQLite database to grant an AI agent safe HTTP access while guarding tables against rogue queries and accidental deletions.

Open on GitHub

What SQLite MCP Sidecar does

This sidecar runs on .NET 10 as an independent background companion next to your SQLite database. It exposes eight possible tools over Streamable HTTP according to your permission flags. Results come back formatted in TOON rather than standard JSON, keeping token overhead minimal. It expects a database file that already exists and will intentionally refuse to initialize a blank one.

Its main protection targets mistakes made by an agent that already holds write privileges. Modifying records via update and delete skips raw SQL statements in favor of flat key-value filters connected by AND. Every mutation requires an explicit maxRows cap that accounts for triggers and ON DELETE CASCADE actions. Exceeding that ceiling triggers an immediate rollback. Idempotent retries rely on a required requestId key.

Mounting the storage volume inside Docker demands write permissions even under a strict schema and read configuration. Without write access to the directory, SQLite WAL mode fails when attempting to touch the -shm helper file. Scaling instances is unsafe: rate limits and deduplication memory reside strictly within a single operating process.

What it helps with

  • inspect live database structure without revealing raw table contents
  • query rows using token-efficient TOON table formatting
  • execute record updates with a mandatory boundary on affected rows
  • perform live database backups while host services continue writing

Example prompts for the agent

  • Fetch the schema for user tables and indexes from the production database
  • Query the orders table for records where status equals failed
  • Update the task row with id 54 to status done with a row limit of 1

How to install SQLite MCP Sidecar

Install

The MCP registry has no launch command for it: see the repository README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about SQLite MCP Sidecar

How do you set up SQLite MCP Sidecar for Claude Code?

Start the container using `docker run -d --name sqlite-sidecar -p 127.0.0.1:8080:8080 -v /srv/myapp/data:/data -e SQLITE_SIDECAR_DB=/data/app.db -e SQLITE_SIDECAR_TOKEN='<a long random string>' -e SQLITE_SIDECAR_PERMISSIONS=schema,read --read-only --tmpfs /tmp --cap-drop=ALL --security-opt=no-new-privileges ghcr.io/xakpc/sqlite-mcp-sidecar:latest. Next, add the endpoint /db/mcp (such as https://example.com/db/mcp) with your bearer token to your agent configuration under mcpServers`.

What does SQLite MCP Sidecar do?

It exposes an active SQLite file to MCP clients over HTTP while enforcing safety bounds. The server validates filters, halts mutations that breach row ceilings, and outputs tabular results in compact TOON syntax.

Why does a read-only setup require a writable Docker volume mount?

SQLite needs read-write permissions to handle the shared memory -shm file created by WAL mode. Restricting the container mount to read-only causes connection errors during startup.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor