TiDB (uvx) MCP Server
CommunityContributed by PingCAP
Connect to a TiDB or TiDB Cloud database. List databases and tables, run read-only queries, execute data-modifying SQL, and manage database users.
About the TiDB (uvx) MCP Server
The TiDB (uvx) MCP server is a local (stdio) Model Context Protocol server available in the McpMux registry. Connect to a TiDB or TiDB Cloud database. List databases and tables, run read-only queries, execute data-modifying SQL, and manage database users. This is a community-contributed MCP server by PingCAP.
Install the TiDB (uvx) MCP server with one click using McpMux. It works with Cursor, Claude Desktop, Claude Code, VS Code, ChatGPT, Windsurf, JetBrains, and any MCP-compatible AI client. This server requires an API key — McpMux securely stores your credentials with AES-256-GCM encryption.
Transport Configuration
{
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"pytidb[mcp]",
"tidb-mcp-server"
],
"env": {
"TIDB_HOST": "${input:TIDB_HOST}",
"TIDB_PORT": "${input:TIDB_PORT}",
"TIDB_USERNAME": "${input:TIDB_USERNAME}",
"TIDB_PASSWORD": "${input:TIDB_PASSWORD}",
"TIDB_DATABASE": "${input:TIDB_DATABASE}"
},
"metadata": {
"inputs": [
{
"id": "TIDB_HOST",
"label": "TiDB Host",
"description": "Hostname of your TiDB server. For TiDB Cloud, use the gateway host shown in the connection dialog.",
"type": "text",
"required": true,
"secret": false,
"placeholder": "gateway01.xxx.prod.aws.tidbcloud.com"
},
{
"id": "TIDB_PORT",
"label": "TiDB Port",
"description": "Port of your TiDB server. Defaults to 4000.",
"type": "number",
"required": false,
"secret": false,
"default": "4000",
"placeholder": "4000"
},
{
"id": "TIDB_USERNAME",
"label": "TiDB Username",
"description": "Database username. For TiDB Cloud this looks like '<prefix>.root'.",
"type": "text",
"required": true,
"secret": false,
"placeholder": "xxxxxxxx.root"
},
{
"id": "TIDB_PASSWORD",
"label": "TiDB Password",
"description": "Password for the TiDB user.",
"type": "text",
"required": true,
"secret": true,
"placeholder": "********************"
},
{
"id": "TIDB_DATABASE",
"label": "TiDB Database",
"description": "Default database to connect to. Defaults to 'test'.",
"type": "text",
"required": true,
"secret": false,
"default": "test",
"placeholder": "test"
}
]
}
}Categories
Tags
Supported AI Clients
The TiDB (uvx) MCP server works with all MCP-compatible AI clients through McpMux:
Related MCP Servers
MongoDB (Docker)
Connect to MongoDB databases and Atlas clusters via Docker. Query collections, inspect schemas, manage indexes, and run aggregation pipelines in an isolated container.
MongoDB (npx)
Connect to MongoDB databases and Atlas clusters. Query collections, inspect schemas, manage indexes, and run aggregation pipelines through the official MongoDB MCP server.

PostgreSQL (Docker)
Query PostgreSQL databases, analyze performance, and optimize indexes via Docker. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks.

PostgreSQL (uvx)
Query PostgreSQL databases, analyze performance, and optimize indexes. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks via Postgres MCP Pro.
Redis (Docker)
Interact with Redis databases via Docker. Execute commands, manage keys, and work with data structures across standalone, cluster, and Sentinel modes.
Redis (uvx)
Interact with Redis databases. Execute commands, manage keys, and work with data structures across standalone, cluster, and Sentinel modes.
Install TiDB (uvx) with McpMux
One-click install from the McpMux desktop app. Auto-configures for Cursor, Claude, VS Code, ChatGPT, Windsurf, JetBrains, and any MCP-compatible client.