mcp-libsql
Secure MCP server for libSQL databases with comprehensive tools, connection pooling, and transaction support. Built with TypeScript for Claude Desktop, Claude Code, Cursor, and other MCP clients.
claude mcp add --transport stdio xexr-mcp-libsql node dist/index.js \ --env LIBSQL_AUTH_TOKEN="your-turso-auth-token-here (optional, for Turso/credentialed databases)"
How to use
mcp-libsql is a Node.js-based MCP server that exposes libSQL database operations through the MCP protocol. It implements the six core MCP tools for database interactions: read-query, write-query, create-table, alter-table, list-tables, and describe-table. These tools enable secure SELECT, INSERT/UPDATE/DELETE with transaction support, DDL operations, and metadata inspection, all with parameterized queries and audit logging. To connect from Claude Desktop or other MCP clients, run the server via Node (for example with dist/index.js) and point the client at the server's URL or local socket as configured. Common usage includes testing with a file-based database, a Turso/remote database (with an auth token if required), or an HTTP database endpoint, then performing read/write operations and schema changes through the MCP tools.
How to install
Prerequisites:
- Node.js 20+ (as indicated by the project requirements)
- pnpm, npm, or yarn for package installation
- A libSQL database (file-based or remote)
Installation steps (global) with pnpm:
- Install the MCP server globally
pnpm install -g @xexr/mcp-libsql
- Verify installation
mcp-libsql -v
Alternatively, install from source:
git clone https://github.com/Xexr/mcp-libsql.git
cd mcp-libsql
pnpm install
pnpm build
node dist/index.js -v
Usage example after installation:
mcp-libsql --url file:///tmp/test.db
You can customize the configuration (for Claude Desktop or your environment) by pointing to the built dist/index.js or by using a global install as shown above.
Additional notes
Tips and notes:
- If you’re using Turso or credentialed databases, you may need LIBSQL_AUTH_TOKEN. Provide it via environment variable or CLI parameter as described in the README discussions.
- When configuring Claude Desktop, you can either run the global installed command or invoke the local build via node dist/index.js to ensure compatibility with your environment.
- Ensure your Node.js CLI path is accessible in your system PATH when using Claude Desktop on macOS/Linux.
- For development/testing, you can run with --dev and --log-mode console to see verbose output for debugging.
- The server supports common MCP clients; verify that the tooling version matches your MCP protocol expectations.
- If you encounter issues with Windows/WSL, use the recommended wsl.exe invocation patterns described in the README configuration examples.
Related MCP Servers
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
taskflow
A task management Model Context Protocol (MCP) server that helps AI assistants break down user requests into manageable tasks with subtasks, dependencies, and notes. Enforces a structured workflow with user approval steps.
mongo
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
web-research-assistant
MCP server for SearXNG with 13 production-ready tools for web search, package info, GitHub integration, error translation, API docs, and more
mcp-turso
MCP server for interacting with Turso-hosted LibSQL databases
postgresql
A Model Context Protocol (MCP) server that provides secure PostgreSQL database integration tools for Claude Code. Features read-only query execution, schema exploration, and performance analysis.