Atlas / MCP servers / c4pt0r / TiDB Server

TiDB ServerCAUTION

mcp/c4pt0r/tidb-server

mcp server for tidb

Verdict
CAUTION
Grade
B
Trust score
89 /100
Exposed tools
7 3r · 3w · 1d
Transport
stdio
License
Apache-2.0
Stars
24
01

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 password
  • TIDB_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"
]
}
}
}
Read from source at commit b85d033429bfOBSERVED · 2026-10-09
02

Connect

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-code
claude mcp add mcp-server-tidb -- uvx mcp-server-tidb
claude-desktop
{
  "mcpServers": {
    "mcp-server-tidb": {
      "command": "uvx",
      "args": [
        "mcp-server-tidb"
      ]
    }
  }
}
03

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.

ToolRiskDescription
create_db_userwritedb : DB = ctx.request_context.lifespan_context.db
db_executewritedb : DB = ctx.request_context.lifespan_context.db
db_queryreaddb : DB = ctx.request_context.lifespan_context.db
get_tidb_serverless_addressreaddb : DB = ctx.request_context.lifespan_context.db
remove_db_userdestructivedb : DB = ctx.request_context.lifespan_context.db
show_create_tablewritedb : DB = ctx.request_context.lifespan_context.db
show_tablesreaddb : DB = ctx.request_context.lifespan_context.db
04

Trust audit

CAUTIONgrade B · trust 89/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (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)

MEDIUMFilesystem / path · fs.system_paths · CWE-22, CWE-59
src/db_client/db.py:30
return '/etc/ssl/certs/ca-certificates.crt'
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
remove_db_user
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius

Gates applied: no_behavioural_pass.

Audited 2026-10-09 · audit v0.4.1 · source sha b85d033429bffull audit observations/trust-audit/mcp-server/c4pt0r__tidb-server.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-09b85d033429bfCAUTIONB89first audit
06

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.

Advertisement