
Cloudera ML
STDIOPython MCP server for Cloudera Machine Learning platform integration and automation
Python MCP server for Cloudera Machine Learning platform integration and automation
This MCP implements a Python-based integration with Cloudera Machine Learning, allowing Claude to interact with CML services programmatically.
pip install -r requirements.txt
The MCP requires the following configuration:
You can provide this configuration in code when initializing the MCP, or use environment variables:
export CLOUDERA_ML_HOST="https://ml-xxxx.cloudera.site" export CLOUDERA_ML_API_KEY="your-api-key" # Optional: export CLOUDERA_ML_PROJECT_ID="your-project-id"
This MCP can be run as a server that allows Claude to interact with Cloudera ML.
Copy the example .env file and add your credentials:
cp .env.example .env # Edit .env with your credentials
./server.py
The server uses the stdio transport by default, which allows it to connect directly to Claude.
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json
:
{ "mcpServers": { "cloudera-ml-mcp-server": { "command": "python", "args": [ "/path/to/MCP_cloudera/server.py" ], "env": { "CLOUDERA_ML_HOST": "https://ml-xxxx.cloudera.site", "CLOUDERA_ML_API_KEY": "your-api-key" } } } }
Replace /path/to
with your path to this repository and set the environment variables.
You can also import and use the MCP in your own Python code:
from MCP_cloudera.src import ClouderaMCP # Initialize the MCP config = { "host": "https://ml-xxxx.cloudera.site", "api_key": "your-api-key" } cloudera = ClouderaMCP(config) # Get project ID by name project_info = cloudera.get_project_id(project_name="my-project-name") project_id = project_info["project_id"] print(f"Project ID: {project_id}") # List project files files = cloudera.list_project_files(project_id=project_id) print(files) # Upload a folder result = cloudera.upload_folder( folder_path="/path/to/local/folder", ignore_folders=["node_modules", ".git"] )
You can test the MCP functions from the command line using the provided script:
./run_mcp.py [--host HOST] [--api-key API_KEY] [--project-id PROJECT_ID] COMMAND [command options]
Where COMMAND
is one of:
list_jobs
- List all jobs in the projectupload_folder
- Upload a folder to the projectcreate_job
- Create a new jobdelete_job
- Delete a specific jobdelete_all_jobs
- Delete all jobs in the projectget_project_id
- Get project ID from a project name (--project-name
required)list_project_files
- List files in a projectlist_models
- List ML models in a projectlist_model_deployments
- List model deploymentslist_experiments
- List experiments in a projectlist_job_runs
- List job runs./run_mcp.py --host "https://ml-xxxx.cloudera.site" --api-key "your-api-key" list_project_files --project-id "your-project-id"
MIT