For the complete documentation index, see llms.txt. This page is also available as Markdown.

CockroachDB

CockroachDB REST and MCP via pREST β€” PostgreSQL wire-compatible, with a documented support matrix and known dialect differences.

pREST can expose CockroachDB through the Native PostgreSQL adapter because CockroachDB implements the PostgreSQL wire protocol. Treat support as Certified (PG wire) with the matrix below β€” not identical to community PostgreSQL in every dialect detail.

Last updated: July 11, 2026 Β· Label: Certified (PostgreSQL wire)


Supported features

Capability
Status

Connection

supported (PG connection string / port)

Schema discovery

supported (validate against your CRDB version)

CRUD

supported for standard table operations

Filtering / ordering / pagination

supported

Transactions

supported with CockroachDB transaction semantics

Scripts (/_QUERIES)

supported for SQL accepted by CockroachDB

MCP (/_mcp)

supported (v2.1.0+) when catalog/query paths succeed

ACL / permissions

supported (pREST ACL layer)


Connection

Default CockroachDB SQL port is often 26257:

export PREST_VERSION=2
export PREST_PG_URL='postgres://root@localhost:26257/defaultdb?sslmode=disable'

For secure clusters, use TLS settings required by your deployment (sslmode=verify-full, client certs, etc.).

Docker smoke example (illustrative):

Adjust host networking for your OS/Docker setup.


CRUD example

REST (Representational State Transfer) maps HTTP verbs to CRUD on SQL tables at /{database}/{schema}/{table} β€” API Reference.


MCP

MCP (Model Context Protocol) is an open standard for connecting AI apps and agents to tools and data. Point MCP clients at the same prestd /_mcp endpoint β€” MCP over HTTP. Prefer a read-only DB role for agent traffic.


Known limitations / incompatibilities

  • Not every PostgreSQL extension or catalog quirk exists in CockroachDB.

  • Some PostgreSQL-specific SQL (types, functions, RETURNING edge cases, advanced DDL) may fail; use custom queries only when CockroachDB accepts the SQL.

  • Serial/identity and migration patterns differ from PostgreSQL β€” design schemas with CockroachDB docs in mind.

  • Run your own integration checks before production; Phase 1 certification means documented use of the PG adapter, not a claim of 100% PostgreSQL parity.


Last updated