MCP-Turso
mcp-turso
模型上下文协议 (MCP) 服务器,提供对 Turso 托管的 LibSQL 数据库的访问。目前,该服务器提供以下功能:
检索数据库中的表列表
检索数据库的架构
检索表的架构
执行 SELECT 查询
配置
使用 Claude Desktop
将其添加到您的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 设置中:
打开 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_database执行 SELECT 查询以从数据库读取数据
输入:
sql(字符串):要执行的 SELECT SQL 查询
返回:查询结果为类型对象
{ columns: string[]; rows: Record<string, unknown>[]; rowCount: number; }
待办事项
[ ] 添加在 Windows 上指定自定义日志文件的功能
[ ] 添加更多查询工具
执照
MIT 许可证 - 有关详细信息,请参阅LICENSE文件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.910118MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables Claude and other LLMs to perform database operations and invoke Edge Functions within Supabase through natural language.2,3824MIT
- AlicenseNot gradedqualityFmaintenanceA 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.853379MIT
- 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.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nbbaier/mcp-turso'
If you have feedback or need assistance with the MCP directory API, please join our Discord server