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

Built distribution (wheel)

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

Total release size: 10.2 kB

Release files / database_mcp_libsql-0.2.0.tar.gz

Download URL database_mcp_libsql-0.2.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4d0f386d41f565e8bd2948c0a69022c32e8ac387a3b027158ac0d60e86db9c84
BLAKE2b-256 checksum
How to use checksums
c310107b14f6afe3fd46ecfcf258487875665fbf32338f9808482b4b09c29f1a
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.0-py3-none-any.whl

Download URL database_mcp_libsql-0.2.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
117f3b334c748ec0c7b52aafb84443f5417bdf50d3516ec48bfc48302c2a97e8
BLAKE2b-256 checksum
How to use checksums
468475d885d4d2a8f7f8a56154134442502e32eea23a1b158635fc6f9ea69259
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.0

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