About
Overview
The TiDB MCP Server enables AI agents to interact with TiDB, the distributed SQL database that combines OLTP and OLAP capabilities. Since TiDB is MySQL-compatible, it supports standard SQL queries while providing distributed scalability and real-time analytics through its HTAP architecture.
Capabilities
Tools & Capabilities
⚡query
Execute a SQL query against TiDB
⚡list_databases
List all databases
⚡list_tables
List tables in a database
⚡describe_table
Get the schema of a table
Setup
Installation
bash
Install
npx -y @pingcap/tidb-mcp-serverExamples
Example Usage
javascript
Usage
{
"mcpServers": {
"tidb": {
"command": "npx",
"args": ["-y", "@pingcap/tidb-mcp-server"],
"env": {
"TIDB_HOST": "localhost",
"TIDB_PORT": "4000",
"TIDB_USER": "root"
}
}
}
}Quick Info
Authorpingcap
LanguageTypeScript
StatusBeta
Stars★ 100
Last UpdatedFeb 12, 2026