MCP-Turso
Provides access to Turso-hosted LibSQL databases, allowing retrieval of table lists, database schemas, table schemas, and execution of SELECT queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-Turso show me the schema for the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.logIf 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.
Related MCP server: Supabase MCP Server
Server Capabilities
The server provides the following tools:
list_tablesGet a list of all the tables in the database
No input
Returns: an array of table names
get_db_schemaGet the schemas of all tables in the database
No input
Returns: an array of SQL creation statements
describe_tableView 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_databaseExecute 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.
Available Tools
4 toolsdescribe_tableC
View schema information for a specific table
Inputs: table_name (required).
get_db_schemaB
Get the schema for all tables in the database
Inputs: no named parameters.
list_tablesB
List all tables in the database
Inputs: no named parameters.
query_databaseC
Execute a SELECT query to read data from the database
Inputs: sql (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: describe_table focuses on a single table's schema, get_db_schema covers all tables' schemas, list_tables simply enumerates table names, and query_database handles data retrieval. An agent can easily differentiate these based on their specific scopes.
All tools follow a consistent verb_noun pattern (describe_table, get_db_schema, list_tables, query_database) with clear, descriptive names. The naming is uniform and predictable, making it easy for agents to understand the action and target.
With 4 tools, this server is well-scoped for database interaction, covering essential operations like schema inspection, table listing, and data querying. Each tool earns its place without feeling excessive or insufficient for the domain.
The tools provide solid coverage for read-only database operations, including schema exploration and data querying. However, there are minor gaps for a full database management scope, such as lacking write operations (e.g., insert, update, delete) or administrative functions, which agents might need to work around.
Related MCP Connectors
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseBqualityCmaintenance🗂️ 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.918MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude and other LLMs to perform database operations and invoke Edge Functions within Supabase through natural language.1,368 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with SQLite and SQL Server databases, allowing for schema inspection and SQL query execution.408MIT
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that allows Large Language Models like Claude to execute SQL queries, explore database schemas, and maintain persistent connections to SQL Server databases.-