- Home
- MCP servers
- Turso
Turso
- typescript
6
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nbbaier-mcp-turso": {
"command": "npx",
"args": [
"-y",
"mcp-turso"
],
"env": {
"TURSO_AUTH_TOKEN": "your_token",
"TURSO_DATABASE_URL": "your_url"
}
}
}
}You can connect to Turso-hosted LibSQL databases through this MCP server to list tables, view schemas, and run SELECT queries. This enables you to interact with your Turso data sources directly from your MCP client without writing boilerplate code.
How to use
You use an MCP client to connect to the Turso MCP server. Once connected, you can perform the following actions: list all tables in a database, retrieve the database schema, inspect the schema of a specific table, and execute SELECT queries to read data. Use these capabilities to build data-driven tooling, dashboards, or ad‑hoc data exploration workflows.
How to install
Prerequisites: make sure you have Node.js and npm installed on your machine.
Install and run the Turso MCP server using NPX. You will provide your Turso database URL and authentication token as environment variables.
# Start the Turso MCP server using NPX
TURSO_DATABASE_URL=your_url TURSO_AUTH_TOKEN=your_token npx -y mcp-turso
If you prefer to customize logs, you can specify a logs path as shown in configuration options.
## Configuration and usage notes
Configure the Turso MCP server by setting two environment variables: TURSO\_DATABASE\_URL for your Turso database URL and TURSO\_AUTH\_TOKEN for your authentication token. These values are required for the MCP server to connect to your Turso database.
Logging: By default, the server logs to a location relative to where the mcp-turso script runs. You can customize the log path by passing a --logs option with an absolute POSIX path when you launch the server. The log path is emitted to stderr when the server starts.
## Examples of what you can do with the MCP server
- Retrieve a list of all tables in your Turso database.
- Retrieve the full database schema or the schema for an individual table.
- Execute SELECT queries to read data from tables and process results within your MCP client.
## Troubleshooting tips
If you encounter connection errors, verify that your TURSO\_DATABASE\_URL is correct and that your TURSO\_AUTH\_TOKEN has the necessary permissions for the target database.
Check logs for detailed error messages. If you’re using a custom logs path, confirm the path is accessible by the process.
## Available tools
### list\_tables
Fetches a list of all table names present in the connected Turso database.
### get\_db\_schema
Retrieves the schema definitions for all tables in the connected database as SQL creation statements.
### describe\_table
Returns the column definitions (names and types) for a specified table.
### query\_database
Executes a SELECT SQL query against the database and returns results including columns, rows, and rowCount.