# mcp-sqlite-tools

An MCP server for local SQLite database management using the built-in Node.js driver. It lets agents run queries, manage savepoints, and perform online backups.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 20
- Author: spences10
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/spences10/mcp-sqlite-tools
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-sqlite-tools

## What it does

This server isolates database calls into separate tools for reading, writing, and maintenance. The separation prevents unintended changes during data reviews. When the client invokes `execute_read_query`, SQLite authorizer rules block schema alterations or modifications automatically.

Under the hood, the server relies on the standard `node:sqlite` module rather than external drivers like `better-sqlite3`. That choice shrinks production installs to 3.6 MB compared to 31.3 MB in older setups. It handles nested savepoints, CSV imports, and online backups that preserve committed WAL data.

The runtime requirement is strict: you need Node.js 24.12 or newer. Older runtimes lack the built-in SQLite driver and fail immediately. Restricting file access is straightforward by setting `SQLITE_ALLOW_ABSOLUTE_PATHS` to `false`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-sqlite-tools -- npx -y mcp-sqlite-tools
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-sqlite-tools -- npx -y mcp-sqlite-tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-sqlite-tools": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite-tools"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-sqlite-tools": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-sqlite-tools"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-sqlite-tools npx -y mcp-sqlite-tools
```

## When to use it
- create online backups of SQLite databases with WAL support
- import and export structured data using headered CSV files
- isolate read-only queries from unintended database modifications
- manage nested transactions and savepoints during multi-step edits

## Example prompts
- Describe the schema of table `users` in `app.db` and show the first 10 rows.
- Create an online backup of `production.sqlite` into the `./backups` folder.
- Import records from `customers.csv` into the `customers` database table.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
