1. Conduid
  2. Developer Tools
  3. CockroachDB MCP Server
MCP server · Developer Tools

CockroachDB MCP Server

Model Context Protocol (MCP) server for CockroachDB

Unclaimed MIT last commit a year ago data
54Fair

Scored 21 days ago · breakdown

About CockroachDB MCP Server

CockroachDB MCP Server is an MCP server published by viragtripathi in the Developer Tools category: model Context Protocol (MCP) server for CockroachDB. It has been installed 0 times through Conduid.

Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx cockroachdb-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about CockroachDB MCP Server

Powered by Claude · Grounded in docs

I know everything about CockroachDB MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.2.2v0.2.2
v0.2.1v0.2.1
v0.2.0v0.2.0

README

cockroachdb-mcp-server

PyPI Python License CI MCP Compatible

A Model Context Protocol (MCP) server implemented in Python using FastAPI and CockroachDB.


🧠 What This Is

cockroachdb-mcp-server is a production-grade, spec-aligned MCP server that:

  • Implements the Model Context Protocol
  • Uses CockroachDB as a resilient, SQL-compatible backend
  • Exposes full CRUD APIs for managing model contexts
  • Stores context definitions as JSONB, allowing arbitrary input/output schema
  • Works seamlessly with the cockroachdb-mcp-client CLI

✅ Feature Highlights

  • ✅ REST API for MCP context management (/contexts)
  • ✅ Schema bootstrapping via CLI flag or env var
  • ✅ CRDB URL auto-detection and dialect fix
  • ✅ Structured logging and configurable log level
  • ✅ Ready for /run, /deploy, /evaluate extensions

🚀 Quickstart

📦 Install from PyPI

pip install cockroachdb-mcp-server

🏃 Run with schema init

cockroachdb-mcp-server serve --init-schema --log-level INFO

Or:

export MCP_AUTO_INIT_SCHEMA=true
cockroachdb-mcp-server serve

Server runs at http://localhost:8081 by default


🔧 CLI Usage

cockroachdb-mcp-server serve --init-schema
cockroachdb-mcp-server serve --port 8081 --host 127.0.0.1 --reload
cockroachdb-mcp-server --version

🔐 Configuring the Database

✅ Set the CRDB_URL environment variable

export CRDB_URL="postgresql://root@localhost:26257/defaultdb?sslmode=disable"

Automatically rewritten to cockroachdb://... under the hood for compatibility.

Alternatively, set it directly:

export CRDB_URL="cockroachdb://root@localhost:26257/defaultdb?sslmode=disable"

✅ Both formats are supported.


🧪 API Endpoints

Method Path Description
POST /contexts Create a context
GET /contexts List all contexts
GET /contexts/{id} Get context by ID
PUT /contexts/{id} Update context
DELETE /contexts/{id} Delete context

📘 View full API reference →

📘 View hosted API Docs


🧱 Schema Auto-Bootstrap

Run this manually:

cockroachdb-mcp-server serve --init-schema

Or automatically with:

export MCP_AUTO_INIT_SCHEMA=true

The schema created is:

CREATE TABLE IF NOT EXISTS mcp_contexts (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  context_name STRING NOT NULL,
  context_version STRING NOT NULL,
  body JSONB NOT NULL,
  created_at TIMESTAMP DEFAULT now()
);

🔗 Related Projects

  • cockroachdb-mcp-client: CLI tool to manage MCP contexts, simulate LLM runs, export, and batch simulate across providers.

🙌 Contributions

This project is designed for internal and community use.

PRs welcome to extend functionality (auth, deployment support, /evaluate, telemetry, etc.).

README mirrored from the source repository 21 days ago. The original is authoritative.

Questions

About CockroachDB MCP Server

How do I install CockroachDB MCP Server?

Run npx cockroachdb-mcp-server, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is CockroachDB MCP Server safe to use with an AI agent?

Its trust score is 54 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is CockroachDB MCP Server still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.