Skip to main content

database-mcp-libsql

PyPI CI License: MIT

MCP server giving AI clients safe, structured access to a libSQL database: a local file or a remote libSQL/Turso server. Two tools, guardrails on by default.

Quick start (Claude Desktop / Claude Code / Cursor)

{
  "mcpServers": {
    "libsql": {
      "command": "uvx",
      "args": ["database-mcp-libsql", "--dsn", "libsql://your-db.turso.io"],
      "env": { "LIBSQL_AUTH_TOKEN": "your-token" }
    }
  }
}

For a local file, use --dsn /absolute/path/to/database.db and skip the token.

Configuration

Connection

  • Flag: --dsn <file-or-libsql-url>
  • Environment: LIBSQL_URL
  • Config file: connection.dsn in --config /path/to/database-mcp.yaml

Auth token (remote servers)

Three ways, strongest first:

  • LIBSQL_AUTH_TOKEN_FILE=/run/secrets/token (file contents, never in the environment or any committed file)
  • LIBSQL_AUTH_TOKEN=...
  • In YAML: connection.password: ${LIBSQL_AUTH_TOKEN} (env expansion, never a literal)

The token is held in a non-printable type and redacted from all output.

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 PRAGMA query_only = ON. Remote servers may not honor the pragma; use a read-only Turso token for real protection. 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-libsql

Metadata

Release files for database-mcp-libsql 0.2.1

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-libsql 0.2.1
File Size Uploaded Provenance
database_mcp_libsql-0.2.1.tar.gz 4.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for database-mcp-libsql 0.2.1
File Interpreter ABI Platform
database_mcp_libsql-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / database_mcp_libsql-0.2.1.tar.gz

Download URL database_mcp_libsql-0.2.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
576914a99a9d34de8d4943de374c0a31afbcba83da73735d2ad6e8861a9931c2
BLAKE2b-256 checksum
How to use checksums
bd1cf60b0e08ac8b2736a26448f887f20349089dcc75c387a58df2bf735524bd
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_libsql-0.2.1-py3-none-any.whl

Download URL database_mcp_libsql-0.2.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23e6641611fbed642ba63784fb808552ba6f6eeeec791e4ed964eb03fb8f27d2
BLAKE2b-256 checksum
How to use checksums
6f28baeac331dfe246330d7febb79dad8f3f1321f4d296c0469ce4c3f559e586
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}

Security for database-mcp-libsql 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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