Skip to main content

database-mcp-sqlite

PyPI CI License: MIT

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-write to 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

Metadata

Release files for database-mcp-sqlite 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for database-mcp-sqlite 0.2.0
File Size Uploaded
database_mcp_sqlite-0.2.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for database-mcp-sqlite 0.2.0
File Interpreter ABI Platform
database_mcp_sqlite-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / database_mcp_sqlite-0.2.0.tar.gz

Download URL database_mcp_sqlite-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b84a5044b7524d0da4a2176fedab2a1523826712ff64432cea53e3c55b7a73d4
BLAKE2b-256 checksum
How to use checksums
26635b7587022c5afbb6bf647f7698ea1138f6f3ae0fbd34f312dcb4c18705db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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}

Release files / database_mcp_sqlite-0.2.0-py3-none-any.whl

Download URL database_mcp_sqlite-0.2.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a1901f9dfdae1fa5a14f69dba18409ae14105d7eda1f93c4e956b53f4f3f500
BLAKE2b-256 checksum
How to use checksums
1908d51b1b19e8e9af279b8924f04ae379b3735cb43648c9dbf47f58e157f67b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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}

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page