TiDB
An MCP server for TiDB, a serverless, distributed SQL database.
mcp-server-tidb
MCP server implementation for TiDB (serverless) database.
Prerequisites
- uv (Python package installer)
Installation
# Clone the repository
git clone https://github.com/c4pt0r/mcp-server-tidb
cd mcp-server-tidb
# Install the package and dependencies using uv
uv venv
uv pip install -e .
Configuration
Go tidbcloud.com to create a free TiDB database cluster
Configuration can be provided through environment variables, or using .env:
TIDB_HOST- TiDB host address, e.g. 'gateway01.us-east-1.prod.aws.tidbcloud.com'TIDB_PORT- TiDB port (default: 4000)TIDB_USERNAME- Database username, e.g. 'xxxxxxxxxx.<username>'TIDB_PASSWORD- Database passwordTIDB_DATABASE- Database name, default is test
Run with Claude Desktop
Config Claude Desktop, HOWTO
claude_desktop_config.json:
{
"mcpServers": {
"tidb": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-server-tidb",
"run",
"src/main.py"
]
}
}
}
If you're running mcp-server-tidb in WSL, the claude_desktop_config.json should look like this:
{
"mcpServers": {
"tool-with-env-vars": {
"command": "wsl.exe",
"args": [
"bash",
"-c",
"/path/to/uv --directory /path/to/mcp-server-tidb run python src/main.py"
]
}
}
}
Related Servers
SG Data MCP
Real-time Singapore government data and ACRA company intelligence for AI agents. 13 tools: weather, air quality, dengue clusters, transport, and company verification.
MLB SportRadar
Access MLB game data, standings, and player statistics using the SportRadar API.
Supermarket Database
A dockerized PostgreSQL database project for a supermarket data schema, with MCP integration for Claude Desktop.
MCP JDBC Server
A lightweight MCP server for any database with a JDBC driver. Built with Quarkus and requires Java 21+.
MCP Migration Advisor
Database migration risk analysis for Flyway and Liquibase. Detects dangerous schema changes — lock risks, data loss, destructive operations — before they hit production.
CData SAP ByDesign
A read-only MCP server for querying live SAP ByDesign data. Requires a separate CData JDBC Driver for SAP ByDesign.
FinanceMCP
Provides real-time financial data using the Tushare API.
AKShare One
Access Chinese stock market data, including historical prices, real-time quotes, news, and financial statements.
InfluxDB
A server for integrating with InfluxDB, a time-series database.
Macrostrat
Access geologic data from the Macrostrat API, including units, columns, minerals, and timescales.