mcp-cockroachdb
The CockroachDB MCP Server is a natural language interface designed for agentic applications to manage, monitor and query data in CockroachDB.
claude mcp add --transport stdio amineelkouhen-mcp-cockroachdb uvx --from git+https://github.com/amineelkouhen/mcp-cockroachdb.git@0.1.0 cockroachdb-mcp-server --url postgresql://localhost:26257/defaultdb
How to use
This CockroachDB MCP Server provides a natural language interface that lets LLMs and agents interact with a CockroachDB cluster through the MCP (Model Content Protocol). It supports cluster monitoring, database operations, table management, and a query engine. Users can issue natural language requests such as checking node health, listing databases, creating tables, running SQL queries, and retrieving query plans. The server is designed to work with MCP clients (e.g., Claude Desktop, Cursor) and can be driven either via the uvx entry point or directly by vegetation through the main Python entry point in development setups. To start using it, run the MCP server with uvx (or your preferred transport) and connect your MCP client to the exposed endpoints, then craft prompts that map to the provided tool categories like Cluster Monitoring, Database Operations, Table Management, and Query Engine.
How to install
Prerequisites:
- Python 3.13+ (as indicated by the project)
- git
- uv (the Python environment tool used by this MCP server) or an environment compatible with uvx
Installation steps:
-
Quick start (via uvx):
- Ensure Python is installed and accessible in your PATH.
- Install uvx as described in the project instructions (typically via pipx or pip with uv).
- Run the MCP server using the example command from the README: uvx --from git+https://github.com/amineelkouhen/mcp-cockroachdb.git cockroachdb-mcp-server --url postgresql://localhost:26257/defaultdb
-
Development installation (clone and install dependencies):
- git clone https://github.com/amineelkouhen/mcp-cockroachdb.git
- cd mcp-cockroachdb
- uv venv
- source .venv/bin/activate
- uv sync
- uv run cockroachdb-mcp-server --help
- Or run the main file directly (uses environment variables): uv run src/main.py
-
Configuration for clients (example provided for Claude Desktop):
- Prepare the client config JSON (see README example) to point to the uvx command path and pass the necessary environment variables for CockroachDB credentials.
Prerequisites recap:
- Access to a CockroachDB instance (local or remote) with appropriate credentials
- A client capable of MCP (Claude Desktop, Cursor, etc.)
- Network access between the MCP server and the CockroachDB instance
Additional notes
Tips and common issues:
- Transport support: The server in this setup supports stdio and streamable-http transports. Choose the one that fits your MCP client.
- If you run locally for development, you may need to adapt environment variables for CRDB settings (host, port, database, user, password, TLS settings).
- When running from Git, ensure you’re using a tagged release if you want stability; the main branch may contain breaking changes.
- For Claude Desktop integration, fill in the sample claude_desktop_config.json with your uvx path and the correct main.py path, and be sure to provide your CockroachDB credentials and TLS config if required.
- If you encounter connection issues, verify that the CockroachDB URL, host, port, database, and credentials match what the server expects, and check firewall rules.
- For production usage, consider securing TLS certificates and using proper CA paths and client certificates as needed.
Related MCP Servers
PPTAgent
An Agentic Framework for Reflective PowerPoint Generation
mcp-redis
The official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
mcp-aktools
📈 提供股票、加密货币的数据查询和分析功能MCP服务器
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
mcp-tool-kit
Agentic abstraction layer for building high precision vertical AI agents written in python for Model Context Protocol.
mem0
✨ mem0 MCP Server: A memory system using mem0 for AI applications with model context protocl (MCP) integration. Enables long-term memory for AI agents as a drop-in MCP server.