Read-only by design
Every query is checked before SQLite sees it. Write keywords and non-SELECT statements are rejected with a direct error.
A focused Model Context Protocol server that lets Claude Desktop and custom agents inspect, query, and reason over local SQLite databases without write access.
The server translates an agent's tool calls into controlled SQLite operations. It handles database discovery, schema inspection, query execution, and query planning while keeping destructive SQL outside the boundary.
Every query is checked before SQLite sees it. Write keywords and non-SELECT statements are rejected with a direct error.
Scan a directory for `.db` and `.sqlite` files, or mount an explicit path using environment variables.
Agents can list tables, inspect column types, and run `EXPLAIN QUERY PLAN` before executing a final query.
From natural-language question to bounded SQLite response.
The agent begins by discovering every database currently mounted through `DB_DIR` or `DB_PATH`.
{
"method": "tools/call",
"params": {
"name": "list_databases",
"arguments": {}
}
}
Choose the route that fits your environment.
Bring the bridge into your local workspace.
git clone https://github.com/buvaneswaraneb/mcp-database-bridge.gitCreates the virtual environment, installs dependencies, and updates Claude Desktop.
chmod +x setup.sh && ./setup.shCompletely quit the app, reopen it, then verify `database-mcp` is connected.
Use PowerShell or Command Prompt.
git clone https://github.com/buvaneswaraneb/mcp-database-bridge.gitInstalls the Python environment and configures Claude Desktop.
setup.batClose the application completely before reopening it.
Register the MCP server using the Python executable from your virtual environment.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
claude mcp add database-mcp .venv/bin/python mcp/src/server.pyMount a directory of databases or a single explicit database path.
DB_DIR=/absolute/path/to/databases
DB_PATH=/absolute/path/to/example.dbEverything an agent needs to discover, inspect, and safely query local SQLite data.
Launch the FastAPI-powered browser manager for uploading and deleting database files.
{ }Return the names of all `.db` and `.sqlite` files available to the bridge.
{ }List tables inside the selected database.
{ "db_name": "sample.db" }Inspect names, types, and nullability for every column in a table.
{ "table_name": "orders" }Execute a validated `SELECT` statement and return up to 100 rows.
{ "query": "SELECT * FROM orders" }Return SQLite's execution plan to help diagnose and optimize a query.
{ "query": "SELECT * FROM orders" }Enter a query to preview how the bridge's read-only guard will classify it.
This query begins with SELECT and contains no blocked write keywords.
Confirm `DB_DIR` points to a readable directory containing `.db` or `.sqlite` files. If using `DB_PATH`, make sure it is an absolute path to an existing file.
DB_DIR=/absolute/path/to/sample_dataWhen more than one database is mounted, include `db_name` in tool arguments so the bridge can resolve the correct file.
{ "db_name": "sample.db" }Use absolute paths in `claude_desktop_config.json`, verify the virtual environment exists, and completely restart Claude Desktop after changing configuration.
claude mcp listThe guard rejects queries containing `INSERT`, `UPDATE`, `DELETE`, `DROP`, `CREATE`, `ALTER`, `TRUNCATE`, or `PRAGMA`. Keep the statement to a direct `SELECT` query.
SELECT * FROM products LIMIT 20;Start the manager directly and inspect the terminal output. Ensure port `8000` is free and all requirements are installed.
python -m uvicorn mcp.src.web:app --port 8000No matching debugging tip found.