Skip to content
MCP server

Database MCP Libsql

Read-only-by-default MCP server for local or remote libSQL and Turso databases

Runs locally

Database MCP Libsql is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
What it can do
Can change data (1 tool)
Version
0.5.0

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add database-mcp-libsql --env LIBSQL_URL='<LIBSQL_URL>' --env LIBSQL_AUTH_TOKEN='<LIBSQL_AUTH_TOKEN>' -- npx -y @database-mcp/libsql

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "database-mcp-libsql": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/libsql"
      ],
      "env": {
        "LIBSQL_URL": "<LIBSQL_URL>",
        "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "database-mcp-libsql": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/libsql"
      ],
      "env": {
        "LIBSQL_URL": "<LIBSQL_URL>",
        "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "database-mcp-libsql": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/libsql"
      ],
      "env": {
        "LIBSQL_URL": "<LIBSQL_URL>",
        "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "database-mcp-libsql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/libsql"
      ],
      "env": {
        "LIBSQL_URL": "<LIBSQL_URL>",
        "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add database-mcp-libsql --env LIBSQL_URL='<LIBSQL_URL>' --env LIBSQL_AUTH_TOKEN='<LIBSQL_AUTH_TOKEN>' -- npx -y @database-mcp/libsql

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.database-mcp-libsql]
command = "npx"
args = ["-y", "@database-mcp/libsql"]
env = { LIBSQL_URL = "<LIBSQL_URL>", LIBSQL_AUTH_TOKEN = "<LIBSQL_AUTH_TOKEN>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "database-mcp-libsql": {
      "command": "npx",
      "args": [
        "-y",
        "@database-mcp/libsql"
      ],
      "env": {
        "LIBSQL_URL": "<LIBSQL_URL>",
        "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e LIBSQL_URL='<LIBSQL_URL>' -e LIBSQL_AUTH_TOKEN='<LIBSQL_AUTH_TOKEN>' database-mcp-libsql npx -- -y @database-mcp/libsql

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "database-mcp-libsql": {
          "command": "npx",
          "args": [
            "-y",
            "@database-mcp/libsql"
          ],
          "env": {
            "LIBSQL_URL": "<LIBSQL_URL>",
            "LIBSQL_AUTH_TOKEN": "<LIBSQL_AUTH_TOKEN>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • LIBSQL_URLDatabase URL (file path or libsql://... remote)Required
  • LIBSQL_AUTH_TOKENAuth token for remote libSQL/Turso databases
  • LIBSQL_URLDatabase URL (file path or libsql://... remote)Required
  • LIBSQL_AUTH_TOKENAuth token for remote libSQL/Turso databases
  • LIBSQL_URLDatabase URL (file path or libsql://... remote)Required
  • LIBSQL_AUTH_TOKENAuth token for remote libSQL/Turso databases

About Database MCP Libsql

The libSQL build of a five-engine family points at either a local database file or a libsql:// URL for a remote Turso database. You set LIBSQL_URL at launch, plus LIBSQL_AUTH_TOKEN for remote databases; credentials are never accepted through a chat tool call.

It exposes just two tools. search_objects reveals the schema step by step: no arguments lists tables, and a table name returns columns, indexes and foreign keys. execute_sql runs statements with guardrails on: a conservative SQL guard plus a session-level read-only setting, a default cap of 1000 rows and a 30-second statement timeout.

The registry lists the same server as an npm package (@database-mcp/libsql), a PyPI package and a Rust crate, all MIT-licensed and tested against one shared conformance suite.

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 2 tools changes data.

From the server's own tool labels and tool names; not verified by us.

execute_sqlName suggests: changes
Run SQL against the database, read-only by default.
search_objectsName suggests: reads
List tables, or show columns, indexes and foreign keys for a table.

What it does

Local or remote
Connects to a database file or a libsql:// Turso URL.
Two-tool surface
Keeps model context small with execute_sql and search_objects only.
Two-layer read-only
Combines a SQL guard with a read-only database session.
Row and time limits
Caps results at 1000 rows and statements at 30 seconds by default.
Three install routes
Available through npm, PyPI and cargo.
Secrets kept out of logs
Passwords use secret types and DSNs are sanitized before logging.

Good for

  • Let an assistant explore a Turso database safely
  • Inspect a local libSQL file's schema
  • Answer ad hoc data questions with read-only SQL
  • Prototype queries before writing application code

Pricing

Open source

MIT licensed

Database MCP Libsql FAQ

How do I connect to Turso?

Set LIBSQL_URL to the libsql:// address and LIBSQL_AUTH_TOKEN to your token.

Can Database MCP Libsql write to my database?

Not by default; read-only mode is on unless you change it.

Which runtimes are supported?

Node via npm, Python via uvx and a native Rust binary via cargo.

What licence is Database MCP Libsql?

MIT.

Is Database MCP Libsql free?

Yes. Database MCP Libsql is open source, so you can use and self-host it for free.

How do I add Database MCP Libsql to Claude Code?

Run this command in your terminal: claude mcp add database-mcp-libsql --env LIBSQL_URL='<LIBSQL_URL>' --env LIBSQL_AUTH_TOKEN='<LIBSQL_AUTH_TOKEN>' -- npx -y @database-mcp/libsql

What are the best alternatives to Database MCP Libsql?

The closest alternatives to Database MCP Libsql are Midplane, Datatomcp, Gulliver, GaussDB Read-Only MCP and Zektor.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers