MCP server for SQLite with read-only guardrails, row caps, and statement timeouts
Project description
database-mcp-sqlite
MCP server giving AI clients safe, structured access to a SQLite database. Two tools, guardrails on by default.
Quick start (Claude Desktop / Claude Code / Cursor)
{
"mcpServers": {
"sqlite": {
"command": "uvx",
"args": ["database-mcp-sqlite", "--dsn", "/absolute/path/to/database.db"]
}
}
}
Configuration
SQLite needs one thing: the path to the database file. Three ways to give it:
Flag
--dsn /absolute/path/to/database.db, as in the quick start.
Environment variable
SQLITE_PATH=/absolute/path/to/database.db
Config file
--config /absolute/path/to/database-mcp.yaml:
connection:
dsn: /absolute/path/to/database.db
guardrails:
readOnly: true
maxRows: 1000
queryTimeoutMs: 30000
Tools
execute_sql: run a single SQL statement. Returns a summary line and compact JSON{columns, rows}.search_objects: list tables with estimated row counts, or describe one table (columns, indexes, foreign keys).
Guardrails
- Read-only by default, enforced twice: a SQL guard plus the database file
opened read-only with
PRAGMA query_only = ON. Pass--allow-writeto enable writes. - Results capped at
maxRows(default 1000,MAX_ROWS). - Statements exceeding
queryTimeoutMs(default 30000,QUERY_TIMEOUT_MS) are aborted.
Full contract: docs/tool-contract.md
mcp-name: io.github.arifulislamat/database-mcp-sqlite
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file database_mcp_sqlite-0.1.0.tar.gz.
File metadata
- Download URL: database_mcp_sqlite-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cc6342cb978a6409dc8c20d88bd441e3b19758b77a7ad16d5cf42394b913a29
|
|
| MD5 |
e5bc0506aff13af79d0acdf63a7c8a55
|
|
| BLAKE2b-256 |
4e18de21e6db2db2dde5a6b9acd50a92ed3e6fafb14fe343795beb370ff34dbe
|
File details
Details for the file database_mcp_sqlite-0.1.0-py3-none-any.whl.
File metadata
- Download URL: database_mcp_sqlite-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6af83e813799316a52684ab5fd934108c2aecf8f0910cd81336f415c423ba05c
|
|
| MD5 |
a65bb1572edb5e0d1b9f07cb5f7af5d7
|
|
| BLAKE2b-256 |
51864731e120492cc597be4d911121170625d2140072c25ed28c6b47be06905d
|