Skip to main content
Glama
zz22394
by zz22394
README.md
# cdp-pc — CDP Public Cloud control-plane MCP (read-only)

A [Model Context Protocol](https://modelcontextprotocol.io) server for **monitoring the
Cloudera CDP Public Cloud control plane** in natural language, from any MCP client (Claude
Code, Claude Desktop, …).

It fills a gap: existing Cloudera MCPs cover the data plane (Iceberg/Impala), streaming
(SMM/SSB/NiFi), or private-cloud Cloudera Manager — none cover the **CDP-PC control plane**
(environments / datalake / datahub / DW / DE / ML lifecycle).

**v0.1 is read-only.** Every tool only ever runs `list-` / `describe-` / `get-` verbs —
enforced in code (`cdp.py`), so there is zero risk of mutating a customer environment.

## How it works

Each tool shells out to the installed `cdp` CLI with `--output json` and returns the parsed
result. This reuses your existing CLI install and `~/.cdp/credentials` profiles — no separate
auth, no `cdpcli` library coupling, no text scraping. Built on the official
[`cloudera/minimcp`](https://github.com/cloudera/minimcp) framework.

## Tools

| Tool | `cdp` call | Required arg |
|---|---|---|
| `list_environments` | `environments list-environments` | — |
| `describe_environment` | `environments describe-environment` | `environment_name` |
| `list_datahubs` | `datahub list-clusters` | — |
| `describe_datahub` | `datahub describe-cluster` | `cluster_name` |
| `list_datalakes` | `datalake list-datalakes` | — |
| `describe_datalake` | `datalake describe-datalake` | `datalake_name` |
| `list_dw_clusters` | `dw list-clusters` | — |
| `list_virtual_warehouses` | `dw list-vws` | `cluster_id` (from `list_dw_clusters`) |
| `list_de_services` | `de list-services` | — |
| `list_ml_workspaces` | `ml list-workspaces` | — |
| `whoami` | `iam get-user` | — |

Every tool also takes an optional `profile` (a profile name from `~/.cdp/credentials`,
default `default`).

## Setup

Requires the `cdp` CLI installed and configured (`~/.cdp/credentials`).

```bash
cd cdp-pc-mcp
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
```

## Register in Claude Code

```bash
BASE="$(pwd)"   # run this from the repo root
claude mcp add cdp-pc -s user -e "PYTHONPATH=$BASE/src" -- "$BASE/.venv/bin/python" -m cdp_pc_mcp.stdio_main
```

Then start a new Claude Code session and try: *"list my CDP environments"*,
*"what datahubs do I have and their status"*, *"describe environment my-cdp-env"*.

## Quick self-test (no MCP client)

```bash
. .venv/bin/activate && export PYTHONPATH="$PWD/src"
python -c "from cdp_pc_mcp.cdp import run_cdp; print(run_cdp('iam','get-user')['user']['email'])"
```

## Roadmap (v0.2+)

- Operations with guardrails: start/stop environment·datahub·ml, DW scaling
- HTTP transport for packaged customer delivery
- Richer diagnostics; packaging for contribution to the `cloudera` org