tursodatabase/turso
Turso Database
An in-process SQL database, compatible with SQLite.
About
Turso Database is an in-process SQL database written in Rust, compatible with SQLite.
⚠️ Warning: This software is in BETA. It may still contain bugs and unexpected behavior. Use caution with production data and ensure you have backups.
Features and Roadmap
- SQLite compatibility for SQL dialect, file formats, and the C API [see document for details]
BEGIN CONCURRENTfor improved write throughput using multi-version concurrency control (MVCC).- Change data capture (CDC) for real-time tracking of database changes.
- Multi-language support for
- Asynchronous I/O support on Linux with
io_uring - Cross-platform support for Linux, macOS, Windows and browsers (through WebAssembly)
- Vector support support including exact search and vector manipulation
- Improved schema management including extended
ALTERsupport and faster schema changes.
The database has the following experimental features:
- Encryption at rest for protecting the data locally.
- Incremental computation using DBSP for incremental view maintenance and query subscriptions.
- Full-Text-Search powered by the awesome tantivy library
- Multi-process WAL coordination via the
.tshmsidecar for cross-process WAL readers and writers.
The following features are on our current roadmap:
- Vector indexing for fast approximate vector search, similar to libSQL vector search.
Getting Started
Please see the Turso Database Manual for more information.
💻 Command Line
You can install the latest `turso` release with:
|
|
Then launch the interactive shell:
|
|
This will start the Turso interactive shell where you can execute SQL statements:
|
|
You can also build and run the latest development version with:
|
|
If you like docker, we got you covered. Simply run this in the root folder:
|
|
🦀 Rust
|
|
Example usage:
|
|
✨ JavaScript
|
|
Example usage:
|
|
🐍 Python
|
|
Example usage:
|
|
🦫 Go
|
|
Example usage:
|
|
️#️⃣ .NET
Example usage:
|
|
☕️ Java
We integrated Turso Database into JDBC. For detailed instructions on how to use Turso Database with java, please refer to the README.md under bindings/java.
🤖 MCP Server Mode
The Turso CLI includes a built-in Model Context Protocol (MCP) server that allows AI assistants to interact with your databases.
Start the MCP server with:
|
|
Configuration
Add Turso to your MCP client configuration:
|
|
Available Tools
The MCP server provides nine tools for database interaction:
open_database- Open a new databasecurrent_database- Describe the current databaselist_tables- List all tables in the databasedescribe_table- Describe the structure of a specific tableexecute_query- Execute read-only SELECT queriesinsert_data- Insert new data into tablesupdate_data- Update existing data in tablesdelete_data- Delete data from tablesschema_change- Execute schema modification statements (CREATE TABLE, ALTER TABLE, DROP TABLE)
Once connected, you can ask your AI assistant:
- “Show me all tables in the database”
- “What’s the schema for the users table?”
- “Find all posts with more than 100 upvotes”
- “Insert a new user with name ‘Alice’ and email ‘alice@example.com’”
MCP Clients
Claude Code
If you’re using Claude Code, you can easily connect to your Turso MCP server using the built-in MCP management commands:
Quick Setup
-
Add the MCP server to Claude Code:
1claude mcp add my-database -- tursodb ./path/to/your/database.db --mcp -
Restart Claude Code to activate the connection
-
Start querying your database through natural language!
Command Breakdown
|
|
my-database- Choose any name for your MCP server--- Required separator between Claude options and your commandtursodb- The Turso database CLI./path/to/your/database.db- Path to your SQLite database file--mcp- Enables MCP server mode
Example Usage
|
|
Managing MCP Servers
|
|
Claude Desktop
For Claude Desktop, add the configuration to your claude_desktop_config.json file:
|
|
Cursor
For Cursor, configure MCP in your settings:
- Open Cursor settings
- Navigate to Extensions → MCP
- Add a new server with:
- Name:
turso - Command:
/path/to/.turso/tursodb - Args:
["./path/to/your/database.db.db", "--mcp"]
- Name:
Alternatively, you can add it to your Cursor configuration file directly.
Direct JSON-RPC Usage
The MCP server runs as a single process that handles multiple JSON-RPC requests over stdin/stdout. Here’s how to interact with it directly:
Example with In-Memory Database
|
|
Example with Existing Database
|
|
Contributing
We’d love to have you contribute to Turso Database! Please check out the contribution guide to get started.
FAQ
Is Turso Database ready for production use?
Turso powers production apps today. That includes Turso Cloud, the Kin AI assistant, and Spice.ai. However, it is still under active development and for mission-critical applications, caution is advised. Independent backups are encouraged. Turso is extensively tested by a collection of tools including a native Deterministic Simulation Testing suite and Antithesis, so we are generally confident in the end result. But our bar is SQLite-level reliability, and we will still recommend caution until we are confident it meets that bar.
How is Turso Database different from Turso’s libSQL?
Turso Database is a project to build the next evolution of SQLite in Rust, with a strong open contribution focus and features like native async support, vector search, and more. The libSQL project is also an attempt to evolve SQLite in a similar direction, but through a fork rather than a rewrite.
Rewriting SQLite in Rust started as an unassuming experiment, and due to its incredible success, replaces libSQL as our intended direction. At this point, libSQL is production ready, Turso Database is not - although it is evolving rapidly. More details here.
Publications
- Pekka Enberg, Sasu Tarkoma, Jon Crowcroft Ashwin Rao (2024). Serverless Runtime / Database Co-Design With Asynchronous I/O. In EdgeSys ‘24. [PDF]
- Pekka Enberg, Sasu Tarkoma, and Ashwin Rao (2023). Towards Database and Serverless Runtime Co-Design. In CoNEXT-SW ’23. [PDF] [Slides]
- Alperen Keles, Ethan Chou, Harrison Goldstein, Leonidas Lampropoulos (2026). DIRT: Database-Integrated Random Testing. In DBTest ‘26. [PDF]
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Turso Database by you, shall be licensed as MIT, without any additional terms or conditions.
Partners
Thanks to all the partners of Turso!
Contributors
Thanks to all the contributors to Turso Database!

