MCP Catalogs
Home

mcp-libsql

by Xexr·20·Score 40

Secure MCP server for libSQL databases with comprehensive tools, connection pooling, and transaction support.

databasedeveloper-toolssecurity
4
Forks
1
Open issues
12 mo ago
Last commit
2d ago
Indexed

Overview

MCP libSQL is a robust Model Context Protocol server that enables secure database operations through libSQL. Built with TypeScript, it provides 6 comprehensive tools for read/write queries, table management, and schema inspection. The server includes extensive security measures with 67 security tests preventing SQL injection attacks, connection pooling with health monitoring, and transaction support with automatic rollback on errors. It's fully tested with 244 test cases covering functionality, edge cases, and security scenarios, and has been verified for production use with Claude Desktop, Claude Code, and other MCP clients.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Securely interact with libSQL/Turso databases through Claude Desktop for data analysis and manipulation
you:Build applications that need database access while maintaining security through the MCP protocol
you:Manage database schemas and perform table operations without direct SQL exposure
you:How do I handle authentication for Turso databases?
you:What SQL injection prevention features are included?

When to choose this

Choose this server when working with libSQL or Turso databases and need secure, production-ready database access through MCP protocol.

When NOT to choose this

Don't choose this if you need support for database systems other than libSQL, or if you require read/write capabilities beyond what libSQL provides.

Tools this server exposes

6 tools extracted from the README
  • read-query

    Execute SELECT queries with security validation

  • write-query

    INSERT/UPDATE/DELETE with transaction support

  • create-table

    CREATE TABLE with DDL security

  • alter-table

    Modify table structure (ADD/RENAME/DROP)

  • list-tables

    Browse database metadata and objects

  • describe-table

    Inspect table schema and structure

Comparable tools

postgres-mcpmysql-mcpsqlite-mcpdatabase-shell

Installation

Installation

# Install globally
pnpm install -g @xexr/mcp-libsql

Claude Desktop Configuration

Create a configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-libsql": {
      "command": "mcp-libsql",
      "args": [
        "--url",
        "file:///Users/username/database.db"
      ]
    }
  }
}

For Turso databases with authentication:

export LIBSQL_AUTH_TOKEN="your-turso-auth-token-here"
{
  "mcpServers": {
    "mcp-libsql": {
      "command": "mcp-libsql",
      "args": [
        "--url",
        "libsql://your-database.turso.io"
      ]
    }
  }
}

FAQ

How do I handle authentication for Turso databases?
You can either use environment variables (recommended) or CLI parameters. For environment variables, export LIBSQL_AUTH_TOKEN with your token. For CLI parameters, add --auth-token to your command in Claude Desktop configuration.
What SQL injection prevention features are included?
The server includes multi-layer SQL injection prevention with comprehensive security validation, implementing 67 security tests covering all injection vectors. It uses parameterized queries and input validation to ensure safe database operations.

Compare mcp-libsql with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.