Skip to main content
Guide1 min read

SQLite MCP server: setup for Claude & Cursor (2026)

Point your AI at a local SQLite database to explore tables and run queries. Two routes — DBHub and the Python server — with read-only safety.

SQLite is the easiest database to wire into an AI client — it is just a file. An MCP server lets the model inspect tables, run queries and help analyse the data. Here are the two clean routes for Claude Desktop and Cursor.

DBHub is a universal database server; for SQLite you just pass a file DSN:

{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y", "@bytebase/dbhub",
        "--transport", "stdio",
        "--readonly",
        "--dsn", "sqlite:///Users/you/data/app.db"
      ]
    }
  }
}

Same server you would use for MySQL or Postgres — one tool to learn. See MySQL MCP setup for the same pattern.

Option B — Python SQLite server

If you prefer the dedicated Python server, run it with uvx:

{
  "mcpServers": {
    "sqlite": {
      "command": "uvx",
      "args": ["mcp-server-sqlite", "--db-path", "/Users/you/data/app.db"]
    }
  }
}

This needs Python 3.10+ and uv installed.

Restart the client after editing; see MCP config file location.

Verify

Ask: "List the tables in my SQLite database and show 5 rows from users." Real data confirms the connection.

Common problems

  • unable to open database file — wrong path, or the file does not exist. Use an absolute path; note the sqlite:/// triple slash for absolute paths in DBHub.
  • Locked database — another process holds a write lock; read-only mode avoids most of this.
  • uvx: command not found — install uv (Option B), or use Option A which only needs Node.
  • No tools in client — see Cursor MCP not working.

Going further

Keep it read-only by default — see MCP security best practices. Comparing engines? Read best MCP server for a database, or browse the databases category.

Loadout

Build your AI agent loadout

The directory of MCP servers and AI agents that actually work. Pick the right loadout for Slack, Postgres, GitHub, Figma and 20+ integrations — with install commands ready to paste into Claude Desktop, Cursor or your own stack.

© 2026 Loadout. Built on Angular 21 SSR.