Skip to content
MCP server

mcp-cockroachdb

MCP server giving AI assistants natural-language access to CockroachDB clusters

Actively maintained

The repository was last updated 141 days ago and is published under MIT.

mcp-cockroachdb is an open-source MCP server for databases. It is available on CLI, Self-hosted, API, VS Code, Linux, macOS and Windows.

Pricing
Open source
Platforms
CLI, Self-hosted, API
What it can do
Can change data (3 tools)
GitHub stars
12
Last commit
Language
Python

Similar MCP servers

About mcp-cockroachdb

Connects AI clients to a CockroachDB database so an assistant can inspect cluster health, run SQL, and manage schema, users and backups through MCP tools. Queries go through an asyncpg connection pool, and identifiers and values are checked before they reach the database.

The server is organized into thirteen tool groups covering monitoring, table and index management, vector search, job control, backup and restore, changefeeds, multi-region settings and cluster administration. A read-only flag disables every write or DDL tool, and destructive operations require both a startup flag and a per-call confirmation.

It suits developers and database operators who want an assistant to query or administer CockroachDB from Claude Desktop, Cursor, VS Code or the OpenAI Agents SDK, with stdio or streamable HTTP transport.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 3 of 5 tools change data; 1 name doesn't say.

From the server's own tool labels and tool names; not verified by us.

vector_similarity_searchName suggests: reads
Search VECTOR columns with cosine, L2, ip or auto metrics.
create_backupName suggests: changes
Create cluster, database or table backups to supported storage URIs.
restore_backup
Restore a backup, optionally into a new database name (destructive).
create_changefeedName suggests: changes
Set up a CDC pipeline to Kafka, webhook or cloud storage.
set_survival_goalName suggests: changes
Set a database survival goal to ZONE or REGION.

What it does

Cluster monitoring tools
Check node health, replication status, slow queries, contention events and index recommendations.
Read-only safety mode
A startup flag blocks DDL and write tools so an assistant can only read data.
Confirmed destructive operations
Drop and cancel actions need a startup flag plus a confirm parameter on each call.
Vector similarity search
Search VECTOR columns with cosine, L2 or inner-product metrics and manage C-SPANN indexes.
Backup and restore control
Create, list and restore backups to S3, GCS, Azure, local or userfile storage.
Changefeed management
Create and control CDC pipelines to Kafka, webhooks or cloud storage.

Good for

  • Letting an assistant diagnose slow queries and contention on a CockroachDB cluster
  • Querying production-like data in natural language with read-only access
  • Provisioning a scoped database user for an AI agent
  • Running and monitoring backups or bulk imports from an assistant
  • Setting up change data capture pipelines to Kafka or webhooks

Pricing

Open source

Free and MIT licensed; self-hosted.

mcp-cockroachdb FAQ

Can the assistant change data when the server runs in read-only mode?

No. The read-only flag disables every DDL and write-shaped tool, including bulk import and INSERT, UPDATE or DELETE statements.

How are destructive operations protected?

Drop and similar tools require the server to start with the allow-destructive flag, and each call must include confirm=True.

Which transports are supported?

The server runs over stdio by default and can also run as a streamable HTTP server.

Which AI clients can connect?

Any MCP client, with documented setups for Claude Desktop, Cursor, VS Code with GitHub Copilot, Augment and the OpenAI Agents SDK.

Is mcp-cockroachdb free?

Yes. mcp-cockroachdb is open source, so you can use and self-host it for free.

What are the best alternatives to mcp-cockroachdb?

The closest alternatives to mcp-cockroachdb are sql-query-mcp, postgres_mcp, db-mcp-server, mcp-mongo-server and postgres-mcp.

Where this comes from

  • Description: written from the project's README.

How AIPoweredBot checks servers