TiDB

by c4pt0r

24 stars
208 downloads
Not rated
GitHub

About

An MCP server for TiDB, a serverless, distributed SQL database.

Details

Author
c4pt0r
GitHub stars
24
Downloads
208
Categories
Database, Other, Cloud Service, Infrastructure

- MCP server for TiDB (serverless) database integration
- Easy installation with uv package manager
- Configuration via environment variables or .env file
- Works with Claude Desktop out of the box
- Supports WSL (Windows Subsystem for Linux) setups

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name TiDB
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To use, first install the package using uv (Python package installer): clone the repository, create a virtual environment, and install dependencies with uv pip install -e .. Then configure environment variables (or a .env file) with your TiDB connection details (host, port, username, password, database). Finally, add the server configuration to Claude Desktop’s claude_desktop_config.json, pointing uv to the src/main.py entry point.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tidb": {
            "tidb": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/path/to/mcp-server-tidb",
                    "run",
                    "src/main.py"
                ]
            }
        }
    }
}

McpServers

{
    "tidb": {
        "command": "uv",
        "args": [
            "--directory",
            "/path/to/mcp-server-tidb",
            "run",
            "src/main.py"
        ]
    }
}

MCP server implementation for TiDB (serverless) database.

# 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 .

Gotidbcloud.comto 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 password
- TIDB_DATABASE- Database name, default is test

{ "mcpServers": { "tidb": { "command": "uv", "args": [ "--directory", "/path/to/mcp-server-tidb", "run", "src/main.py" ] } } }

If you're running mcp-server-tidb in WSL, theclaude_desktop_config.jsonshould 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" ] } } }

Introspect and query your apps deployed to Convex.

Open source MCP server specializing in easy, fast, and secure tools for Databases.

Interact with the Neon serverless Postgres platform

Query Streams securely connects MCP clients to live databases through the Query Streams Cloud Network, with no VPNs, inbound ports, or complex setup.

Interact with the SingleStore database platform

Official Supabase MCP server for managing Supabase projects, databases, auth, storage, edge functions, and SQL workflows from AI agents.

Interact with Tinybird serverless ClickHouse platform

An MCP server for querying and interacting with AWS Athena.

Production-grade MCP server for Databricks: SQL Warehouses, Jobs API, multi-workspace support.

Full-stack backend platform MCP — provision apps, manage databases, deploy functions, and more.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.