CLI for interacting with a CRDB-backed Model Context Protocol server
Project description
cockroachdb-mcp-client
A developer-friendly, model-provider-agnostic CLI tool for working with Model Context Protocol servers — built specifically for use with CockroachDB backends.
🧠 What This Is
cockroachdb-mcp-client is a spec-aligned, CLI-first interface for creating, managing, exporting, and running Model Context Protocol resources.
It works with cockroachdb-mcp-server, a FastAPI-based MCP implementation backed by CockroachDB. Together, they offer:
- A reliable MCP context registry (server)
- A CLI for simulation, LLM runs, and batch workflows (client)
✅ Feature Highlights
- 🌱 MCP-spec-compliant context management (create, list, get, delete)
- 📦 Export individual or all contexts to YAML or JSON
- 🔁 Run contexts against real LLMs (OpenAI, Anthropic, etc.)
- 💬 Supports streaming, retry, model override
- 📚 Batch simulation of inputs
- ⚙️ Reads config from
~/.config/cockroachdb-mcp-client/config.yamlor env vars - 🧱 Extensible provider system (Claude, GPT-4, Mistral, etc.)
- 📈 Configurable logging per command (
--log-level)
🚀 Quickstart
📦 Install from PyPI
pip install cockroachdb-mcp-client
🛠 Or install from source
git clone https://github.com/viragtripathi/cockroachdb-mcp-client
cd cockroachdb-mcp-client
pip install -e .
You’ll also need a running instance of
cockroachdb-mcp-server
🔐 Configuration Options
✅ Environment Variables (preferred for CI and scripting)
| Variable | Description |
|---|---|
MCP_SERVER_URL |
Base URL for the MCP server |
MCP_API_TOKEN |
Bearer token for protected endpoints |
OPENAI_API_KEY |
API key for OpenAI LLMs |
ANTHROPIC_API_KEY |
API key for Anthropic Claude LLMs |
export MCP_SERVER_URL=http://localhost:8081
export OPENAI_API_KEY=sk-...
🗂 ~/.config/cockroachdb-mcp-client/config.yaml (alternative for local/dev)
server: http://localhost:8081
openai:
api_key: sk-...
anthropic:
api_key: your-anthropic-key
✅ Env vars take precedence over config file.
🧪 CLI Commands
# Show version and top-level help
cockroachdb-mcp-client --version
cockroachdb-mcp-client --help
# Create a context
cockroachdb-mcp-client create context --file summarizer.yaml
# List all contexts
cockroachdb-mcp-client list contexts
# Get or delete a context
cockroachdb-mcp-client get context <uuid>
cockroachdb-mcp-client delete context <uuid> -y
# Export one or all
cockroachdb-mcp-client export context <uuid> --file out.yaml
cockroachdb-mcp-client export all --output-dir exported_contexts/
# Run a single input
cockroachdb-mcp-client run context --provider openai --file context.yaml --input "Summarize this article"
# Simulate a batch of inputs
cockroachdb-mcp-client simulate context \
--provider anthropic \
--file summarizer.yaml \
--inputs inputs.txt
🧰 Logging
Enable structured logging with:
cockroachdb-mcp-client create context --file ctx.yaml --log-level DEBUG
♻️ Retry Logic
All network operations (GET, POST, DELETE) retry up to 3 times with 2s backoff using tenacity.
💡 Error Feedback Example
On connection failure:
❌ Failed to connect to MCP server at http://localhost:8081
🔧 Is the server running? Start it with:
cockroachdb-mcp-server serve --init-schema
🌍 To override the server URL:
--server http://localhost:8081
OR
export MCP_SERVER_URL=http://localhost:8081
🙌 Contributions
This project is open for internal and public usage.
If you want to support additional providers, improve UX, or standardize context specs, contributions are welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cockroachdb_mcp_client-0.1.0.tar.gz.
File metadata
- Download URL: cockroachdb_mcp_client-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d294ccf9d5dd4db69a35f26e454ffd911f1bbffc0c53342e5c843764aca47f3e
|
|
| MD5 |
e1c6d3f6bb3152ff59957f55c65439bd
|
|
| BLAKE2b-256 |
d765c2544c8cf5f85c460972b5edb2609dcc593954ef1dd964579da82abb2322
|
File details
Details for the file cockroachdb_mcp_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cockroachdb_mcp_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e84a1a933c65699223e0285254b326b9f007d74a7b1a05e22bbcf1c353bebf5
|
|
| MD5 |
7311bb157e2bf93c77f5cc96a1bad7ad
|
|
| BLAKE2b-256 |
f547944107b8324359dc12154e96ab647f241bbda3beda012a2127ac4608085d
|