
mcp-libsql
MCP server giving AI clients safe SQL access to libSQL and Turso databases
The repository was last updated 42 days ago and is published under MIT.
mcp-libsql is an open-source MCP server for databases. It is available on CLI, macOS, Linux, Windows and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, macOS, Linux
- What it can do
- Can change data (2 tools)
- GitHub stars
- 21
- Last commit
- Language
- TypeScript
Similar MCP servers
About mcp-libsql
Connects MCP-compatible assistants such as Claude Desktop, Claude Code and Cursor to libSQL databases, whether a local file, an HTTP endpoint or a hosted Turso instance. The assistant gets six tools for querying, writing, creating and altering tables, and inspecting schema, so it can work with live data without direct shell or driver access.
Each SQL statement passes through several validation layers before it reaches the database, and operations are logged to a file, the console or both. Write operations support transactions that roll back on error, and connections use pooling with health checks and retry logic. Query results are rendered as aligned tables with NULL handling and timing information.
The package is aimed at developers who want an assistant to explore, prototype against or maintain a small SQLite-compatible or Turso database. It runs on Node.js 20 or later and is installed globally through pnpm or npm.
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 6 tools change data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- read-queryName suggests: reads
- Execute SELECT queries with security validation
- write-queryName suggests: changes
- INSERT, UPDATE and DELETE operations with transaction support
- create-tableName suggests: changes
- CREATE TABLE with DDL security
- alter-table
- Modify table structure by adding, renaming or dropping columns
- list-tablesName suggests: reads
- Browse database metadata and objects
- describe-tableName suggests: reads
- Inspect table schema and structure
What it does
- Six database tools
- Provides read and write queries, table creation and alteration, metadata listing and schema inspection.
- Multi-layer SQL validation
- Checks statements against several injection safeguards before execution, backed by a documented security test suite.
- Transactional writes
- Wraps write operations in transactions that roll back automatically when an error occurs.
- Connection pooling and retries
- Manages database connections with health monitoring and automatic retry on failure.
- Flexible database targets
- Works with local files, HTTP endpoints and Turso cloud databases, with the auth token read from an environment variable or flag.
- Configurable audit logging
- Writes logs to file, console, both, or none, with a default that keeps the MCP stdio channel clean.
Good for
- Letting an AI assistant query and explore a local SQLite-compatible database during development
- Prototyping schema changes on a Turso database through conversation
- Inspecting table structures and metadata before writing application code
- Running parameterised write operations with rollback protection from an MCP client
Pricing
Open source
Free and MIT licensed, self-installed via npm or pnpm.
mcp-libsql FAQ
Which Node.js version is required?
Node.js 20 or later is required, and the README notes that older Node versions in Claude Desktop can cause syntax errors.
How do I supply a Turso auth token?
Set the LIBSQL_AUTH_TOKEN environment variable, which the README recommends over passing the token as a command-line flag.
Which MCP clients are supported?
The README mentions Claude Desktop, Claude Code and Cursor, along with other MCP-compatible clients.
Does mcp-libsql work on Windows?
Windows is supported through Node.js or WSL2, and the README includes a separate configuration for WSL2.
Is mcp-libsql free?
Yes. mcp-libsql is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-libsql?
The closest alternatives to mcp-libsql are Database MCP Libsql, mcp-sqlite, mysql_mcp_server, MCP Turso Cloud and MCP Sqlite Tools.
Where this comes from
- Description: written from the project's README.

