> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CockroachDB Plugins for AI Tools

CockroachDB provides official plugins for [Claude Code](https://code.claude.com/), [Cursor](https://cursor.com/), and [OpenAI Codex](https://developers.openai.com/codex/). The plugins connect your AI coding tools of choice directly to your CockroachDB clusters for exploring schemas, writing optimized SQL, debugging queries, and managing clusters. Each plugin provides tools across MCP backends (self-hosted MCP Toolbox and the managed [CockroachDB Cloud MCP Server](https://docs.cockroachlabs.com/docs/v26.4/cockroachdb-mcp-server.md)), skills across operational domains, and built-in safety protections, and the Claude Code and Cursor plugins also include specialized agents.

The official CockroachDB AI plugins come with the following components:

* **MCP backends**: `cockroachdb-toolbox` for any cluster through MCP Toolbox, and `cockroachdb-cloud` for the managed [CockroachDB Cloud MCP Server](https://docs.cockroachlabs.com/docs/v26.4/cockroachdb-mcp-server.md). Additional backends, including the [CockroachDB MCP Server](https://docs.cockroachlabs.com/docs/v26.4/cockroachdb-mcp-server.md) for self-hosted clusters, can be added manually.
* **Cluster management tools**: the [`ccloud` CLI](https://docs.cockroachlabs.com/docs/cockroachcloud/ccloud-get-started) for cluster lifecycle, backups, disaster recovery, networking, and audit tasks, which agents call directly through the shell.
* **SQL client tools**: list schemas and tables, inspect cluster and database details, and run SQL. SQL through MCP Toolbox is read-only unless write mode is enabled; the Cloud MCP Server provides separate write tools governed by your CockroachDB Cloud permissions.
* **Agents and skills**: skills across operational domains in every plugin, plus specialized DBA, Developer, and Operator agents in the Claude Code and Cursor plugins.
* **Safety protections**: In the Claude Code and Codex plugins, built-in safety hooks block dangerous statements. In the Cursor plugin, safety and best-practice rules steer the model away from risky behavior.

## Prerequisites

The official CockroachDB plugins come bundled with the following MCP servers, which have their own requirements:

* The `cockroachdb-toolbox` server works with any self-hosted or Cloud cluster. It requires [MCP Toolbox for Databases](https://github.com/googleapis/mcp-toolbox) v1.0.0 or later on your `PATH`, and a running CockroachDB cluster it can reach. On macOS or Linux, install Toolbox with `brew install mcp-toolbox`. For Windows and other platforms, refer to the plugin repository's installation instructions.
* The `cockroachdb-cloud` server requires a [CockroachDB Cloud](https://cockroachlabs.cloud/) account. There is no local server to set up, but the server requires OAuth sign-in to CockroachDB Cloud in every tool. In Claude Code, run `/mcp` and select the server to sign in. In Cursor, the server signs in with OAuth through your browser. In Codex, no configuration is needed beyond the OAuth sign-in, and the server can reach the clusters that your CockroachDB Cloud role allows.

## Install the Claude Code plugin

Install the [CockroachDB plugin from the Claude marketplace](https://claude.com/marketplace/plugins/cockroachdb), or run the following in Claude Code:

```
/plugin install cockroachdb@claude-plugins-official
```

To install from the plugin repository's own marketplace instead:

```
/plugin marketplace add cockroachdb/claude-plugin
/plugin install cockroachdb@cockroachdb-claude-plugin
```

## Install the Cursor plugin

Install the [CockroachDB plugin from the Cursor marketplace](https://cursor.com/marketplace/cockroachdb), or run the following in Cursor:

```
/add-plugin cockroachdb
```

## Install the Codex plugin

The CockroachDB plugin for the [OpenAI Codex CLI](https://developers.openai.com/codex/cli/install) is listed on the [ChatGPT and Codex plugin listing](https://chatgpt.com/plugins/plugin_asdk_app_6ae160c3d9e48191aaeffd03cc5ef09d). To install, add the plugin marketplace and the plugin:

```
codex plugin marketplace add cockroachdb/codex-plugin
codex plugin add cockroachdb@cockroachdb-codex-plugin
```

Codex skips plugin hooks until you review and trust them. Run `/hooks` in a Codex session and trust the two CockroachDB safety hooks.

## See also

* [CockroachDB and AI](https://docs.cockroachlabs.com/docs/v26.4/cockroachdb-and-ai.md)
* [CockroachDB MCP Server](https://docs.cockroachlabs.com/docs/v26.4/cockroachdb-mcp-server.md)
* [Agent Skills](https://docs.cockroachlabs.com/docs/v26.4/agent-skills.md)
* [claude-plugin](https://github.com/cockroachdb/claude-plugin)
* [cursor-plugin](https://github.com/cockroachdb/cursor-plugin)
* [codex-plugin](https://github.com/cockroachdb/codex-plugin).
