Sponsored by Deepsite.site

Cloudera AI MCP

Created By
Adrien Chenailler8 months ago
Interact with cloudera AI api to manage job, apps, models
Content

Cloudera ML Model Control Protocol (MCP)

This MCP implements a Python-based integration with Cloudera Machine Learning, allowing Claude to interact with CML services programmatically.

Features

  1. Upload Folders: Upload entire folders to your CML project while preserving directory structure
  2. Create Jobs: Create new CML jobs with customizable settings
  3. List Jobs: View all jobs in your project with their current status
  4. Delete Jobs: Remove individual jobs or all jobs in a project
  5. Get Project ID: Retrieve project ID from a project name
  6. List Project Files: View files and directories in your project
  7. Model Management: Create, list, and manage ML models and deployments
  8. Experiment Tracking: Log and manage ML experiments and runs
  9. Application Management: Create, update, and manage CML applications

Installation

  1. Clone this repository
  2. Install dependencies:
    pip install -r requirements.txt
    

Configuration

The MCP requires the following configuration:

  1. host: Your CML instance URL (e.g., "https://ml-xxxx.cloudera.site")
  2. api_key: Your API key for authentication
  3. project_id: Your CML project ID (optional - you can now get it by project name)

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"

URL Configuration Notes

  • The host URL should not include duplicate "https://" prefixes
  • Trailing slashes are automatically handled
  • The MCP will automatically format URLs correctly

Running the MCP Server

This MCP can be run as a server that allows Claude to interact with Cloudera ML.

Set up the environment

Copy the example .env file and add your credentials:

cp .env.example .env
# Edit .env with your credentials

Start the server

./server.py

The server uses the stdio transport by default, which allows it to connect directly to Claude.

Usage with Claude Desktop

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.

Using in Your Own Python Code

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"]
)

Command-line Testing

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 project
  • upload_folder - Upload a folder to the project
  • create_job - Create a new job
  • delete_job - Delete a specific job
  • delete_all_jobs - Delete all jobs in the project
  • get_project_id - Get project ID from a project name (--project-name required)
  • list_project_files - List files in a project
  • list_models - List ML models in a project
  • list_model_deployments - List model deployments
  • list_experiments - List experiments in a project
  • list_job_runs - List job runs

Example: Listing Project Files

./run_mcp.py --host "https://ml-xxxx.cloudera.site" --api-key "your-api-key" list_project_files --project-id "your-project-id"

Requirements

  • Python 3.8+
  • requests
  • pathlib
  • python-dotenv
  • mcp[cli]

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code