
Turso
Connects Claude to Turso-hosted LibSQL databases for querying cloud-based SQLite databases. Execute SQL queries and explore database schemas directly from your AI assistant.
Connects to Turso-hosted LibSQL databases, enabling direct SQL query execution against cloud-based SQLite databases for data analysis, content management, and application development workflows.
What it does
- Execute SELECT queries on LibSQL databases
- Retrieve database table listings
- View complete database schemas
- Inspect individual table schemas
Best for
About Turso
Turso is a community-built MCP server published by nbbaier that provides AI assistants with tools and capabilities via the Model Context Protocol. Connect Turso to cloud-based SQLite via LibSQL for SQL data analytics and application development, simplifying content m It is categorized under databases.
How to install
You can install Turso in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Turso is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
mcp-turso
A Model Context Protocol (MCP) server that provides access to the Turso-hosted LibSQL databases. Currently, the server provides the following functionality:
- Retrieving a list of tables in a database
- Retrieving a database's schema
- Retrieving the schema of a table
- Performing SELECT queries
Configuration
With Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": [
"turso": {
"command": "npx",
"args": ["-y", "mcp-turso"],
"env": {
"TURSO_DATABASE_URL": "your_url",
"TURSO_AUTH_TOKEN": "your_token"
}
}
]
}
You will need an existing database to continue. If you don't have one, create one. To get the database URL via the Turso CLI, run:
turso db show --url <database-name>
Then get the database authentication token:
turso db tokens create <database-name>
Add those values to your configuration as shown above.
With Cursor
To configure the Turso MCP server with Cursor, add the following to your Cursor settings:
- Open Cursor and go to Settings (⚙️) > Settings (JSON)
- Add the following configuration to your settings JSON:
"mcpServers": {
"turso": {
"command": "npx",
"args": ["-y", "mcp-turso"],
"env": {
"TURSO_DATABASE_URL": "your_url",
"TURSO_AUTH_TOKEN": "your_token"
}
}
}
Replace your_url and your_token with your Turso database URL and authentication token as described in the previous section.
Logging
The server includes a custom logger for debugging outside of Claude Desktop. By default, this logger writes to <parent-dir>/logs/mcp-turso.log, where <parent-dir> is the parent directory of directory containing the mcp-turso script. In other words, if the path to mcp-turso is ~/foo/bin/mcp-turso, the logs will be at ~/foo/logs/mcp-turso.log. If running with NPX as above, the default logs will be:
~/.npm/_npx/<npx-dir-name>/node_modules/mcp-turso/logs/mcp-turso.log
If you would like to specify a custom path, you can include a --logs flag with an absolute posix path in the server's configuration:
{
"mcpServers": [
"turso": {
"command": "npx",
"args": ["-y", "mcp-turso", "--logs", "/Users/<username>/path/to/dir/mcp-logs.log"],
"env": {
"TURSO_DATABASE_URL": "your_url",
"TURSO_AUTH_TOKEN": "your_token"
}
}
]
}
The path to the log file (default or custom) is always logged to stderr when the server is created. For Claude desktop, this will show up in your server logs in ~/Library/Logs/Claude.
Note: Right now, I haven't implemented specifying a custom logging file for Windows, but this is coming.
Server Capabilities
The server provides the following tools:
list_tables- Get a list of all the tables in the database
- No input
- Returns: an array of table names
get_db_schema- Get the schemas of all tables in the database
- No input
- Returns: an array of SQL creation statements
describe_table- View schema information for a specific table
- Input:
table_name(string): Name of table to describe
- Returns: Array of column definitions with names and types
query_database- Execute a SELECT query to read data from the database
- Input:
sql(string): The SELECT SQL query to execute
- Returns: Query results as an object of type
{ columns: string[]; rows: Record<string, unknown>[]; rowCount: number; }
Todo
- Add the ability to specify a custom log file on windows
- Add more query tools
License
MIT License - see the LICENSE file for details.
Alternatives
Related Skills
Browse all skillsConduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).
Comprehensive guide for PostgreSQL psql - the interactive terminal client for PostgreSQL. Use when connecting to PostgreSQL databases, executing queries, managing databases/tables, configuring connection options, formatting output, writing scripts, managing transactions, and using advanced psql features for database administration and development.
Notion workspace integration. Use when user wants to read/write Notion pages, search databases, create tasks, or sync content with Notion.
Transforms conversations and discussions into structured documentation pages in Notion. Captures insights, decisions, and knowledge from chat context, formats appropriately, and saves to wikis or databases with proper organization and linking for easy discovery.
Autonomous biomedical AI agent framework for executing complex research tasks across genomics, drug discovery, molecular biology, and clinical analysis. Use this skill when conducting multi-step biomedical research including CRISPR screening design, single-cell RNA-seq analysis, ADMET prediction, GWAS interpretation, rare disease diagnosis, or lab protocol optimization. Leverages LLM reasoning with code execution and integrated biomedical databases.
This skill should be used when the user requests to generate, create, or add Row-Level Security (RLS) policies for Supabase databases in multi-tenant or role-based applications. It generates comprehensive RLS policies using auth.uid(), auth.jwt() claims, and role-based access patterns. Trigger terms include RLS, row level security, supabase security, generate policies, auth policies, multi-tenant security, role-based access, database security policies, supabase permissions, tenant isolation.