Suggest a server AI tools directory →

SQLite MCP server

Last verified: 2026-09

Query a local SQLite file.

Official reference Databases & data No API key Claude Desktop, Cursor, Windsurf, Claude Code, VS Code

What it does

Query and change a SQLite file on disk. Handy for local apps and logs. Same rule as Postgres: prefer a copy of the file if the model might write.

It sits in Databases & data: A database MCP is SQL or an API with your credentials.

Good for

  • Query a local .db sitting next to the repo.
  • Give the model a copy of production-shaped data without a network.
  • List tables and describe a schema before writing a query.
  • Prototype SQL that you later run on Postgres.

Tools

  • read_query — SELECT.
  • write_query — INSERT / UPDATE / DELETE.
  • create_table / list_tables / describe_table — Schema.

Config (Claude Desktop / Cursor / Windsurf)

Paste the JSON below. Same mcpServers shape. Replace placeholder paths and secrets. Windows paths look like C:\\Users\\you\\project, not /path/to. Host-side steps →

Claude Desktop

OSConfig file
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json (usually C:\Users\<you>\AppData\Roaming\Claude\)
Linux~/.config/Claude/claude_desktop_config.json

Cursor

ScopemacOS / LinuxWindows
This project.cursor/mcp.json in the repo root
This user~/.cursor/mcp.json %USERPROFILE%\.cursor\mcp.json

Windsurf

OSConfig file
macOS / Linux~/.codeium/windsurf/mcp_config.json
Windows%USERPROFILE%\.codeium\windsurf\mcp_config.json
{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": [
        "mcp-server-sqlite",
        "--db-path",
        "./data.db"
      ]
    }
  }
}

Windsurf remote MCP: use serverUrl instead of url if the block below is HTTP.

One-liner: uvx mcp-server-sqlite --db-path ./data.db

Secrets it wants: none — pass --db-path

Source repo →

How to get started

  1. Point --db-path at the file (or a copy).
  2. Restart and ask it to list tables.
  3. Keep write_query off your mental default until you have a backup.

Access risk

write_query and create_table can wreck the file. Lock the original and give the model a copy.

When to skip it

Skip it if the data already lives in Postgres or a cloud warehouse.

Instead: PostgreSQL, Filesystem.

Vs alternatives

ServerOfficial?Needs a secret?Best for
SQLiteYesNoQuery a local SQLite file.
PostgreSQLYesYesRun SQL against a Postgres database.
FilesystemYesNoRead and write files inside a folder you choose.

More in Databases & data

All 11 in this category →

FAQ

Can write_query wreck the file?

Yes. Lock the original and pass a copy as --db-path.

SQLite or Filesystem on the same .db?

SQLite understands SQL. Filesystem will treat it as a binary blob.

Is it safer than Postgres?

No. Safety is the copy and whether writes are on, not the engine.

Does it need a password?

No. The file is the secret. Whoever can read that path can query it.