CockroachDB MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CRDB_HOST | Yes | CockroachDB host | |
| CRDB_PORT | No | Database port | 26257 |
| CRDB_USER | Yes | Database username | |
| CRDB_CLUSTER | No | Cloud cluster ID | |
| CRDB_SSLMODE | No | SSL mode | require |
| CRDB_DATABASE | Yes | Database name | |
| CRDB_MAX_ROWS | No | Max rows per query | 1000 |
| CRDB_PASSWORD | No | Database password | |
| CRDB_READ_ONLY | No | Block write operations | false |
| CRDB_BLOCKED_COMMANDS | No | Commands to block |
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connectA | Connect to the CockroachDB cluster. |
| disconnectA | Disconnect from the CockroachDB cluster. |
| cluster_statusA | Get the health status of the CockroachDB cluster. |
| execute_queryB | Execute a SQL query. |
| validate_queryA | Check if a query is safe to execute without running it. |
| explain_queryA | Get the execution plan for a query. |
| list_databasesA | List all databases in the cluster. |
| list_schemasB | List schemas in the current database. |
| list_tablesA | List all tables in the database. |
| describe_tableA | Get detailed column information for a table. |
| get_table_statsB | Get statistics for a table. |
| get_foreign_keysC | Get foreign key constraints for a table. |
| read_rowsB | Read rows from a table. |
| insert_rowB | Insert a new row into a table. |
| update_rowB | Update an existing row by primary key. |
| delete_rowA | Delete a row by primary key. |
| upsert_rowB | Insert or update a row (UPSERT). |
| switch_databaseB | Switch the active database context. |
| begin_transactionB | Begin a database transaction. |
| commit_transactionB | Commit the current transaction. |
| rollback_transactionB | Rollback the current transaction. |
| list_nodesA | List all nodes in the CockroachDB cluster. |
| node_statusB | Get detailed status for a node. |
| show_regionsB | Show database regions for multi-region clusters. |
| show_jobsC | Show background jobs in the cluster. |
| show_sessionsB | Show active sessions in the cluster. |
| show_statementsB | Show active statements in the cluster. |
| cancel_queryB | Cancel a running query. |
| show_rangesC | Show range distribution in the cluster. |
| show_zone_configC | Show zone configurations. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bpamiri/cockroachdb-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server