LabscoMCP early access ↗
SwayingleavesMCP SERVER

CockroachDB

Query a CockroachDB cluster and read its schema from inside Cursor or Claude.

by Swayingleaves ↗Relational SQL DatabasesCommunity

LABSCO SUMMARY

A CockroachDB session that survives the conversation.

Schema reads and query execution are the whole job, and the reconnection and keep-alive behaviour is what makes it usable across a long conversation rather than only the first few minutes. Whatever the connected database user can do, the assistant can do.

What it is

A Python MCP server for CockroachDB. It connects over a JDBC URL, lists tables, returns table structure and executes SQL, with automatic reconnection and a keep-alive so a long session does not drop, plus database status resources and SQL query templates.

What you get

  • A connection opened from a JDBC URL, username and password (connect_database), or established as soon as the client attaches (initialize_connection)
  • Every table in the database listed (get_tables)
  • One table's structure returned in full (get_table_schema)
  • SQL executed against the cluster (execute_query)
  • A manual disconnect when you want the connection closed (disconnect_database)
  • Automatic reconnection and a keep-alive, so an idle session does not time out
  • Database status exposed as a resource, plus SQL query templates and detailed logging

Requirements

Python with the repo's requirements and uv, run from a clone. The JDBC URL, username and password are passed when the assistant calls connect_database, and the grants on that database user decide what any query can do.

Setup effort

Build from source — git clone https://github.com/Swayingleaves/cockroachdb-mcp-server.git