CockroachDB MCP Server
by MCP-Mirror
This MCP server connects to a CockroachDB instance, exposing database and table schemas as resources. It allows running SQL queries as tools and provides prompts for query analysis.
Last updated: N/A
What is CockroachDB MCP Server?
The CockroachDB MCP Server is a tool that exposes CockroachDB database schemas and allows executing SQL queries through an MCP (Machine Communication Protocol) interface. It provides resources for accessing database and table information, and tools for running queries with execution plan analysis.
How to use CockroachDB MCP Server?
To use the server, clone the repository, install dependencies using pnpm install
, and build the project with npx tsc
. Then, run the server using node dist/server.js postgres://user:password@host:port/database [auth_token]
. Configure your Claude for Desktop or Cline app by adding the server configuration to their respective configuration files, including the command, arguments (path to the server, database URL, and optional auth token), and restart the application. You can then use example queries to interact with your CockroachDB instance.
Key features of CockroachDB MCP Server
Exposes database and table schemas as resources
Allows executing SQL queries with options for execution plan analysis
Provides access to cluster metadata (nodes)
Integrates with Claude for Desktop and Cline
Supports authentication for accessing admin UI endpoints
Use cases of CockroachDB MCP Server
Analyzing database schemas
Executing SQL queries and debugging them
Retrieving information about CockroachDB cluster nodes
Integrating CockroachDB with AI tools like Claude
Automating database interactions through MCP
FAQ from CockroachDB MCP Server
How do I install the CockroachDB MCP Server?
How do I install the CockroachDB MCP Server?
Clone the repository, install dependencies using pnpm install
, and build the project with npx tsc
.
What command-line arguments does the server require?
What command-line arguments does the server require?
The server requires a database URL and optionally accepts an auth token for accessing admin UI endpoints.
How do I configure the server with Claude for Desktop?
How do I configure the server with Claude for Desktop?
Add your server configuration to the claude_desktop_config.json
file, including the command, arguments, and server name.
What is the auth token used for?
What is the auth token used for?
The auth token is used to access the CockroachDB admin UI API and is required for accessing cluster metadata resources.
What should I do if I encounter connection issues?
What should I do if I encounter connection issues?
Verify your database credentials and ensure the CockroachDB instance is accessible from your machine. Check the server logs for detailed error messages.