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.
Option A — DBHub (recommended, no Python)
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 thesqlite:///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— installuv(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.