Labsco
MCP SERVER

libSQL by xexr

by Xexr

Query and change a libSQL database from an assistant, with reads, writes and schema changes as separate, validated tools.

Relational SQL Databases
Summary
The read tool cannot write, and that is enforced rather than requested.

read-query rejects anything that is not a SELECT, refuses system tables, and blocks multi-statement queries and UNION-based injection — so a compromised prompt cannot turn a read into a write. Writes and DDL run inside a transaction that rolls back on error, which means a failed migration leaves the schema as it was.

What it is

A libSQL database server for MCP clients. It splits the SQL surface by intent — a tool that only runs SELECT, one that only runs INSERT, UPDATE and DELETE, and separate DDL tools — and validates each against the operations it is allowed to perform.

What you get
  • read-query — SELECT only, with parameterised values, blocked from system tables and multi-statement queries
  • write-query — INSERT, UPDATE or DELETE, wrapped in a transaction by default and rolled back on error
  • create-table — CREATE TABLE with optional IF NOT EXISTS and a transaction wrapper
  • alter-table — ADD COLUMN, RENAME TABLE and RENAME COLUMN
  • list-tables — database objects with a LIKE filter, optionally including views and indexes, as a table, list or JSON
  • describe-table — columns, types, nullability, defaults and keys, with indexes and foreign keys on request
  • Every response reports the operation, the rows affected and how long it took
Requirements

Node with the package installed globally as @xexr/mcp-libsql. The database is passed as a URL on the command line with --url, which accepts a local file path; --log-mode console is useful when testing outside a client.

Setup effort

One command plus a key — mcp-libsql --url file:///Users/username/database.db, then supply credentials