CockroachDB MCP Server
by Swayingleaves
This is a CockroachDB MCP server for Cursor, implemented based on the Model Context Protocol (MCP) specification. It allows you to interact directly with a CockroachDB database within Cursor.
Last updated: N/A
What is CockroachDB MCP Server?
The CockroachDB MCP Server is a bridge between the Cursor code editor and a CockroachDB database, enabling direct database interaction within the editor using the Model Context Protocol (MCP).
How to use CockroachDB MCP Server?
Install the server using Smithery or manually by cloning the repository, installing dependencies, and configuring Cursor to use the server with the provided configuration. Use the provided MCP functions like connect_database
, execute_query
, and get_tables
to interact with the database.
Key features of CockroachDB MCP Server
Connect to CockroachDB database
Get all tables and their structure
Execute SQL queries
Provide database status resources
Provide SQL query templates
Automatic reconnection mechanism
Connection keep-alive mechanism
Graceful process exit handling
Detailed logging for troubleshooting
Support manual disconnection
Use cases of CockroachDB MCP Server
Executing SQL queries directly from Cursor
Retrieving table schemas for code generation
Monitoring database connection status
Using SQL query templates for common tasks
Building applications that interact with CockroachDB
FAQ from CockroachDB MCP Server
How do I connect to the database?
How do I connect to the database?
Use the connect_database
MCP function with the correct JDBC URL, username, and password.
Where are the server logs located?
Where are the server logs located?
Server logs are saved in the logs/cockroachdb_mcp.log
file.
What happens if the connection is lost?
What happens if the connection is lost?
The server has an automatic reconnection mechanism to ensure connection stability.
How do I disconnect from the database manually?
How do I disconnect from the database manually?
Use the disconnect_database
MCP function.
What do I do if I encounter connection problems?
What do I do if I encounter connection problems?
Check the log file for detailed error messages and ensure the CockroachDB server is running and accessible.