SQLite (DBHub) MCP server

CommunityBytebase2,869Config last verified Jun 1, 2026

Run an agent against a SQLite database file through Bytebase DBHub, a zero-dependency, token-efficient database MCP server.

DBHub is a maintained, zero-dependency database MCP server from Bytebase that speaks a single connection string and points an agent at SQLite (as well as Postgres, MySQL, MariaDB, and SQL Server). For SQLite you pass a DSN like sqlite:///path/to/database.db and the agent can immediately explore the schema and run queries against the file, which makes it an easy way to hand a local .db or a bundled application database to a coding agent.

Its design goal is token efficiency: rather than dumping an entire schema into the model's context, the search_objects tool offers progressive disclosure of tables, columns, indexes, and procedures so the agent pulls in only the structure it needs. The execute_sql tool runs queries with transaction support and configurable safety controls, and DBHub ships guardrails including a read-only mode, row limiting, and query timeouts to keep an over-eager model from doing damage. It runs locally over stdio or as an HTTP server, launches with npx, and includes a demo mode with a bundled sample SQLite employee database so you can try it before wiring up real data.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@bytebase/dbhub",
        "--transport",
        "stdio",
        "--dsn",
        "sqlite:///path/to/database.db"
      ]
    }
  }
}
Or via CLI
bash
claude mcp add sqlite -- npx -y @bytebase/dbhub --transport stdio --dsn sqlite:///path/to/database.db

Available tools

ToolDescription
execute_sqlExecute a SQL query against the connected database with transaction support and safety controls (read-only mode, row limits, timeouts).
search_objectsSearch and explore database objects — tables, columns, indexes, and procedures — with progressive disclosure to stay token-efficient.

Required configuration

  • DSNRequired

    Database connection string. For SQLite use sqlite:///path/to/database.db. Can be passed as --dsn or via the DSN env var.

What you can do with it

Query a local SQLite file

Point DBHub at a sqlite:// DSN so an agent can inspect the schema and run SELECTs against an application or analytics .db without exporting anything.

Hand over a database read-only

Enable read-only mode with row limits and query timeouts so a coding agent can explore production-shaped data safely, then switch DSNs to target Postgres or MySQL with the same tools.

FAQ

Is it free?
Yes. DBHub is open source under the MIT license and free to run; you only need a database file or server for it to connect to.
Does it support remote/OAuth?
It runs as a local stdio server or an HTTP server you host yourself (npx @bytebase/dbhub --transport http). There is no managed OAuth endpoint; access is controlled by the DSN you provide.
Can it talk to databases other than SQLite?
Yes. DBHub is a universal gateway: the same execute_sql and search_objects tools work against Postgres, MySQL, MariaDB, and SQL Server by changing the DSN scheme.
← Browse all databases servers