TiDB MCP Server
@l1806858547
About TiDB MCP Server
TiDB MCP Server
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"tidb-server": {
"command": "npx",
"args": [
"tidb-mcp-server"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
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.
FAQ from TiDB MCP Server
What runtime is required?
Node.js version 16 or higher, and a running TiDB instance.
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.
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.
How do I integrate this server with an MCP client?
Add the server to your MCP
Frequently asked questions
What runtime is required?
Node.js version 16 or higher, and a running TiDB instance.
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.
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.
How do I integrate this server with an MCP client?
Add the server to your MCP
Basic information
More Other MCP servers
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

Glasswarp
GlasswarpSee and control a real Windows PC you own — from any MCP client, locally or remotely. Observe (UIA + screenshots), click/type/drag/scroll, launch apps, owner Live View. BYOH: your machine, your key.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
ICSS
chokcoco不止于 CSS
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Comments