SQLite MCP Server

Official

Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.

Local serverstdioPythonMIT 63.0k

What is the SQLite MCP server?

SQLite is everywhere — mobile app data exports, analytics dumps, browser profiles, that .db file a colleague sent you with no documentation — and the SQLite MCP server is the quickest way to have a conversation with one. Point it at a file and your assistant can list tables, inspect schemas, run queries and, unlike its Postgres sibling, actually write: create tables, insert rows, update records.

That write access changes what it's for. Beyond answering questions about existing data, it works as a lightweight data workbench: import a CSV's worth of rows, normalise a messy column, build a summary table, then export findings. For prototyping a schema before committing to a migration, sketching it out in SQLite conversationally is genuinely faster than writing DDL by hand.

The server is Python-based (run it with uvx, no permanent install needed) and includes a small memo resource for accumulating analysis notes during a session — a nice touch when you're several queries deep into exploring a dataset and want the assistant to keep a running summary.

Two things to keep in mind. First, write access means the model can mangle your data — work on a copy of any file you care about. Second, SQLite locks at the file level, so don't point it at a database another application currently has open for writing (looking at you, browser history files). Within those bounds, it's the most frictionless database tool in the MCP ecosystem.

Common pitfalls

  • --db-path cheerfully creates an empty database when the file doesn't exist, so a typo in the path gives you a working server with zero tables rather than an error. Run list_tables first when a database looks suspiciously empty.
  • SQLite's type affinity is loose — a column declared INTEGER can happily store text. When totals come back wrong or sorting looks alphabetical, that's almost always the cause.
  • write_query executes one statement at a time with no transaction wrapping the sequence, so a multi-step cleanup can stop halfway and leave the file in a partial state.
  • The append_insight memo lives in the session rather than the database, so ask for a written summary before closing the conversation if the findings matter.

What you can do with it

Make sense of mystery .db files

App exports and data dumps become explorable in seconds — schema first, then whatever questions follow.

Lightweight data wrangling

Clean, reshape and summarise tabular data with SQL instead of a spreadsheet.

Schema prototyping

Sketch and iterate table designs conversationally before writing real migrations.

Available tools

ToolWhat it does
read_queryRun a SELECT query and return rows
write_queryRun INSERT, UPDATE or DELETE statements
create_tableCreate a new table from a CREATE TABLE statement
list_tablesList all tables in the database
describe_tableShow a table's columns and types
append_insightAdd a finding to the running analysis memo

How to install the SQLite MCP server

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"]
    }
  }
}

Requires uv (https://docs.astral.sh/uv). Work on a copy of important files — this server can write.

Configuration

Python 3.10+ with uv installed (uvx runs the server without a permanent install).

Example prompts to try

  • Open this database, list the tables, and describe what this app seems to store.
  • Find duplicate email addresses in the users table and count how many rows each has.
  • Create a monthly_totals table summarising the transactions table by month.

Frequently asked questions

Yes — unlike the read-only Postgres reference server, this one supports INSERT, UPDATE, DELETE and CREATE TABLE. Keep backups, or point it at a copy of the file while exploring.