---
title: "Turso / LibSQL MCP Server Setup Guide and Schema"
slug: "turso"
category: "databases"
package: "mcp-server-turso"
transport: "stdio"
canonical: "https://mcp-codex.com/servers/turso"
source: "MCP Codex (https://mcp-codex.com)"
dateModified: "2026-09-28"
---

# Turso / LibSQL MCP Server

> Edge-native SQLite-compatible database with embedded replicas.

## Overview
Connect AI agents to Turso (LibSQL) databases: the edge-native SQLite-compatible database. Query tables, manage schemas, and leverage embedded replicas for globally distributed AI workloads.

## Quick Install
```bash
npx -y mcp-server-turso
```

## Environment Variables

| Variable | Description | Required |
| :--- | :--- | :--- |
| `TURSO_DATABASE_URL` | Turso database URL | **Yes** |
| `TURSO_AUTH_TOKEN` | Turso auth token | **Yes** |

## Client Configurations

### Claude Desktop (`claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "turso": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-turso"
      ],
      "env": {
        "TURSO_DATABASE_URL": "libsql://your-db.turso.io",
        "TURSO_AUTH_TOKEN": ""
      }
    }
  }
}
```

### Cursor (`mcp.json`)
```json
{
  "mcpServers": {
    "turso": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-turso"
      ],
      "env": {
        "TURSO_DATABASE_URL": "libsql://your-db.turso.io",
        "TURSO_AUTH_TOKEN": ""
      }
    }
  }
}
```

### OpenAI Codex CLI (`~/.codex/config.toml`)
```toml
[mcp_servers.turso]
command = "npx"
args = ["-y", "mcp-server-turso"]

[mcp_servers.turso.env]
TURSO_DATABASE_URL = "libsql://your-db.turso.io"
TURSO_AUTH_TOKEN = ""
```

## Available Tools (2)

- `query`
- `execute`

## Documentation & Links
- Canonical Web Page: https://mcp-codex.com/servers/turso
- Weekly Protocol Changelog: https://mcp-codex.com#newsletter
- GitHub Repository: https://github.com/tursodatabase/turso-mcp
- Setup Tutorial Guide: https://mcp-codex.com/articles/turso-libsql-mcp

