
This is a CockroachDB MCP server for Cursor, implemented based on the Model Context Protocol
This is a CockroachDB MCP server for Cursor, implemented based on the Model Context Protocol (MCP) specification, allowing you to interact directly with CockroachDB database in Cursor.
This is a CockroachDB MCP server for Cursor, implemented based on the Model Context Protocol (MCP) specification, allowing you to interact directly with CockroachDB database in Cursor.
To install CockroachDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Swayingleaves/cockroachdb-mcp-server --client claudepip install -r requirements.txtcurl -LsSf https://astral.sh/uv/install.sh | sh{
"mcpServers": {
"cockroachdb-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/local/cockroachdb-mcp",
"run",
"server.py"
],
"jdbc_url": "jdbc:postgresql://localhost:26257/defaultdb",
"username": "root",
"password": "root"
}
}
}Connect to CockroachDB database.
Parameters:
jdbc_url: JDBC connection URL (e.g., jdbc:postgresql://localhost:26257/defaultdb)username: Database usernamepassword: Database passwordInitialize database connection, can be called immediately after connecting to the MCP server to establish a database connection.
Parameters:
jdbc_url: JDBC connection URL (e.g., jdbc:postgresql://localhost:26257/defaultdb)username: Database usernamepassword: Database passwordManually disconnect from the database.
No parameters.
Get all tables from the database.
No parameters.
Get structure information of a specified table.
Parameters:
table_name: Table nameExecute SQL query.
Parameters:
query: SQL query statementGet database connection status.
Returns:
"Not connected""Connected - [Database version]""Connection error - [Error message]"SQL query template to help users write SQL queries.
Server logs are saved in logs/cockroachdb_mcp.log file. You can check this file to understand the server's running status and detailed logs.
The log file uses a rotating log mechanism, with each log file maximum size of 10MB and keeping up to 5 backup files to prevent excessive disk space usage.
This server uses psycopg2 to connect directly to CockroachDB database, which automatically handles special characters in usernames and passwords without additional URL encoding. This ensures correct database connection even when passwords contain special characters (such as @, %, &, etc.).
The server is configured with TCP keep-alive mechanism by default to prevent connections from being closed due to long periods of inactivity:
keepalives=1: Enable TCP keepalivekeepalives_idle=30: Send keepalive after 30 seconds of idle timekeepalives_interval=10: Send keepalive every 10 secondskeepalives_count=5: Give up after 5 attemptsIf you encounter problems, please check the log file logs/cockroachdb_mcp.log, which will help you understand the server's running status and potential issues.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add cockroachdb-mcp -- uv --directory /Users/local/cockroachdb-mcp run server.py{
"mcpServers": {
"cockroachdb-mcp": {
"args": [
"--directory",
"/Users/local/cockroachdb-mcp",
"run",
"server.py"
],
"command": "uv"
}
}
}code --add-mcp '{"name":"cockroachdb-mcp","args":["--directory","/Users/local/cockroachdb-mcp","run","server.py"],"command":"uv"}'[mcp_servers.cockroachdb-mcp]
command = "uv"
args = ["--directory", "/Users/local/cockroachdb-mcp", "run", "server.py"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/cockroachdb-mcp-server to learn what the "CockroachDB MCP Server" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
npx -y @smithery/cli install @Swayingleaves/cockroachdb-mcp-server --client claudeThis server runs locally, so we can't read its tool list over the web yet.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/cockroachdb-mcp-server)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "cockroachdb-mcp-server" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.