MCP.so
登录

TiDB MCP Server

@l1806858547

基本信息

分类

其他

传输方式

stdio

作者

l1806858547

关于 TiDB MCP Server

TiDB MCP Server

TiDB MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "tidb-server": {
      "command": "npx",
      "args": [
        "tidb-mcp-server"
      ]
    }
  }
}

TiDB MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

点击上方按钮,在临时沙箱中运行此服务器并实时获取工具列表。

概览

What is TiDB MCP Server?

A Model Context Protocol (MCP) server that enables AI assistants to execute SELECT queries on a TiDB database through MCP tools. It uses environment variables for secure connection and is intended for developers integrating TiDB querying into MCP-compatible clients.

How to use TiDB MCP Server?

Install via Smithery, npx, or global npm. Set required environment variables (TIDB_HOST, TIDB_PORT, TIDB_USER, TIDB_PASS, TIDB_DB); optionally enable INSERT/UPDATE/DELETE by setting the respective variables to "true". Start the server with tidb-server, add it to your MCP client configuration (e.g., cline_mcp_settings.json), then call the tidb_query tool with an SQL argument.

Key features of TiDB MCP Server

  • Execute SELECT queries on TiDB via MCP tools.
  • Secure connection through environment variables.
  • Lightweight and easy to set up.
  • Optional support for INSERT, UPDATE, DELETE (disabled by default).
  • Compatible with Claude Desktop via Smithery.

Use cases of TiDB MCP Server

  • Query a TiDB database from within an AI assistant conversation.
  • Enable read-only data exploration for LLM applications.
  • Perform safe database lookups with default read-only mode.
  • Quickly prototype MCP-based integrations with TiDB.

常见问题

1

What runtime is required?

Node.js version 16 or higher, and a running TiDB instance.

2

How do I configure connection credentials?

Set the environment variables `TIDB_HOST`, `TIDB_PORT`, `TIDB_USER`, `TIDB_PASS`, and `TIDB_DB`. These are read at startup.

3

Can the server perform write operations?

By default, only SELECT queries are allowed. To enable INSERT, UPDATE, or DELETE, set the corresponding environment variable (e.g., `ALLOW_INSERT_OPERATION`) to `"true"`. These are disabled by default to prevent accidental modifications.

4

How do I integrate this server with an MCP client?

Add the server to your MCP

评论

其他 分类下的更多 MCP 服务器