- Home
- MCP servers
- Turso
Turso
- typescript
14
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": {
"spences10-mcp-turso": {
"command": "npx",
"args": [
"-y",
"mcp-turso-cloud"
],
"env": {
"TURSO_API_TOKEN": "your-turso-api-token",
"TOKEN_EXPIRATION": "7d",
"TOKEN_PERMISSION": "full-access",
"TURSO_ORGANIZATION": "your-organization-name",
"TURSO_DEFAULT_DATABASE": "optional-default-database"
}
}
}
}You can run a Model Context Protocol (MCP) server that integrates Turso databases with your LLM workflows. It supports organization-level and database-level operations, token-based authentication, and safe separation between read-only and destructive SQL queries, enabling you to manage databases and run queries directly from your MCP-enabled clients.
How to use
Connect your MCP client to the Turso Cloud MCP server to manage databases and run queries from your LLM workflows. You can perform organization-level operations such as listing, creating, and deleting databases, and you can generate tokens for specific databases. At the database level, you can list tables, execute read-only queries (SELECT and PRAGMA), run potentially destructive queries (INSERT, UPDATE, DELETE, etc.), describe table schemas, and perform vector searches using SQLite vector extensions. Use read-only queries when you only need to fetch data, and reserve destructive queries for actions that require explicit approval.
How to install
Prerequisites: ensure you have Node.js and npm installed on your system. You will also need access to Turso Platform API tokens and your Turso organization name.
Choose one of the supported startup methods shown below and adapt the environment variables to your setup.
{
"mcpServers": {
"mcp-turso-cloud": {
"command": "npx",
"args": ["-y", "mcp-turso-cloud"],
"env": {
"TURSO_API_TOKEN": "your-turso-api-token",
"TURSO_ORGANIZATION": "your-organization-name",
"TURSO_DEFAULT_DATABASE": "optional-default-database"
}
}
}
}
```"}]},{
Or, for environments using WSL in Claude Desktop, start the server via WSL with environment variables set in the shell.
{
"mcpServers": {
"mcp-turso-cloud": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"TURSO_API_TOKEN=your-token TURSO_ORGANIZATION=your-org node /path/to/mcp-turso-cloud/dist/index.js"
]
}
}
}
```"}]},{
Additional configuration and security notes
Environment variables you provide control access to Turso resources. The server uses a two-level authentication model: organization-level authentication with a Turso Platform API token and database-level authentication with database-specific tokens generated from the organization token. Tokens are cached for performance and rotated as needed.
Important: always review SQL queries before approving destructive operations. Read-only queries (SELECT, PRAGMA) are safe for auto-approval in many contexts, but destructive actions (INSERT, UPDATE, DELETE, CREATE, DROP) require explicit approval to prevent unintended data changes.
Required environment variables include: TURSO_API_TOKEN, TURSO_ORGANIZATION. Optional defaults can be overridden with TURSO_DEFAULT_DATABASE, TOKEN_EXPIRATION, and TOKEN_PERMISSION.
Troubleshooting
Authentication issues: verify your Turso API token is valid and has access to the organization, confirm the organization name is correct, and check the token’s expiration.
Database connection issues: confirm the database exists in your organization, ensure the API token has access to that database, and verify the database name used in requests.
Examples of supported actions
Organization-level actions include listing databases, creating new databases with optional group and regions, deleting databases, and generating tokens for specific databases.
Database-level actions include listing tables in a database, running read-only queries, executing non-read-only queries, describing table schemas, and performing vector searches on specialized columns.
Development and testing
If you are developing locally, you can install dependencies, build the project, and run it in development mode with the following commands.
npm install
npm run build
npm run dev
```"}]},{
API overview (conceptual)
The server exposes tools for organization and database management as described in the actions above. Practical usage involves authenticating with your Turso API token, selecting the target database, and issuing the desired SQL or management commands through your MCP client.
Notes
This MCP server is designed to strictly separate read-only from destructive SQL operations to support safer automation and approval workflows. Always confirm the intent and impact of a destructive query before granting execution.
Available tools
list_databases
Lists all databases in your Turso organization.
create_database
Creates a new database in your organization.
delete_database
Deletes a database from your organization.
generate_database_token
Generates a new token for a specific database.
list_tables
Lists all tables in a database.
execute_read_only_query
Executes a read-only SQL query against a database (SELECT or PRAGMA).
execute_query
Executes a potentially destructive SQL query against a database (INSERT, UPDATE, DELETE, CREATE, etc.).
describe_table
Gets schema information for a table.
vector_search
Performs vector similarity search using SQLite vector extensions.