TiDB MCP Server

Betadatabase
100 starsTypeScriptpingcap
GitHub
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-server
Examples

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

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow.

Get in Touch

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow. From proprietary data sources to internal tools, we have you covered.

Contact Us
CortexAgent Customer Service

Want to skip the form?

Our team is available to help you get started with CortexAgent.

This chat may be recorded for quality assurance. You can view our Privacy Policy.