The CockroachDB plugin for Cursor gives your AI coding agent direct access to CockroachDB databases — explore schemas, write optimized SQL, debug queries, and manage distributed clusters.
In Cursor, run:
/add-plugin cockroachdb
Or install from the Cursor Marketplace.
This plugin connects to CockroachDB via MCP (Model Context Protocol). Choose the backend that fits your setup — see MCP Backends below.
For the MCP Toolbox backend (available now), install MCP Toolbox for Databases (v0.27.0+):
brew install mcp-toolboxSet environment variables for your CockroachDB connection:
export COCKROACHDB_HOST="your-cluster-host"
export COCKROACHDB_PORT="26257"
export COCKROACHDB_USER="your-user"
export COCKROACHDB_PASSWORD="your-password"
export COCKROACHDB_DATABASE="your-database"For CockroachDB Cloud, find connection details in the Cloud Console.
| Backend | Status | Transport | Use Case |
|---|---|---|---|
cockroachdb-toolbox |
✅ Available | stdio | Any CockroachDB cluster via MCP Toolbox |
cockroachdb-toolbox-http |
✅ Available | Streamable HTTP | Same as above, remote/multi-user via HTTP |
ccloud |
🔜 Coming soon | stdio | Cluster lifecycle, backups, DR, networking via ccloud CLI |
cockroachdb-cloud |
🔜 Coming soon | HTTP | CockroachDB Cloud MCP Server (OAuth/API key) |
| Tool | Description |
|---|---|
cockroachdb-execute-sql |
Execute SQL statements (SELECT, DDL, DML) |
cockroachdb-list-schemas |
List all schemas in the database |
cockroachdb-list-tables |
List tables with columns, types, and constraints |
22 skills from cockroachdb-skills across 10 operational domains:
| Domain | Skills | Examples |
|---|---|---|
| Query & Schema Design | 1 | cockroachdb-sql |
| Observability & Diagnostics | 7 | profiling-statement-fingerprints, triaging-live-sql-activity |
| Security & Governance | 11 | auditing-cloud-cluster-security, hardening-user-privileges |
| Onboarding & Migrations | 3 | molt-fetch, molt-verify, molt-replicator |
| Application Development | — | (planned) |
| Performance & Scaling | — | (planned) |
| Operations & Lifecycle | — | (planned) |
| Cost & Usage Management | — | (planned) |
| Integrations & Ecosystem | — | (planned) |
| Resilience & Disaster Recovery | — | (planned) |
Skills are sourced from the cockroachdb-skills submodule via symlink — a single source of truth shared across CockroachDB agent integrations.
| Rule | Applies To |
|---|---|
| SQL Patterns | UUID primary keys, indexing, transactions, CockroachDB SQL idioms |
| Application Patterns | ORM configuration, retry logic, schema design, error handling |
Clone the repository:
git clone https://github.com/cockroachdb/cursor-plugin.git
cd cursor-plugin.cursor-plugin/plugin.json # Plugin manifest
skills -> submodules/... # Symlink to cockroachdb-skills (22 skills)
rules/ # 2 rule sets (.mdc files)
mcp.json # MCP server definitions
tools.yaml # Toolbox source & tool configuration
submodules/cockroachdb-skills # Shared skills submodule
assets/logo.svg # Plugin logo
This repo uses Release Please for automated releases.
- Use Conventional Commits (
feat:,fix:) onmain - Release Please opens a Release PR with version bump and changelog
- Merge the Release PR to publish