Skip to main content
MCP server CX Codex

db-mcp — SQLite MCP server: what it does, how to install

An MCP server that lets your coding agent read and change a SQLite database: queries, schema, audit trail, full-text and vector search.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add db-mcp -- npx -y db-mcp
Open on GitHub

What db-mcp (SQLite MCP Server) does

db-mcp exposes a SQLite file to the agent as a set of tools: inspect schema, tables and indexes, run CRUD operations, pull statistics, work with JSON, use FTS5 and vector search. An audit log and DDL snapshots keep a record of what changed, so structural edits can be traced afterwards.

It starts through npx; WASM and better-sqlite3 builds are both available. Settings can live in a YAML or JSON file passed with --config, and some of them change at runtime without a restart. The --tool-filter flag trims which tool groups the agent sees, otherwise it gets the whole set at once. Network access comes with HTTP/SSE and OAuth 2.1.

Point it at a scratch database first. Granular access control exists, but an agent allowed to run destructive statements will run them, so the permissions you grant decide the blast radius.

What it helps with

  • inspect a SQLite schema and indexes from the chat
  • run filtered queries with aggregates instead of hand-writing SQL
  • find rows with full-text or hybrid search
  • trace which DDL changes an agent made
  • share a database over HTTP with authentication

Example prompts for the agent

  • Show the schema of the orders table and suggest indexes for frequent queries
  • Find all March orders and total them per customer
  • Switch on verbose logging without restarting the server

How to install db-mcp (SQLite MCP Server)

Platform CLI

claude mcp add db-mcp -- npx -y db-mcp

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 db-mcp (SQLite MCP Server)

How do I install db-mcp in Claude Code?

Run claude mcp add db-mcp -- npx -y db-mcp. The alternative form claude mcp add db-mcp-sqlite-mcp-server -- npx -y db-mcp does the same thing.

What does db-mcp do?

It gives an agent tools to read and modify a SQLite database: schema, queries, indexes, audit, search. It runs as a local MCP server via npx.

How do I set up db-mcp in Cursor?

Add an mcpServers entry named db-mcp-sqlite-mcp-server with command npx and args -y and db-mcp.

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