TiDB MCP Server
About
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.
Details
- Author
- l1806858547
- Downloads
- 125
- Categories
- Other
Jump to
- 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.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
TiDB MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"tidb mcp server": {
"tidb-server": {
"command": "npx",
"args": [
"tidb-mcp-server"
]
}
}
}
}
McpServers
{
"tidb-server": {
"command": "npx",
"args": [
"tidb-mcp-server"
]
}
}
TiDB MCP Server
A Model Context Protocol (MCP) server for TiDB that allows executing SELECT queries through MCP tools.
<a href="https://glama.ai/mcp/servers/@l1806858547/tidb-server">
</a>
Features
- Execute SELECT queries on TiDB - Secure connection via environment variables - Lightweight and easy to usePrerequisites
- Node.js 16+ - TiDB instanceInstallation
Installing via Smithery
To install TiDB Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @l1806858547/tidb-server --client claude
Via npx
npx tidb-mcp-server
Global installation
npm install -g tidb-mcp-server
tidb-mcp-server
Configuration
Set these environment variables before running:
```bash
export TIDB_HOST="your_tidb_host"
export TIDB_PORT="your_tidb_port"
export TIDB_USER="your_username"
export TIDB_PASS="your_password"
export TIDB_DB="your_database"
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



