cockroachdb-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cockroachdb-mcp-server
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-clientCLI
Related MCP server: TiDB MCP Server
β 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,/evaluateextensions
π Quickstart
π¦ Install from PyPI
pip install cockroachdb-mcp-serverπ Run with schema init
cockroachdb-mcp-server serve --init-schema --log-level INFOOr:
export MCP_AUTO_INIT_SCHEMA=true
cockroachdb-mcp-server serveServer runs at
http://localhost:8081by 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 |
| Create a context |
GET |
| List all contexts |
GET |
| Get context by ID |
PUT |
| Update context |
DELETE |
| Delete context |
π View full API reference β
π View hosted API Docs
π§± Schema Auto-Bootstrap
Run this manually:
cockroachdb-mcp-server serve --init-schemaOr automatically with:
export MCP_AUTO_INIT_SCHEMA=trueThe 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.).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
Related MCP Servers
FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.-- FlicenseBqualityDmaintenanceA Model Context Protocol server that allows executing SELECT queries on TiDB databases, with optional support for INSERT, UPDATE, and DELETE operations when explicitly enabled.16 npm-
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables large language models to access database metadata and perform cross-engine data querying across diverse database ecosystems.1654Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI assistants with persistent semantic memory and knowledge graph capabilities using PostgreSQL and vector embeddings. It enables cross-session storage, hybrid search, and complex relationship tracking for enhanced contextual awareness.12 npm1MIT