
cockroachdb-toolbox
Cursor MCP Server
cockroachdb-toolbox is a Cursor MCP server included in the CockroachDB plugin by Cockroach Labs.
CockroachDB plugin for Cursor — explore schemas, write optimized SQL, debug queries, and manage distributed database clusters directly from your AI coding agent.
Skills32
benchmarking-transaction-patternsGuides benchmarking and comparing explicit multi-statement transactions versus single-statement CTE transactions in CockroachDB, with fair test methodology, contention analysis, and performance interpretation. Use when comparing transaction formulations, benchmarking CockroachDB
designing-application-transactionsGuides application developers in designing correct and performant transaction patterns for CockroachDB, covering transaction lifetime, implicit vs explicit transactions, retry handling with exponential backoff, pushing invariants into SQL, selective pessimistic locking, set-based
designing-multi-region-applicationsGuides developers in selecting and implementing multi-region patterns for CockroachDB applications, covering active-passive vs active-active architectures, REGIONAL BY ROW, GLOBAL tables, manual geo-partitioning with lease preferences, and live demo setup with validation queries.
analyzing-range-distributionAnalyzes CockroachDB range distribution across tables and indexes using SHOW RANGES to identify range count, size patterns, leaseholder placement, and replication health. Use when investigating hotspots, uneven data distribution, range fragmentation, or validating zone configurat
analyzing-schema-change-storage-riskEstimates storage requirements for CockroachDB schema change backfills by analyzing per-index range sizes using SHOW RANGES WITH DETAILS and applying the 3× free space rule. Use when planning CREATE INDEX, ADD COLUMN, or ALTER PRIMARY KEY operations on large tables to avoid disk
Rules4
cockroachdb-app-patternsApplication-level best practices and anti-patterns when building applications on CockroachDB. Covers transaction retry logic, ORM configuration, schema design, connection management, online DDL, batching, session guardrails, and multi-region patterns. Based on real-world producti
cockroachdb-developer-patternsAdvanced CockroachDB application development patterns for JPA/Hibernate, Spring, JavaEE, and set-based SQL. Covers JPA identity generators, Spring AOP transaction retry, JavaEE BMT/CMT retry interceptors, CTE-based set operations, Hibernate batch configuration, entity mapping opt
cockroachdb-operator-patternsCockroachDB operations, SRE, and runbook patterns. Covers cluster maintenance procedures, monitoring and alerting, diagnostic queries, troubleshooting contention and hardware issues, emergency procedures, backup/restore, version upgrades, changefeed management, capacity planning,
cockroachdb-sql-patternsCockroachDB SQL best practices, anti-patterns, and distributed database patterns. These rules MUST be followed when writing SQL, schema definitions, or application code that interacts with CockroachDB. Covers 24 verified best practices from production workloads.





