MCP

SQLite MCP: Probe a test database read-only first, then decide whether to write

For people who want to query a local SQLite file or write an insight memo. The first try should only probe a disposable --db-path read-only; do not call write_query first.

Official source · modelcontextprotocol/server-sqlite

Install

uv --directory parent_of_servers_repo/servers/src/sqlite run mcp-server-sqlite --db-path ~/test.db

Who it's for

For people who want to run SQL on a local SQLite file, look at business data, and leave an insight memo. The evidence states: this MCP provides database interaction and business intelligence through SQLite; it can run SQL, analyze business data, and automatically generate business-insight memos.

You must provide a SQLite file pointed to by --db-path, and accept that the process will read and may even change that file. The official example is ~/test.db. Do not use a production database for the first try.

The page lives under servers-archived. The evidence does not separately state maintenance status or a client list; coverage stops at: you can run mcp-server-sqlite with uv in that directory.

First try in 3 minutes

Follow the uv main path; do not treat Docker as the main install. In the client configure:

"command": "uv",
"args": [
  "--directory",
  "parent_of_servers_repo/servers/src/sqlite",
  "run",
  "mcp-server-sqlite",
  "--db-path",
  "~/test.db"
]

Replace --directory with a real local path, and --db-path with a disposable test database.

Preconditions: uv is installed; you may create or open the test database. This accesses local files; it is not a sandbox with no local reads.

Where to configure: the client's MCP command / args.

Low-risk first call: first probe without changing tables—use “run SQL queries / analyze business data” from the identity statement to look at what is already in the test database, or only read the resource memo://insights. The evidence states there are six core tools, but that locator does not list read-only tool names and parameters. Do not call the fully expanded write_query first: it runs INSERT, UPDATE, or DELETE and returns { affected_rows: number }. Do not run append-insight first either; it changes the memo.

Success signal: after the server starts, you can get a query result on the test database, or read the current content of memo://insights. If the process will not start, check uv and the directory first; do not switch to Docker.

Use cases

Case 1: Look at business data once on the test database. Run a SQL query or analysis from the identity evidence. Read-only signatures of the six tools are not expanded in the locator, so stop at “you can query/analyze the database pointed to by --db-path”; do not invent tool names or filter parameters.

Case 2: Read the insight memo and decide whether to append. The resource memo://insights continuously aggregates insights found during analysis and auto-updates when append-insight runs. Read that resource first. Appending changes the memo; the evidence has no undo and does not write parameters. Call it only after you accept the memo being rewritten and pass a confirmation point. write_query changes table data—a different side effect from the memo; do not use it in this case.

Limits

The main path is uv run mcp-server-sqlite --db-path <file>. The Docker example is docker run --rm -i -v mcp-test:/mcp mcp/sqlite --db-path /mcp/test.db; do not treat it as the main path. write_query changes rows and has no official undo. append-insight updates memo://insights. Besides write_query and append-insight, most names and parameters of the six tools are not expanded in the locator. Local file access and writing the database are not zero-risk. The evidence does not write backups, transaction rollback, or a replacement after archival.