TiDB Cloud
Manage TiDB Cloud Starter, Essential, Dedicated, IAM, billing, and Data Service control-plane resources.
Verdict
Common use cases
- Check cluster uptime before a deploy
- Audit who changed database configs last week
- Compare monthly bills across quarters
- Monitor import job progress in real time
- List all branches for a staging instance
Integration
- Vendor
- TiDB Cloud
- Category
- other
- Auth
- API_KEY
- Tools
- 10
- Composio slug
tidb_cloud
Tools
- Get Cluster
Get details for one Starter/Essential instance or Dedicated cluster by ID.
- Get Monthly Bill
Return the TiDB Cloud organization bill for one calendar month.
- List Audit Logs
Search TiDB Cloud organization audit logs by time range, event type, or keyword and return one page of results.
- List Branches
List database branches for a TiDB Cloud Starter or Essential instance. Returns one page and a continuation cursor.
- List Clusters
List TiDB Cloud Starter/Essential instances or Dedicated clusters, with product-specific filters. Returns one page and a continuation cursor.
- List Data App Deployments
List one page of deployments and deployment status for a TiDB Cloud Data Service application, plus a continuation cursor.
- List Data Apps
List TiDB Cloud Data Service applications in a project, returning one page and a continuation cursor.
- List Import Tasks
List one page of import tasks for a TiDB Cloud Starter/Essential instance or Dedicated cluster, including status, progress, source, timestamps, errors, and a continuation cursor.
- List Organization Members
List one page of TiDB Cloud organization members with optional identity, assignment, role, and status filters, plus a continuation cursor.
- List Regions
List regions available for Starter/Essential or Dedicated clusters, optionally filtering Dedicated regions. Returns one page and a continuation cursor.
Setup
Setup guide
- 11. In Switchy, open Settings → Integrations and click Connect next to TiDB Cloud. 2. Log into your TiDB Cloud console, navigate to Organization Settings → API Keys, and generate a new key with read permissions for clusters, billing, and audit logs. 3. Copy the key and paste it into Switchy's connection modal, then click Authorize. 4. Switchy tests the connection by fetching your cluster list — you'll see a green checkmark when it succeeds. 5. Open any Project, type '@TiDB Cloud list my clusters' in the chat, and confirm you see your instances returned. 6. If the connection fails, verify the API key hasn't expired and that your TiDB organization allows API access from external tools.
What teammates see: by default, memories from TiDB Cloud are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Projects have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Cluster Health Check
@TiDB Cloud list all my clusters and show their current status, region, and tier. Flag any that aren't running.
Monthly Spend Summary
@TiDB Cloud get the bill for last month and summarize total spend by cluster. Highlight any charges over $500.
Audit Recent Changes
@TiDB Cloud search audit logs from the last 7 days for cluster configuration changes. List who made each change and when.
Import Job Status
@TiDB Cloud list all import tasks for cluster ID abc123. Show status, progress percentage, and any errors.
Branch Overview
@TiDB Cloud list branches for instance xyz789. Include branch name, creation date, and parent cluster.
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@TiDB Cloud list all clusters in our production project and show their current status, region, and tier
Found 4 clusters in project prod-analytics: 1. prod-primary (Dedicated) – Running in us-west-2, 8vCPU/32GB, TiDB v7.5.1 2. prod-replica (Dedicated) – Running in eu-central-1, 4vCPU/16GB, TiDB v7.5.1 3. staging-test (Starter) – Running in us-east-1, shared tier 4. dev-sandbox (Essential) – Paused in ap-southeast-1 All production clusters are healthy. The dev-sandbox cluster has been paused for 14 days to save costs.
This example demonstrates the List Clusters tool's filtering and pagination capabilities. Users need read access to the TiDB Cloud project. The MCP returns one page at a time; for organizations with many clusters, you'll need to handle continuation cursors in follow-up prompts. Cluster details refresh on each call but may lag by 1-2 minutes during scaling operations.
@TiDB Cloud create a new branch called 'feature-user-analytics' from our main cluster for testing schema changes
Branch 'feature-user-analytics' created successfully from cluster main-db (ID: cls_abc123). Branch ID: br_xyz789 Status: Creating (estimated 3-5 minutes) Base snapshot: 2025-01-15 14:32:00 UTC Expiration: 7 days from creation Once active, connect using the branch-specific endpoint. Schema changes in this branch won't affect the parent cluster. Remember to delete the branch when testing is complete to avoid unnecessary charges.
This example shows the branch creation workflow for Starter/Essential instances. Branching requires write permissions and is only available on certain TiDB Cloud tiers. Branches consume storage and compute resources, so they incur costs. The MCP creates the branch but doesn't wait for provisioning to complete—check branch status with a follow-up prompt if you need to confirm it's ready.
@TiDB Cloud pull our January 2025 bill and break down costs by cluster, then identify which cluster had the highest spend
January 2025 TiDB Cloud bill: $4,287.63 total Top 3 clusters by cost: 1. prod-primary (Dedicated): $2,145.20 – 8vCPU tier, 744 hours runtime, $890 storage 2. prod-replica (Dedicated): $1,320.50 – 4vCPU tier, 744 hours runtime, $520 storage 3. analytics-cluster (Dedicated): $680.40 – 4vCPU tier, 372 hours runtime (scaled down mid-month) Remaining $141.53 spread across 6 Starter/Essential instances and data transfer fees. The prod-primary cluster accounts for 50% of total spend due to its larger compute tier and high storage usage.
This example pairs the Get Monthly Bill tool with AI reasoning to surface cost insights. Billing data is read-only and typically available 24-48 hours after month-end. The MCP returns raw line items; the AI synthesizes them into actionable summaries. Users need billing read access at the organization level. Use this for cost attribution, budget tracking, or identifying optimization opportunities.
Use-case deep-dives
When TiDB Cloud MCP streamlines finance handoff at month-end
A 6-person engineering team running three TiDB clusters across dev, staging, and prod needs to reconcile cloud spend with finance every month. The Get Monthly Bill tool pulls the full org invoice in one call, while List Clusters maps each line item to the owning project without logging into the console. This MCP is the right call if your team runs more than two clusters and finance asks for a breakdown by environment or cost center. The API key scope covers billing and cluster metadata, so one shared Switchy workspace can handle the monthly ritual without handing out console logins. If your org has fewer than two clusters or you only check spend quarterly, the overhead isn't worth it—just export from the web UI.
When audit log search beats manual console hunting
A 4-person SRE rotation needs to trace who changed a cluster config during a 2am outage. The List Audit Logs tool filters by event type and timestamp, surfacing the exact API calls and user IDs in seconds instead of paging through the console. This MCP wins if your team investigates incidents more than once a quarter or runs compliance reviews that require timestamped change logs. The API key needs audit-read scope, which most orgs already grant to ops leads. The tool returns one page at a time, so if your org generates thousands of events per day, you'll hit pagination limits and need to narrow the time window. For teams that rarely look at logs or have under 50 events per week, the console search is faster than setting up the MCP.
When TiDB Data Service deployments need real-time visibility
A 5-person product team ships a customer-facing API backed by TiDB Data Service and needs to confirm deployments landed before demoing to stakeholders. The List Data App Deployments tool shows live status and error messages without switching contexts from Slack or standup. This MCP is the right call if your team deploys more than twice a week or runs multiple Data Service apps where deployment state isn't obvious from the app itself. The API key requires project-level access, so one workspace can cover all apps in a project. If your team only deploys once a sprint or runs a single app with built-in health checks, the console's deployment view is sufficient and the MCP adds unnecessary indirection.
Frequently asked
What does the TiDB Cloud MCP let me do in Switchy?
It connects your team's TiDB Cloud organization so you can query cluster details, check monthly bills, pull audit logs, and manage database branches or import tasks — all from Switchy's AI workspace. You're not running SQL queries through this MCP; you're automating the operational layer around your TiDB infrastructure.
Do I need admin access to connect TiDB Cloud?
You need an API key with permissions to read clusters, billing, and audit logs. TiDB Cloud issues organization-level keys, so whoever connects it should have at least read access to the resources your team wants to surface in Switchy. Check your TiDB Cloud IAM settings before generating the key.
Can this MCP run SQL queries against my TiDB databases?
No. This MCP surfaces cluster metadata, billing, audit logs, and Data App deployments — not the database layer itself. If you need to query tables or run SQL, use TiDB's native SQL interface or a separate database connector. This is for ops visibility, not data access.
Why use this instead of the TiDB Cloud console?
The console requires context-switching and manual navigation. This MCP pulls cluster status, import progress, or billing data directly into Switchy threads, so your team can ask questions like "which clusters are running" or "what did we spend last month" without leaving the workspace. It's faster for routine checks.
Who on the team should connect the TiDB Cloud MCP?
Whoever manages your TiDB infrastructure or has access to organization billing. Once connected, the whole workspace can query cluster info or audit logs without needing individual API keys. Just make sure the connecting user's key has read permissions for the resources you want visible.