CockroachDB Cloud MCP Server for Claude
Manage CockroachDB Cloud clusters from Claude — list databases and tables, inspect schemas, run SELECT queries, explain query plans, monitor running queries, and optionally create tables and insert data — with the official CockroachDB Cloud MCP server.
Open the source and read safety notes before installing.
Safety notes
- The server is read-only by default — SELECT, EXPLAIN, and schema queries only; no INSERT, UPDATE, or DELETE.
- Write tools (create_database, create_table, insert_rows) can be enabled with explicit opt-in — only enable if needed.
- DROP and TRUNCATE operations are not supported even with write opt-in.
Privacy notes
- Database schemas, table structures, query results, and running query metadata from your CockroachDB Cloud cluster are surfaced in Claude's context.
- Authentication uses OAuth (browser flow) or a service account API key — keep the API key in the MCP config headers.
Prerequisites
- A CockroachDB Cloud account with at least one cluster — sign up at cockroachlabs.com.
- Your cluster ID (from the Cloud Console URL: cockroachlabs.cloud/cluster/YOUR_CLUSTER_ID).
- An MCP client such as Claude Code or Claude Desktop.
- Optional: a CockroachDB Cloud service account API key for non-interactive auth.
Schema details
- Install type
- cli
- Troubleshooting
- No
- Estimated setup
- 5 minutes
- Difficulty
- beginner
- Disclosure
- CockroachDB is a commercial distributed SQL database. The MCP server is officially maintained by Cockroach Labs.
Full copyable content
{
"mcpServers": {
"cockroachdb": {
"type": "http",
"url": "https://cockroachlabs.cloud/mcp",
"headers": {
"mcp-cluster-id": "YOUR_CLUSTER_ID"
}
}
}
}About this resource
Overview
The CockroachDB Cloud MCP Server is the official remote Model Context Protocol server
from Cockroach Labs for CockroachDB Cloud. It connects Claude
directly to your CockroachDB Cloud clusters via the hosted endpoint at
https://cockroachlabs.cloud/mcp — no local install required. Read-only by default (SELECT,
EXPLAIN, schema queries), with optional write capability for CREATE and INSERT operations.
Authentication via OAuth browser flow or service account API key.
Key capabilities
- Cluster listing — list all accessible clusters.
- Schema exploration — list databases, tables, and get full table schemas.
- SQL queries — execute SELECT statements against your cluster.
- Query plans — run EXPLAIN on queries to diagnose performance.
- Active query monitoring — show currently running queries.
- Write operations (opt-in) — create databases and tables, insert rows.
Tools
| Tool | Category | Purpose |
|---|---|---|
list_clusters |
Discovery | List all accessible clusters |
get_cluster |
Discovery | Detailed cluster info |
list_databases |
Schema | List databases in a cluster |
list_tables |
Schema | List tables in a database |
get_table_schema |
Schema | Full table schema |
select_query |
SQL | Execute SELECT statements |
explain_query |
SQL | Run EXPLAIN on a query |
show_running_queries |
Monitoring | Monitor active queries |
create_database |
Write (opt-in) | Create a new database |
create_table |
Write (opt-in) | Define a new table |
insert_rows |
Write (opt-in) | Insert rows |
How it compares
| Server | Read-only default | Schema inspection | Query explain | No local install | Notes |
|---|---|---|---|---|---|
| CockroachDB Cloud MCP | Yes | Yes | Yes | Yes | Official, hosted |
| Neon MCP | No | Yes | No | No | Serverless Postgres |
| PlanetScale MCP | Yes | Yes | No | No | MySQL |
| CockroachDB (self-hosted) | No | Yes | Yes | No | Third-party, OSS |
CockroachDB Cloud MCP is unique in providing a read-only default with no local install, connecting directly to managed clusters via a hosted HTTP endpoint.
Installation
Claude Code (OAuth browser login)
claude mcp add cockroachdb \
https://cockroachlabs.cloud/mcp \
--transport http \
--header "mcp-cluster-id: YOUR_CLUSTER_ID"
Run /mcp in Claude Code to complete OAuth authentication.
Claude Code (service account API key)
claude mcp add cockroachdb \
https://cockroachlabs.cloud/mcp \
--transport http \
--header "mcp-cluster-id: YOUR_CLUSTER_ID" \
--header "Authorization: Bearer YOUR_SERVICE_ACCOUNT_API_KEY"
Find your cluster ID in the Cloud Console URL: cockroachlabs.cloud/cluster/YOUR_CLUSTER_ID.
Claude Desktop
{
"mcpServers": {
"cockroachdb": {
"type": "http",
"url": "https://cockroachlabs.cloud/mcp",
"headers": {
"mcp-cluster-id": "YOUR_CLUSTER_ID"
}
}
}
}
Requirements
- CockroachDB Cloud account with a cluster.
- Cluster ID from the Cloud Console.
- An MCP client (Claude Code or Claude Desktop).
- No local install required.
Security
- Read-only by default — no unintended data modification.
- Service account API keys scope access per principal — use least-privilege keys.
- DROP and TRUNCATE are not supported even with write opt-in.
Source Verification Notes
Verified on 2026-06-18:
- Official CockroachDB Cloud MCP documentation at
www.cockroachlabs.com/docs/cockroachcloud/connect-to-the-cockroachdb-cloud-mcp-server(SSR HTML, HTTP 200) documents the hosted endpointhttps://cockroachlabs.cloud/mcp, themcp-cluster-idheader requirement, OAuth 2.1 and service account API key authentication, all tools, read-only default mode, and opt-in write operations (create_database, create_table, insert_rows; no DROP/TRUNCATE). - Claude Code MCP documentation at
code.claude.com/docs/en/mcpdescribes the--transport httpconnection pattern used above.
Source citations
Add this badge to your README
How it compares
CockroachDB Cloud MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | CockroachDB Cloud MCP Server for Claude Manage CockroachDB Cloud clusters from Claude — list databases and tables, inspect schemas, run SELECT queries, explain query plans, monitor running queries, and optionally create tables and insert data — with the official CockroachDB Cloud MCP server. Open dossier | Aiven MCP Server for Claude Manage your Aiven cloud database services from Claude — list and monitor PostgreSQL, Apache Kafka, ClickHouse, Valkey, and OpenSearch services, execute SQL queries, manage Kafka topics and schemas, tail logs, and optimize queries — with the official Aiven MCP server. Open dossier | Teradata MCP Server for Claude Connect Claude to Teradata — list databases and tables, inspect DDL, run SQL queries, preview data, analyze column quality, and explore DBA diagnostics — with the official Teradata MCP server supporting optional ML tool expansion via the teradataml Python package. Open dossier | MCP SQLite Server for Claude Read and write any local SQLite database from Claude — get database info, list tables, inspect schemas, create/read/update/delete records, and run raw SQL queries — with the MCP SQLite server that connects to any `.db` file you specify. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | mcp | mcp | mcp | mcp |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | Cockroach Labs | Aiven | Teradata | jparkerweb |
| Added | 2026-06-18 | 2026-06-18 | 2026-06-18 | 2026-06-18 |
| Platforms | Claude CodeCursorClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop |
| Source repo | — | — | — | — |
| Safety notes | ✓The server is read-only by default — SELECT, EXPLAIN, and schema queries only; no INSERT, UPDATE, or DELETE. Write tools (create_database, create_table, insert_rows) can be enabled with explicit opt-in — only enable if needed. DROP and TRUNCATE operations are not supported even with write opt-in. | ✓Write operations (create/update services, deploy apps) are available but require `AIVEN_READ_ONLY=false` — the server defaults to read-only mode. Aiven services include managed production databases — confirm before creating or modifying services. | ✓The `base_query` tool executes arbitrary SQL on your Teradata system — only connect with credentials scoped to the minimum required permissions. Row limits (`DEFAULT_ROW_LIMIT`, `MAX_ROW_LIMIT`) prevent accidental full-table scans returning millions of rows; leave defaults in place unless you need larger result sets. | ✓The `query` tool executes arbitrary SQL including INSERT, UPDATE, and DELETE statements — it is not read-only. Point the server at a copy or test database to avoid accidental data loss before trusting it with production data. |
| Privacy notes | ✓Database schemas, table structures, query results, and running query metadata from your CockroachDB Cloud cluster are surfaced in Claude's context. Authentication uses OAuth (browser flow) or a service account API key — keep the API key in the MCP config headers. | ✓Service metadata, metrics, application logs, PostgreSQL query stats, Kafka topic configurations, and Schema Registry content from your Aiven account are surfaced in Claude's context. Your `AIVEN_TOKEN` grants account-level API access — keep it in the MCP config env and never commit it to version control. | ✓Query results, schema definitions, DDL, and session/system metadata from your Teradata instance are surfaced in Claude's context. Your database credentials are embedded in the `DATABASE_URI` — keep it in the MCP config env and never commit it to version control. | ✓All database content including table schemas, record data, and query results are surfaced in Claude's context — do not connect databases containing sensitive personal or credential data unless you intend to share it with the model. No credentials are required and no data is sent to external services — the server operates entirely locally. |
| Prerequisites |
|
|
|
|
| Install | | | | |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Featured in
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.