Integrate TiDB MCP Server with Claude Desktop
This guide shows you how to configure the TiDB MCP Server in Claude Desktop.
Prerequisites
Before you begin, ensure you have the following:
- Claude Desktop: Download and install Claude Desktop from claude.ai.
- Python (>=3.10) and uv: Ensure Python (version 3.10 or later) and uv is installed. Follow the installation guide to install uv.
- A TiDB Serverless Cluster: You can create a free TiDB CLoud Serverless cluster here tidbcloud.com.
Setup steps
You can follow the steps below to set up the TiDB MCP Server in Claude Desktop:
- Open the Settings dialog.
- Click the Developers tab in the dialog.
- Click the Edit Config button to open the MCP config file
claude_desktop_config.json
. -
Copy the following configuration into the
claude_desktop_config.json
file. -
Go to the TiDB Cloud cluster page and navigate to the cluster you want to connect to.
- Click the Connect button to get the connection parameters, and replace the
TIDB_HOST
,TIDB_PORT
,TIDB_USERNAME
,TIDB_PASSWORD
, andTIDB_DATABASE
values with your own. - Restart Claude Desktop.
For more details, please refer to the quickstart guide to learn how to configure the MCP server in Claude Desktop.