Connect to AI
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'

Use CockroachDB from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for CockroachDB. Paste your CockroachDB API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls CockroachDB directly with your credentials — no local install, works on mobile.

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

Connect in 60 seconds

Paste your CockroachDB key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect CockroachDB to your AI →

Related APIs