Get the FREE Ultimate OpenClaw Setup Guide →

mcp-turso-cloud

🗂️ A Model Context Protocol (MCP) server that provides integration with Turso databases for LLMs. This server implements a two-level authentication system to handle both organization-level and database-level operations, making it easy to manage and query Turso databases directly from LLMs.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio spences10-mcp-turso-cloud npx -y mcp-turso-cloud \
  --env TURSO_API_TOKEN="your-turso-api-token" \
  --env TURSO_ORGANIZATION="your-organization-name" \
  --env TURSO_DEFAULT_DATABASE="optional-default-database"

How to use

The mcp-turso-cloud MCP server provides both organization-level operations for managing Turso databases and database-level operations for querying and managing data within a specific database. It authenticates first at the organization level using a Turso Platform API token, then generates database-specific tokens for per-database access. Through MCP tooling, you can list and create databases, generate tokens, list tables, run read-only and destructive SQL queries, describe table schemas, and perform vector similarity searches using SQLite vector extensions. This separation of read-only and destructive operations helps enforce safety and approval workflows when performing potentially damaging actions. To use it, configure your MCP client with the server entry and provide the required environment variables (API token, organization, and optional default database). Then call the provided MCP tools (list_databases, create_database, delete_database, generate_database_token, list_tables, execute_read_only_query, execute_query, describe_table, vector_search) as needed in your prompts or code.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Internet access to fetch the MCP server via npx

Step-by-step installation:

  1. Ensure you have Node.js and npm installed. You can verify with: node -v npm -v

  2. Install and run the MCP server via npx using the configuration example:

    • This pulls the mcp-turso-cloud package and starts it through npx, handling environment setup via the provided env vars.
  3. Alternatively, if you are integrating into your own environment, install dependencies and build if needed (per repository guidance): npm install npm run build

  4. Run the server in development mode if you prefer direct development workflow: npm run dev

  5. In your MCP client configuration, reference the server as shown in the mcp_config example (including env vars for TURSO_API_TOKEN, TURSO_ORGANIZATION, and optional TURSO_DEFAULT_DATABASE).

Additional notes

Notes and tips:

  • Be careful with destructive SQL operations. Use execute_read_only_query for safe queries, and reserve execute_query for actions that modify data, ideally with explicit approvals.
  • Ensure TURSO_API_TOKEN has the necessary permissions for your organization and databases.
  • If you forget or want to rotate tokens, rely on the generated database tokens and cache behavior described by the server.
  • The optional TURSO_DEFAULT_DATABASE can simplify prompts by providing a default context when no database is specified.
  • If using WSL or other integration environments, follow the environment-specific configuration example to start the server correctly.
  • When debugging authentication issues, verify both the organization name and the API token are correct and not expired.

Related MCP Servers

Sponsor this space

Reach thousands of developers