Deploy MCP Server
Databases Basic Auth

CockroachDB REST API

Distributed SQL database with PostgreSQL compatibility

CockroachDB is a cloud-native, distributed SQL database designed for resilience, scale, and consistency. It provides PostgreSQL wire protocol compatibility, making it easy for developers to build applications that require global distribution, automatic failover, and horizontal scalability. CockroachDB's HTTP API enables programmatic database management, cluster monitoring, and administrative operations.

Base URL https://localhost:8080

API Endpoints

MethodEndpointDescription
GET/healthCheck the health status of a CockroachDB node
GET/_status/nodesRetrieve information about all nodes in the cluster
GET/_status/varsGet Prometheus-compatible metrics from the cluster
GET/_status/databasesList all databases in the cluster
GET/_status/databases/{database}Get detailed information about a specific database
GET/_status/sessionsRetrieve active SQL sessions across the cluster
GET/_status/ranges/{range_id}Get detailed information about a specific range
POST/_admin/v1/databasesCreate a new database programmatically
GET/_admin/v1/eventsRetrieve cluster event log entries
GET/_admin/v1/settingsList all cluster settings and their current values
POST/_admin/v1/settings/{key}Update a specific cluster setting
GET/_status/allocator/node/{node_id}Get allocator information for a specific node
GET/_status/certificates/{node_id}Retrieve certificate information for a node
POST/_admin/v1/drainDrain a node for graceful shutdown or maintenance
GET/_status/hotrangesIdentify hot ranges with high read/write activity

Code Examples

curl -X GET https://localhost:8080/_status/nodes \
  --user 'root:your_password' \
  --cacert certs/ca.crt \
  -H 'Content-Type: application/json'

Connect CockroachDB to AI

Deploy a CockroachDB MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to CockroachDB through these tools:

get_cluster_health Check the overall health status of the CockroachDB cluster and identify any degraded nodes
list_databases Retrieve all databases in the cluster with size and table information
monitor_cluster_metrics Fetch Prometheus metrics for CPU, memory, disk usage, and query performance across the cluster
manage_sessions View active SQL sessions, identify long-running queries, and terminate problematic sessions
analyze_hot_ranges Identify performance bottlenecks by finding hot ranges with high read/write activity

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy CockroachDB MCP Server →

Related APIs