CockroachDB for distributed SQL
Distributed SQL gives you the relational model with horizontal scale and multi-region resilience, and operating a cluster means reasoning about more than queries: node health, replication, contention, and slow paths. This natural-language CockroachDB server is our top pick of four for the task, because it speaks directly to a Postgres-compatible, geo-distributed store and exposes the cluster internals an operator actually watches.
It is a community server (vendor amineelkouhen), not an official one, which is worth noting up front. But for the distributed-SQL job specifically, its tool set lines up with the work better than the siblings, which is what earns it first place here.
How CockroachDB fits
The tools cover both querying and cluster operations. connect, connect_database, get_connection_status, and list_databases establish and inspect the connection across the cluster. get_cluster_status reports node health, and get_replication_status shows how a table's ranges are replicated, the multi-region resilience picture. For performance, show_running_queries, get_slow_queries, get_query_insights, get_contention_events, get_transaction_insights, and get_index_recommendations let an agent find what is slow or contended and suggest an index. That is the operator's view of a distributed store, well beyond a plain query runner.
The trade-offs are engine fit and provenance. CockroachDB is Postgres-compatible, so this is the pick for that dialect; TiDB is the MySQL-compatible distributed store, SingleStore targets real-time analytics SQL, and PlanetScale is serverless MySQL with branch-based workflows. Each of those is the stronger choice for its own compatibility and workflow. And because this server is community-maintained rather than official, weigh that against a first-party option for production. Choose it when your store is CockroachDB and you want an agent that can both query it and watch the cluster.
Tools you would use
| Tool | What it does |
|---|---|
| get_cluster_status | Reports overall cluster health and node status; optionally detailed. |
| show_running_queries | Lists currently running queries on a node, filterable by user and minimum duration. |
| get_replication_status | Shows replication status for the ranges of a given table. |
| get_query_insights | Returns query insights filtered by text and minimum execution time. |
| get_slow_queries | Surfaces slow queries above a minimum duration threshold. |
| get_contention_events | Lists transaction contention events, optionally filtered by table. |
| get_transaction_insights | Returns insights about transaction execution across the cluster. |
| get_index_recommendations | Provides index recommendations to improve query performance. |
| connect | Connects to the default CockroachDB database and creates a connection pool. |
| connect_database | Connects to a specified CockroachDB database with explicit host, port, user, and password. |
FAQ
- Is the CockroachDB MCP server official?
- No. It is a community server (vendor amineelkouhen), not first-party. For the distributed-SQL task its tools fit well, covering queries plus cluster operations, but weigh the community-maintained status against an official option when running it in production.
- What cluster-level insight can the agent get?
- A real operator's view: get_cluster_status for node health, get_replication_status for range replication, and get_slow_queries, get_contention_events, get_query_insights, get_transaction_insights, and get_index_recommendations for performance. connect and list_databases handle connection setup across the cluster.