MCP-Turso
mcp-turso
TursoがホストするLibSQLデータベースへのアクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。現在、このサーバーは以下の機能を提供しています。
データベース内のテーブルのリストを取得する
データベースのスキーマの取得
テーブルのスキーマを取得する
SELECTクエリの実行
構成
クロード・デスクトップ
これをclaude_desktop_config.jsonに追加します:
{
"mcpServers": [
"turso": {
"command": "npx",
"args": ["-y", "mcp-turso"],
"env": {
"TURSO_DATABASE_URL": "your_url",
"TURSO_AUTH_TOKEN": "your_token"
}
}
]
}続行するには既存のデータベースが必要です。データベースがない場合は作成してください。Turso CLI 経由でデータベース URL を取得するには、次のコマンドを実行します。
turso db show --url <database-name>次に、データベース認証トークンを取得します。
turso db tokens create <database-name>上記のように、これらの値を構成に追加します。
カーソル付き
Cursor を使用して Turso MCP サーバーを構成するには、Cursor 設定に以下を追加します。
カーソルを開き、設定 (⚙️) > 設定 (JSON) に移動します。
設定 JSON に次の構成を追加します。
"mcpServers": {
"turso": {
"command": "npx",
"args": ["-y", "mcp-turso"],
"env": {
"TURSO_DATABASE_URL": "your_url",
"TURSO_AUTH_TOKEN": "your_token"
}
}
}前のセクションで説明したように、 your_urlとyour_tokenを Turso データベースの URL と認証トークンに置き換えます。
ログ記録
サーバーには、Claude Desktop 外部でのデバッグ用にカスタムロガーが含まれています。デフォルトでは、このロガーは<parent-dir>/logs/mcp-turso.logに書き込みます。ここで、 <parent-dir>はmcp-tursoスクリプトを含むディレクトリの親ディレクトリです。つまり、 mcp-tursoへのパスが~/foo/bin/mcp-tursoの場合、ログは~/foo/logs/mcp-turso.logに書き込まれます。上記のように NPX で実行している場合、デフォルトのログは次のようになります。
~/.npm/_npx/<npx-dir-name>/node_modules/mcp-turso/logs/mcp-turso.logカスタム パスを指定する場合は、サーバーの構成に絶対 POSIX パスを含む--logsフラグを含めることができます。
{
"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"
}
}
]
}ログファイルへのパス(デフォルトまたはカスタム)は、サーバー作成時に常にstderrに記録されます。Claudeデスクトップ版の場合、これは~/Library/Logs/Claude内のサーバーログに表示されます。
注: 現時点では、Windows 用のカスタム ログ ファイルの指定は実装されていませんが、今後実装される予定です。
Related MCP server: Supabase MCP Server
サーバー機能
サーバーは次のツールを提供します。
list_tablesデータベース内のすべてのテーブルのリストを取得する
入力なし
戻り値: テーブル名の配列
get_db_schemaデータベース内のすべてのテーブルのスキーマを取得する
入力なし
戻り値: SQL作成ステートメントの配列
describe_table特定のテーブルのスキーマ情報を表示する
入力:
table_name(文字列): 記述するテーブルの名前
戻り値: 名前と型を持つ列定義の配列
query_databaseSELECTクエリを実行してデータベースからデータを読み取ります
入力:
sql(文字列): 実行するSELECT SQLクエリ
戻り値: クエリ結果
{ columns: string[]; rows: Record<string, unknown>[]; rowCount: number; }型のオブジェクトとして返します。
藤堂
[ ] Windowsでカスタムログファイルを指定する機能を追加
[ ] クエリツールを追加する
ライセンス
MIT ライセンス - 詳細についてはLICENSEファイルを参照してください。
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.
Maintenance
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.969 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.409MIT
- 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.-