MCP cover image
See in Github
2025-04-13

MCP-Server für die Interaktion mit Turso-Hosted-LIBSQL-Datenbanken

2

Github Watches

0

Github Forks

4

Github Stars

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:

  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 <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.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • Mintplex-Labs
  • Die All-in-One-Desktop & Docker-AI-Anwendung mit integriertem Lappen, AI-Agenten, No-Code-Agent Builder, MCP-Kompatibilität und vielem mehr.

  • modelcontextprotocol
  • Modellkontext -Protokollserver

  • n8n-io
  • Fair-Code-Workflow-Automatisierungsplattform mit nativen KI-Funktionen. Kombinieren Sie visuelles Gebäude mit benutzerdefiniertem Code, SelbstHost oder Cloud, 400+ Integrationen.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • wong2
  • Eine kuratierte Liste von Servern des Modellkontextprotokolls (MCP)

    Reviews

    1 (1)
    Avatar
    user_56lFyW2j
    2025-04-16

    I've been using mcp-turso by nbbaier for a while now and it's fantastic! It seamlessly integrates with my workflow and provides exceptional performance. The straightforward setup and thorough documentation on GitHub make it a breeze to use. Highly recommend checking it out!