https://github.com/c4pt0r/mcp-server-tidb
mcp server for tidb
https://github.com/c4pt0r/mcp-server-tidb
Last synced: 3 months ago
JSON representation
mcp server for tidb
- Host: GitHub
- URL: https://github.com/c4pt0r/mcp-server-tidb
- Owner: c4pt0r
- License: apache-2.0
- Created: 2025-03-06T06:53:44.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-04-15T08:34:55.000Z (6 months ago)
- Last Synced: 2025-04-15T09:39:04.217Z (6 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 17
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - TiDB - MCP server implementation for TiDB (serverless) database. (🗄️ <a name="databases"></a>Databases)
- awesome-mcp-servers - mcp-server-tidb - MCP server for TiDB that enables schema inspection and query capabilities, integrating TiDB with the MCP ecosystem. ([Read more](/details/mcp-server-tidb.md)) `mcp` `tidb` `database` `integration` (Database & Messaging MCP Servers)
- awesome-mcp-list - c4pt0r/mcp-server-tidb - server-tidb?style=social)](https://github.com/c4pt0r/mcp-server-tidb): Provides access to TiDB databases, including schema inspection and querying. (Uncategorized / Uncategorized)
- awesome-mcp-zh - c4pt0r/mcp-server-tidb
- awesome-mcp-servers - c4pt0r/mcp-server-tidb - TiDB database integration with schema inspection and query capabilities (Legend / 🗄️ <a name="databases"></a>Databases)
- awesome-mcp-servers - c4pt0r/mcp-server-tidb - TiDB database integration with schema inspection and query capabilities (Legend / 🗄️ <a name="databases"></a>Databases)
- awesome-mcp-servers - **mcp-server-tidb** - mcp server for tidb (Python-based) `database` `http` `git` `github` `python` `pip install git+https://github.com/c4pt0r/mcp-server-tidb` (Database)
- awesome-mcp-servers - **mcp-server-tidb** - mcp server for tidb (Python-based) (actively maintained) `database` `http` `git` `github` `python` `pip install git+https://github.com/c4pt0r/mcp-server-tidb` (Database)
- awesome-mcp-servers - c4pt0r/mcp-server-tidb - TiDBデータベースの統合、テーブル構造の作成(DDL)およびSQLの実行 (サーバー実装 / 🧮 <a name="data-science-tools"></a>データサイエンスツール)
- awesome-mcp-servers - TiDB MCP Server - Provides a serverless TiDB database interface for the Model Context Protocol (MCP) (Table of Contents / Databases)
- awesome-mcp-servers - TiDB MCP Server - Provides a serverless TiDB database interface for the Model Context Protocol (MCP) (Table of Contents / Databases)
- awesome-mcp - c4pt0r/mcp-server-tidb - TiDB database integration with schema inspection and query capabilities (MCP Servers / 🗄️ Databases)
- mcp-index - TiDB Database MCP Server - Effortlessly connect applications to a serverless TiDB database, enabling management and querying of data through a streamlined interface. Focus on enhancing data-driven projects and simplifying database interactions. (Cloud Services)
README
# 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](https://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.\'
- `TIDB_PASSWORD` - Database password
- `TIDB_DATABASE` - Database name, default is test## Run with Claude Desktop
Config Claude Desktop, [HOWTO](https://modelcontextprotocol.io/quickstart/user)
`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"
]
}
}
}
```