CockroachDB MCP Server
@Swayingleaves
About CockroachDB MCP Server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"cockroachdb-mcp-server-swayingleaves": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@Swayingleaves/cockroachdb-mcp-server",
"--client",
"claude"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is CockroachDB MCP Server?
CockroachDB MCP Server is an MCP server for Cursor that allows direct interaction with a CockroachDB database. It implements the Model Context Protocol (MCP) specification, providing tools, resources, and prompts for database operations.
How to use CockroachDB MCP Server?
Install dependencies with pip install -r requirements.txt and install uv via the official install script. Configure the server in Cursor by adding a JSON entry under mcpServers with the command uv, its arguments pointing to the server directory, and the JDBC URL, username, and password. The server can then be used through Cursor's MCP integration.
Key features of CockroachDB MCP Server
- Connect to and disconnect from CockroachDB databases.
- Retrieve all tables and table schema information.
- Execute SQL queries directly.
- Provide database status resources and SQL query templates.
- Automatic reconnection and TCP keep-alive mechanisms.
- Detailed rotating logs for troubleshooting.
Use cases of CockroachDB MCP Server
- Query CockroachDB databases interactively from Cursor.
- Browse database tables and their structures without a separate client.
- Execute ad‑hoc SQL queries during development or debugging.
FAQ from CockroachDB MCP Server
How do I connect to a CockroachDB database?
Use the connect_database or initialize_connection tool with the JDBC URL, username, and password.
What if I encounter connection problems?
Check the server log file logs/cockroachdb_mcp.log for details. Common issues include connection refused, authentication failed, and connection timeout.
Does the server handle special characters in passwords?
Yes, it uses psycopg2 which automatically handles special characters such as @, %, and & without requiring additional URL encoding.
How does the server prevent connection timeouts?
The server enables TCP keep‑alive by default: it sends keepalive packets after 30 seconds of idle time, every 10 seconds, and gives up after 5 attempts.
What transport does the server use?
The server runs as a subprocess via the uv command and communicates with Cursor through the MCP stdio transport. Authentication is passed as configuration parameters.
Frequently asked questions
How do I connect to a CockroachDB database?
Use the `connect_database` or `initialize_connection` tool with the JDBC URL, username, and password.
What if I encounter connection problems?
Check the server log file `logs/cockroachdb_mcp.log` for details. Common issues include connection refused, authentication failed, and connection timeout.
Does the server handle special characters in passwords?
Yes, it uses psycopg2 which automatically handles special characters such as `@`, `%`, and `&` without requiring additional URL encoding.
How does the server prevent connection timeouts?
The server enables TCP keep‑alive by default: it sends keepalive packets after 30 seconds of idle time, every 10 seconds, and gives up after 5 attempts.
What transport does the server use?
The server runs as a subprocess via the `uv` command and communicates with Cursor through the MCP stdio transport. Authentication is passed as configuration parameters.
Basic information
More Databases MCP servers
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
ClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.

nuzur
nuzur is a model-first database platform for MySQL and PostgreSQL. The MCP server lets any AI assistant or agent (Claude, Cursor, Gemini, or anything else that speaks MCP) design your schema, query your data, generate mi
Comments