NM

nbbaier/mcp-turso

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

6 stars 3 forks 품질 72 트렌드 14MIT

MCP server for interacting with Turso-hosted LibSQL databases

개요

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 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. To configure the Turso MCP server with Cursor, add the following to your Cursor settings: 1. Open Cursor and go to Settings (⚙️) > Settings (JSON) 2. Add the following configuration to your settings JSON:

README

원문 README의 일부입니다. 원문 보기.

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 

Then get the database authentication token:

turso db tokens create 

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:

  1. Open Cursor and go to Settings (⚙️) > Settings (JSON)
  2. 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 /logs/mcp-turso.log, where `` 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//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//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
GitHub에서 전체 README 보기

설치

npx -y mcp-turso
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": [ "turso": { "command": "npx", "args": ["-y", "mcp-turso"], "env": { "TURSO_DATABASE_URL": "your_url", "TURSO_AUTH_TOKEN": "your_token" } } ] }