by xexr
libSQL Database enables secure operations on libSQL and SQLite databases. Compatible with popular SQLite browser tools f
Connects to libSQL/SQLite databases and lets you execute queries, manage tables, and browse database structure through Claude and other MCP clients.
libSQL Database is a community-built MCP server published by xexr that provides AI assistants with tools and capabilities via the Model Context Protocol. libSQL Database enables secure operations on libSQL and SQLite databases. Compatible with popular SQLite browser tools f It is categorized under databases.
You can install libSQL Database in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
libSQL Database is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Enable Claude to query your database directly using natural language
Example
Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly
Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster
Generate complex reports and analytics without leaving conversation
Example
Analyze sales trends, cohort retention, user behavior patterns conversationally
Democratize data access—non-technical team members can query databases
Understand database structure, relationships, and data models
Example
'Explain the user_orders table schema and its relationships'
Onboard engineers faster, explore unfamiliar databases efficiently
Share your MCP server with the developer community
We evaluated libSQL Database against two servers with overlapping tools; this profile had the clearer scope statement.
libSQL Database is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
Strong directory entry: libSQL Database surfaces stars and publisher context so we could sanity-check maintenance before adopting.
We wired libSQL Database into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
Useful MCP listing: libSQL Database is the kind of server we cite when onboarding engineers to host + tool permissions.
libSQL Database is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
libSQL Database is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We evaluated libSQL Database against two servers with overlapping tools; this profile had the clearer scope statement.
I recommend libSQL Database for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
libSQL Database is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
showing 1-10 of 68
A Model Context Protocol (MCP) server for libSQL database operations, providing secure database access through Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients.
Runs on Node, written in TypeScript
Install:
pnpm install -g @xexr/mcp-libsql
Test locally:
mcp-libsql --url file:///tmp/test.db --log-mode console
Configure Claude Desktop with your Node.js path and database URL (see configuration examples below)
✅ Complete database management capabilities - All 6 core tools implemented and tested
✅ Comprehensive security validation - 67 security tests covering all injection vectors
✅ Extensive test coverage - 244 total tests (177 unit + 67 security) with 100% pass rate
✅ Production deployment verified - Successfully working with MCP clients
✅ Robust error handling - Connection retry, graceful degradation, and audit logging
🔐 Security details: See docs/SECURITY.md for comprehensive security features and testing.
# Use your package manager of choice, e.g. npm, pnpm, bun etc
# Install globally
pnpm install -g @xexr/mcp-libsql
mcp-libsql -v # check version
# ...or build from the repository
git clone https://github.com/Xexr/mcp-libsql.git
cd mcp-libsql
pnpm install # Install dependencies
pnpm build # Build the project
node dist/index.js -v # check version
Global installation assumed below, replace "mcp-libsql" with "node dist/index.js" if using local build
# Test with file database (default: file-only logging)
mcp-libsql --url file:///tmp/test.db
# Test with HTTP database
mcp-libsql --url http://127.0.0.1:8080
# Test with Turso database (environment variable, alternatively export the env var)
LIBSQL_AUTH_TOKEN="your-token" mcp-libsql --url "libsql://your-db.turso.io"
# Test with Turso database (CLI parameter)
mcp-libsql --url "libsql://your-db.turso.io" --auth-token "your-token"
# Development mode with console logging
mcp-libsql --dev --log-mode console --url file:///tmp/test.db
# Test with different logging modes
mcp-libsql --url --log-mode both file:///tmp/test.db
Configure the MCP server in Claude Desktop based on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"file:///Users/username/database.db"
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "node",
"args": [
"/Users/username/projects/mcp-libsql/dist/index.js",
"--url",
"file:///Users/username/database.db"
],
}
}
}
Alternative configuration for global install using nvm lts for node
{
"mcpServers": {
"mcp-libsql": {
"command": "zsh",
"args": [
"-c",
"source ~/.nvm/nvm.sh && nvm use --lts > /dev/null && mcp-libsql --url file:///Users/username/database.db",
],
}
}
}
Important: The global installation method is recommended as it handles PATH automatically.
~/.config/Claude/claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"file:///home/username/database.db"
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "node",
"args": [
"/home/username/projects/mcp-libsql/dist/index.js",
"--url",
"file:///home/username/database.db"
],
}
}
}
%APPDATA%\Claude\claude_desktop_config.json:Global install
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"mcp-libsql --url file:///home/username/database.db",
]
}
}
}
Alternative configuration for local build installation:
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"/home/username/projects/mcp-libsql/dist/index.js --url file:///home/username/database.db",
]
}
}
}
Alternative configuration for global install using nvm for node
{
"mcpServers": {
"mcp-libsql": {
"command": "wsl.exe",
"args": [
"-e",
"bash",
"-c",
"source ~/.nvm/nvm.sh && mcp-libsql --url file:///home/username/database.db",
]
}
}
}
Important: Use wsl.exe -e (not just wsl.exe) to ensure proper command handling and avoid issues with server command reception on Windows.
For Turso (and other credentialed) databases, you'll need an authentication token. There are two secure ways to provide it:
Global installation shown below, adjust accordingly for your setup
Configure Claude Desktop with environment variable (macOS/Linux example):
export LIBSQL_AUTH_TOKEN="your-turso-auth-token-here"
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://your-database.turso.io"
]
}
}
}
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://your-database.turso.io",
"--auth-token",
"your-turso-auth-token-here"
]
}
}
}
Install Turso CLI:
curl -sSfL https://get.tur.so/install.sh | bash
Login to Turso:
turso auth login
Create an auth token:
turso auth token create --name "mcp-libsql"
Get your database URL:
turso db show your-database-name --url
Create and configure database:
# Create database
turso db create my-app-db
# Get database URL
turso db show my-app-db --url
# Output: libsql://my-app-db-username.turso.io
# Create auth token
turso auth token create --name "mcp-libsql-token"
# Output: your-long-auth-token-string
Configure Claude Desktop:
export LIBSQL_AUTH_TOKEN="your-turso-auth-token-here"
{
"mcpServers": {
"mcp-libsql": {
"command": "mcp-libsql",
"args": [
"--url",
"libsql://my-app-db-username.turso.io"
]
}
}
}
Test the connection:
# Test locally first
mcp-libsql --url "libsql://my-app-db-username.turso.io" --log-mode console
file:///absolute/path/to/database.dbhttp://hostname:portlibsql://your-database.turso.iowhich node to find your Node.js installation pathcwd to ensure relative paths work correctlyfile mode prevents JSON parsing errors in MCP protocol--log-mode console for development debuggingRun data quality queries to catch anomalies and inconsistencies
Example
Find duplicate records, missing values, orphaned foreign keys automatically
Maintain data integrity with less manual SQL work
Prerequisites
Time Estimate
15-30 minutes including configuration and testing
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.
Protocols
Compatibility
✓ Use when
Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.
✗ Avoid when
Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.