CML
- python
2
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"yw449-cloudera-cml-mcp-server": {
"command": "python3",
"args": [
"cml_mcp_server.py"
],
"env": {
"CML_CERT_FILE": "/path/to/your/certificate.pem",
"CLOUDERA_ML_HOST": "https://your-cml-instance.cloudera.com",
"CLOUDERA_ML_API_KEY": "your_api_key_here"
}
}
}
}This MCP server lets you interact with Cloudera Machine Learning (CML) from a local or containerized environment. It exposes a set of MCP tools to manage projects, files, jobs, and runtime addons, enabling automation and integration with your CML workspace.
How to use
You run the MCP server locally and connect to your CML instance using an MCP client or automation script. Start the server with one of the runnable commands below, then use the available MCP tools to manage projects, files, jobs, and runtime addons. You can also configure environment credentials to keep sensitive information out of command lines.
How to install
Prerequisites you need before installing the MCP server:
- Python 3.8 or later
- pip (for Python package installation)
- an MCP client or automation tool for interacting with the server
Install the required Python packages for MCP integration.
pip install mcp[cli] requests
Optionally, you can run installation commands via the uv wrapper for isolated environments.
uv pip install mcp[cli] requests
Set up environment variables to point to your CML instance and credentials. You can use traditional environment variables or MCP configuration variables.
# Traditional environment variables
export CML_API_TOKEN="your_api_token_here"
export CML_BASE_URL="https://your-cml-instance.cloudera.com"
# MCP configuration environment variables (preferred)
export CLOUDERA_ML_API_KEY="your_api_token_here"
export CLOUDERA_ML_HOST="https://your-cml-instance.cloudera.com"
# Certificate path (optional)
export CML_CERT_FILE="/path/to/your/certificate.pem"
If you use a self-signed certificate, download the SSL certificate from your CML server and save it locally as a trusted CA bundle before starting the MCP server.
python download_certificate.py
Start the MCP server using one of the supported runtimes. The examples below show the common ways to run the script and expose the MCP endpoints.
# Using standard Python
python3 cml_mcp_server.py
# Using uv
uv run cml_mcp_server.py
# Using uvx
uvx cml_mcp_server.py
If you want to see all configuration options and usage details, run the help command after the server script is present.
python3 cml_mcp_server.py --help
You can also customize the start parameters directly, for example by providing the API key, host URL, and certificate path on the command line (when supported by the server).
python3 cml_mcp_server.py --token "your_api_token" --url "https://your-cml-instance.cloudera.com" --cert "/path/to/your/certificate.pem"
Configuration and security
The server supports two ways to configure credentials. Use MCP-specific environment variables for clean separation from application code, or rely on traditional environment variables if you prefer. Store sensitive values in secure environments and avoid embedding secrets directly in scripts.
Supported MCP environment variables (examples shown):
# MCP configuration environment variables
export CLOUDERA_ML_API_KEY="your_api_token_here"
export CLOUDERA_ML_HOST="https://your-cml-instance.cloudera.com"
# Optional certificate path for TLS validation
export CML_CERT_FILE="/path/to/your/certificate.pem"
Examples and notes
Direct usage to list projects without starting the MCP server is possible if you have a direct script or client prepared, for example to perform ad-hoc operations against your CML workspace.
Tools and capabilities you can access through the MCP server
This MCP server exposes a comprehensive set of tools to manage your CML environment. You can perform project management, file operations, job orchestration, and runtime addon discovery. See the list of core capabilities below to plan your automation.
Available tools
list_projects
List all CML projects the user has access to
create_project
Create a new CML project
get_project
Get details of a specific CML project
list_files
List files in a CML project at a specified path
read_file
Read the contents of a file from a CML project
upload_file
Upload a file to a CML project
rename_file
Rename a file in a CML project
patch_file
Update file metadata (rename, move, or change attributes)
list_jobs
List all jobs in a CML project
create_job
Create a new job in a CML project
create_job_from_file
Create a job from an existing file in a CML project
run_job
Run a job in a CML project
list_job_runs
List all runs for a job in a CML project
stop_job_run
Stop a running job in a CML project
schedule_job
Schedule a job to run periodically using a cron expression
list_runtime_addons
List all available runtime addons (e.g., Spark3, GPU)
download_ssl_cert
Download the SSL certificate from the CML server