Cloudera Manager MCP stdio server for inspecting and operating Cloudera Manager clusters via MCP.
This is a Model Context Protocol (MCP) stdio server that integrates with the Cloudera Manager REST API for cluster and service inspection and basic lifecycle actions.
Tool names are dot‑free (cm_read_*, cm_write_*) for broad MCP client compatibility. Legacy dotted names still work if called directly.
Read tools
cm_read_get_api_infocm_read_list_clusterscm_read_list_servicescm_read_list_commandscm_read_get_commandcm_read_list_parcels(supportsview;limit/offsetapplied client‑side)cm_read_get_parcels_usage(no paging supported by CM)
Write tools
cm_write_service_command(start/stop/restart) — requiresALLOW_WRITES=truecm_write_inspect_hosts— triggers/cm/commands/inspectHosts; requiresALLOW_WRITES=true
- Node.js >= 18 (uses global
fetch)
-
Clone the repo and enter it:
git clone https://github.com/opensourceops/cloudera-manager-mcp cd cloudera-manager-mcp -
Install dependencies:
npm install
-
Configure environment variables:
CLDR_CM_BASE_URL(e.g.,https://cm-host:7183)CLDR_CM_USERNAMECLDR_CM_PASSWORDCLDR_CM_API_VERSION(optional, e.g.,v49). If not set, the server probes/api/versionand caches it.CLDR_CM_VERIFY_SSL(optional, default:true)ALLOW_WRITES(optional, default:false) — enables write tools
-
Build and run:
npm run build npm start
During development:
npm run devAfter building, add this MCP server to Codex:
codex mcp add cloudera-manager-mcp \
--env CLDR_CM_BASE_URL=<CM_BASE_URL> \
--env CLDR_CM_USERNAME=<CM_USERNAME> \
--env CLDR_CM_PASSWORD=<CM_PASSWORD> \
--env CLDR_CM_API_VERSION=<CM_API_VERSION> \
--env CLDR_CM_VERIFY_SSL=true \
--env ALLOW_WRITES=true \
-- node dist/server.js- The server calls the CM REST API directly using HTTP Basic authentication on each request (no cookie jar required).
- For metrics/events/parcels and streaming command updates, additional tools will be added incrementally.
Configure env vars as above, then run:
npm run smoke:readThis prints API info, clusters (summary view), and services for the first cluster if present, exercising the same client used by the read tools.