# SQLite Remote

MCP server for remote SQLite databases via Turso/libSQL.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add node2flow/sqlite-remote

# Browse available tools
npx -y @smithery/cli@latest tool list node2flow/sqlite-remote

# Get full schema for a tool
npx -y @smithery/cli@latest tool get node2flow/sqlite-remote sqlite_query

# Call a tool
npx -y @smithery/cli@latest tool call node2flow/sqlite-remote sqlite_query '{}'
```

## Direct MCP Connection

Endpoint: `https://sqlite-remote--node2flow.run.tools`

**Required config:**
- `SQLITE_DB_URL` (query) — Turso/libSQL database URL (e.g. libsql://db-name.turso.io)

**Optional config:**
- `SQLITE_AUTH_TOKEN` (query) — Auth token for Turso (required for
    authenticated databases)

## Tools (15)

- `sqlite_query` — Execute a SELECT query on the SQLite database and return rows as a JSON array. Use this for reading data — supports any…
- `sqlite_execute` — Execute a write statement (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP) on the SQLite database. Returns the number of r…
- `sqlite_run_script` — Execute multiple SQL statements in a single transaction. All statements succeed or all fail (atomic). Separate statemen…
- `sqlite_list_tables` — List all tables and views in the database with their row counts. Use this as the first step to explore an unfamiliar da…
- `sqlite_describe_table` — Get the column schema of a table — column names, data types, NOT NULL constraints, default values, and primary key flag…
- `sqlite_list_indexes` — List all indexes on a table — index name, uniqueness, origin (manual or auto-created), and whether it is a partial inde…
- `sqlite_list_foreign_keys` — List foreign key constraints on a table — referenced table, local and remote columns, ON UPDATE and ON DELETE actions.
- `sqlite_create_table` — Create a new table with column definitions. Each column has a name, type, and optional constraints (PRIMARY KEY, NOT NU…
- `sqlite_alter_table` — Alter an existing table — add a new column, rename a column, or rename the table. SQLite does not support dropping colu…
- `sqlite_drop_table` — Drop (delete) a table and all its data permanently. This action is irreversible. Use ifExists to avoid errors if the ta…
- `sqlite_create_index` — Create an index on one or more columns to speed up queries. Optionally create a UNIQUE index to enforce uniqueness. Ind…
- `sqlite_drop_index` — Drop (delete) an index by name. Does not affect the table data, only removes the index. Use ifExists to avoid errors if…
- `sqlite_get_info` — Get database metadata — file path, file size, table count, page count, page size, journal mode, WAL status, encoding, a…
- `sqlite_vacuum` — Optimize and compact the database file by rebuilding it. Reclaims space from deleted rows and defragments the file. Ret…
- `sqlite_integrity_check` — Run PRAGMA integrity_check to verify the database is not corrupted. Returns "ok" if the database is healthy, or a list …

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get node2flow/sqlite-remote <tool-name>
```

## Resources

- `sqlite://server-info` — Connection status and available tools for this SQLite MCP server

## Prompts (2)

- `explore-database` — Guide for exploring and querying a SQLite database
- `manage-schema` — Guide for managing SQLite tables, columns, and indexes

---

License: MIT
