You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An MCP (Model Context Protocol) server that enables AI agents to interact with Red Hat OpenShift AI (RHOAI) environments. This server replicates the capabilities of the OpenShift AI Dashboard through programmatic tools.
Features
Project Management: Create, list, and manage Data Science Projects
Workbench Operations: Create, start, stop, and delete Jupyter workbenches
Model Serving: Deploy and manage InferenceServices with KServe
Data Connections: Manage S3 credentials for data access
Pipelines: Configure Data Science Pipelines infrastructure
Storage: Create and manage persistent volume claims
Technology Stack
Component
Technology
Purpose
Runtime
Python 3.10+
Core language
MCP Framework
FastMCP 1.0+
Model Context Protocol server
Kubernetes Client
kubernetes-python 28.1+
Cluster API interactions
Data Validation
Pydantic 2.0+
Type-safe models and settings
HTTP Client
httpx 0.27+
Async HTTP requests
Container Base
Red Hat UBI 9
Production container image
Package Manager
uv
Fast Python dependency management
Installation
Using uv (recommended)
# Clone the repository
git clone https://github.com/admiller/rhoai-mcp-prototype.git
cd rhoai-mcp-prototype
# Install dependencies
uv sync
# Run the server
uv run rhoai-mcp
Using pip
pip install -e .
rhoai-mcp
Using Container (Podman/Docker)
# Build the image
make build
# Run with HTTP transport
make run-http
# Run with STDIO transport (interactive)
make run-stdio
# Run with debug logging
make run-dev
Or run directly without Make:
# Build
podman build -f Containerfile -t rhoai-mcp:latest .# Run with HTTP transport
podman run -p 8000:8000 \
-v ~/.kube/config:/opt/app-root/src/kubeconfig/config:ro \
-e RHOAI_MCP_AUTH_MODE=kubeconfig \
-e RHOAI_MCP_KUBECONFIG_PATH=/opt/app-root/src/kubeconfig/config \
rhoai-mcp:latest --transport sse
# Run with STDIO transport
podman run -it \
-v ~/.kube/config:/opt/app-root/src/kubeconfig/config:ro \
-e RHOAI_MCP_AUTH_MODE=kubeconfig \
-e RHOAI_MCP_KUBECONFIG_PATH=/opt/app-root/src/kubeconfig/config \
rhoai-mcp:latest --transport stdio
Available Make targets:
Target
Description
make build
Build the container image
make run-http
Run with SSE transport on port 8000
make run-streamable
Run with streamable-http transport
make run-stdio
Run with STDIO transport (interactive)
make run-dev
Run with debug logging
make run-token
Run with token auth (requires TOKEN and API_SERVER)
make stop
Stop the running container
make logs
View container logs
make clean
Remove container and image
Kubernetes Deployment
For in-cluster deployment, apply the Kubernetes manifests:
# stdio (default) - for Claude Desktop and similar toolsexport RHOAI_MCP_TRANSPORT=stdio
# HTTP transportsexport RHOAI_MCP_TRANSPORT=sse
export RHOAI_MCP_HOST=127.0.0.1
export RHOAI_MCP_PORT=8000
Safety Settings
# Enable delete operations (disabled by default)export RHOAI_MCP_ENABLE_DANGEROUS_OPERATIONS=true
# Read-only mode (disable all write operations)export RHOAI_MCP_READ_ONLY_MODE=true
Safety Features Summary
Feature
Description
Default
Read-Only Mode
Disables all create/update/delete operations
Off
Dangerous Operations Gate
Delete operations require explicit enablement
Disabled
Confirmation Pattern
Delete tools require confirm=True parameter
Required
Credential Masking
S3 secret keys are masked in all responses
Always
RBAC-Aware
Uses OpenShift Projects API to respect user permissions
Always
Auth Validation
Validates authentication configuration at startup
Always
Usage with Claude Desktop
Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json):
User: Create a new data science project called "fraud-detection" for my ML experiments
Agent: I'll create that project for you with a descriptive display name.
[Calls create_data_science_project with name="fraud-detection",
display_name="Fraud Detection ML", description="Machine learning experiments for fraud detection"]
Result: Project 'fraud-detection' created successfully
Deploy a Model
User: Deploy my trained fraud model from S3 to the fraud-detection project
Agent: I'll deploy your model. First, let me check available serving runtimes.
[Calls list_serving_runtimes with namespace="fraud-detection"]
[Calls deploy_model with name="fraud-model", namespace="fraud-detection",
runtime="ovms", model_format="onnx",
storage_uri="s3://models/fraud-detection/model.onnx"]
Result: Model 'fraud-model' deployment initiated. It may take a few minutes to become ready.
Check Project Status
User: What's the status of my fraud-detection project?
Agent: [Calls get_project_status with namespace="fraud-detection"]
Result:
- Project: fraud-detection (Fraud Detection ML)
- Workbenches: 2 total, 1 running
- Models: 1 deployed, 1 ready
- Pipeline Server: Ready
- Data Connections: 1
- Storage: 3 PVCs
Development
Running Tests
# Install dev dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=rhoai_mcp
Code Quality
# Format code
uv run ruff format
# Lint
uv run ruff check
# Type check
uv run mypy src/rhoai_mcp