mcp-turso-cloud — Claude Code MCP server: what it does, setup
Connects Claude Code and other MCP clients to Turso so an agent can manage databases, run SQL, inspect schemas, and perform vector search.
claude mcp add --env TURSO_API_TOKEN=<TURSO_API_TOKEN> --env TURSO_ORGANIZATION=<TURSO_ORGANIZATION> --env TURSO_DEFAULT_DATABASE=<TURSO_DEFAULT_DATABASE> --env TOKEN_EXPIRATION=<TOKEN_EXPIRATION> --env TOKEN_PERMISSION=<TOKEN_PERMISSION> --transport stdio mcp-turso-cloud -- npx -y mcp-turso-cloudWhat mcp-turso-cloud does
mcp-turso-cloud gives an MCP client access to Turso database operations. An agent can enumerate an organization’s databases, create or remove them, issue database tokens, inspect tables, and read schema details. It also supports vector similarity queries through SQLite vector extensions.
Access is split between organization actions and database actions. Read requests use a read-only credential, while writes such as INSERT, UPDATE, DELETE, CREATE, and DROP go through the write tool. Local checks reject multiple statements, mutating PRAGMAs on the read route, and file or extension functions.
Set TURSO_API_TOKEN and TURSO_ORGANIZATION before starting; without them, the server cannot connect. TURSO_DEFAULT_DATABASE, TOKEN_EXPIRATION, and TOKEN_PERMISSION are optional environment variables for database context and generated-token settings.
What it helps with
- list databases in a Turso organization
- create or remove Turso databases
- run SELECT queries with read-only credentials
- apply SQL changes after reviewing the query
- inspect table schemas and run vector searches
Example prompts for the agent
- List the databases in my Turso organization and show their details.
- Run a read-only SELECT against
customer_dband explain the result. - Review this SQL statement for destructive changes, then run it only after I approve it.
How to install mcp-turso-cloud
Platform CLI
claude mcp add --env TURSO_API_TOKEN=<TURSO_API_TOKEN> --env TURSO_ORGANIZATION=<TURSO_ORGANIZATION> --env TURSO_DEFAULT_DATABASE=<TURSO_DEFAULT_DATABASE> --env TOKEN_EXPIRATION=<TOKEN_EXPIRATION> --env TOKEN_PERMISSION=<TOKEN_PERMISSION> --transport stdio mcp-turso-cloud -- npx -y mcp-turso-cloudReplace <…> with your own values
Platform CLI
codex mcp add mcp-turso-cloud --env TURSO_API_TOKEN=<TURSO_API_TOKEN> --env TURSO_ORGANIZATION=<TURSO_ORGANIZATION> --env TURSO_DEFAULT_DATABASE=<TURSO_DEFAULT_DATABASE> --env TOKEN_EXPIRATION=<TOKEN_EXPIRATION> --env TOKEN_PERMISSION=<TOKEN_PERMISSION> -- npx -y mcp-turso-cloudReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp-turso-cloud": {
"command": "npx",
"args": [
"-y",
"mcp-turso-cloud"
],
"env": {
"TURSO_API_TOKEN": "<TURSO_API_TOKEN>",
"TURSO_ORGANIZATION": "<TURSO_ORGANIZATION>",
"TURSO_DEFAULT_DATABASE": "<TURSO_DEFAULT_DATABASE>",
"TOKEN_EXPIRATION": "<TOKEN_EXPIRATION>",
"TOKEN_PERMISSION": "<TOKEN_PERMISSION>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp-turso-cloud": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-turso-cloud"
],
"env": {
"TURSO_API_TOKEN": "<TURSO_API_TOKEN>",
"TURSO_ORGANIZATION": "<TURSO_ORGANIZATION>",
"TURSO_DEFAULT_DATABASE": "<TURSO_DEFAULT_DATABASE>",
"TOKEN_EXPIRATION": "<TOKEN_EXPIRATION>",
"TOKEN_PERMISSION": "<TOKEN_PERMISSION>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e TURSO_API_TOKEN=<TURSO_API_TOKEN> -e TURSO_ORGANIZATION=<TURSO_ORGANIZATION> -e TURSO_DEFAULT_DATABASE=<TURSO_DEFAULT_DATABASE> -e TOKEN_EXPIRATION=<TOKEN_EXPIRATION> -e TOKEN_PERMISSION=<TOKEN_PERMISSION> mcp-turso-cloud npx -y mcp-turso-cloudReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-turso-cloud
How do I install mcp-turso-cloud in Claude Code?
Run claude mcp add mcp-turso-cloud -e TURSO_API_TOKEN=<TURSO_API_TOKEN> -e TURSO_ORGANIZATION=<TURSO_ORGANIZATION> -- npx -y mcp-turso-cloud.
What does mcp-turso-cloud do?
It exposes Turso database management, SQL execution, schema inspection, and vector search to MCP clients.
Which environment variables does mcp-turso-cloud require?
TURSO_API_TOKEN and TURSO_ORGANIZATION are required. You can also set TURSO_DEFAULT_DATABASE, TOKEN_EXPIRATION, and TOKEN_PERMISSION for optional database and token settings.