Provides access to Turso-hosted LibSQL databases, allowing retrieval of table lists, database schemas, table schemas, and execution of SELECT queries.
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
:
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:
Then get the database authentication token:
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:
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:
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:
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.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that provides Claude access to Turso-hosted LibSQL databases, enabling database table listing, schema retrieval, and SELECT query execution.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA secure Model Context Protocol server that allows Claude to execute read-only SQL queries against a PostgreSQL database, enabling natural language interaction with database data.Last updated -1
- -securityAlicense-qualityA 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.Last updated -417186MIT License
- -securityFlicense-qualityA 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.Last updated -
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude to access and interact with Oracle databases through natural language queries.Last updated -3MIT License