TiDB ServerCAUTION
mcp server for tidb
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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.\'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"
]
}
}
}b85d033429bfOBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-server-tidb -- uvx mcp-server-tidb
{
"mcpServers": {
"mcp-server-tidb": {
"command": "uvx",
"args": [
"mcp-server-tidb"
]
}
}
}Exposed tools (7)
3 read · 3 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
create_db_user | write | db : DB = ctx.request_context.lifespan_context.db |
db_execute | write | db : DB = ctx.request_context.lifespan_context.db |
db_query | read | db : DB = ctx.request_context.lifespan_context.db |
get_tidb_serverless_address | read | db : DB = ctx.request_context.lifespan_context.db |
remove_db_user | destructive | db : DB = ctx.request_context.lifespan_context.db |
show_create_table | write | db : DB = ctx.request_context.lifespan_context.db |
show_tables | read | db : DB = ctx.request_context.lifespan_context.db |
Trust audit
CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (2)
return '/etc/ssl/certs/ca-certificates.crt'
remove_db_user
Gates applied: no_behavioural_pass.
b85d033429bffull audit observations/trust-audit/mcp-server/c4pt0r__tidb-server.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | b85d033429bf | CAUTION | B | 89 | first audit |
Questions
What is the TiDB Server MCP server?
mcp server for tidb
What tools does TiDB Server expose?
7 in total: 3 read-only, 3 that write, and 1 that can delete or overwrite (remove_db_user). Every one is listed on this page with its risk.
Is TiDB Server safe to connect to an agent?
With care. The audit graded it B (89/100) and found 2 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does TiDB Server need?
No credential environment variables were found in its source, so it appears to need none.
How does TiDB Server run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as mcp-server-tidb.
How current is this page?
The grade is for one exact copy of the source (b85d033429bf), read on 2026-10-09. The repository is watched and re-audited when it changes.