cockroachdb-mcp-server
The CockroachDB MCP Server allows for direct interaction with a CockroachDB database within the Cursor tool, implementing the Model Context Protocol. It offers features such as SQL query execution, automatic reconnection, detailed logging, and TCP keep-alive settings to ensure consistent and stable database interaction.
CockroachDB MCP Server
This is a CockroachDB MCP server for Cursor, adhering to the Model Context Protocol (MCP) specification. It allows direct interaction with CockroachDB databases in Cursor.
Features
- Connect to CockroachDB database
- Get all tables and table structures
- Execute SQL queries
- Provide database status resources and SQL query templates
- Automatic reconnection and keep-alive mechanisms
- Graceful exit handling and detailed logging
Installation
- Clone the repository and enter the project directory
- Install dependencies
- Install uv tool
Using in Cursor
Configure using the mcpServers
configuration section in Cursor.
MCP Function Description
Connect, initialize, and disconnect database using various tools. Execute queries and manage database resources effectively.
Logs
Logs are maintained with a rotating log mechanism, supporting up to 5 backup files.
TCP Keep-alive
Implemented to prevent connections from being closed due to inactivity.