convez.ai
MCP ServerDevOps & InfraestruturaAvançado
kubev2v

OMA Service MCP

kubev2v/oma-service-mcp

MCP server para planejamento de migrações OpenShift com IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que expõe ferramentas de planejamento de migração do OpenShift Migration Advisor (OMA). Funciona como ponte entre assistentes de IA (Claude, Llama, IDEs) e a Migration Planner API, oferecendo acesso de leitura a fontes, avaliações, dimensionamento de clusters, estimativa de migração e análise de complexidade.

Instalação

$npx convez-ai kubev2v/oma-service-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
2
Acompanhando
0
Saúde
25%
Último commit
há 6 dias
Versão
—
Issues abertas
6
Contribuidores
3

Casos de uso

  • Integrar Claude e IDEs (Cursor) com ferramentas de migração OpenShift
  • Analisar complexidade e estimar duração de migrações de vSphere para OpenShift
  • Calcular requisitos de cluster para máquinas virtuais a migrar
  • Acessar inventários, assessments e dados de fontes de migração via IA

Veredito

Ferramenta especializada e bem-arquitetada para operações de migração em ambientes OpenShift, com suporte robusto a múltiplos transportes (HTTP, SSE, stdio) e autenticação. Ideal para equipes de DevOps/SRE que precisam automatizar análises de migração com assistentes de IA.

README

A tradução para o português deste README ainda está na fila.

OMA Service MCP

An MCP (Model Context Protocol) server that exposes migration planning tools for the OpenShift Migration Advisor (OMA). It acts as a bridge between AI assistants (Claude, Llama via lightspeed-stack, IDE integrations) and the Migration Planner API, providing read-only access to sources, assessments, cluster sizing, migration estimation, and complexity analysis.

Architecture

+-----------------+       +------------------+       +---------------------+
|  AI Assistant   | MCP   | OMA Service MCP  | HTTP  | Migration Planner   |
|  (Claude, IDE,  |------>|  (this service)  |------>| API                 |
|   Llama Stack)  |       |  Port 8000       |       | /api/v1/...         |
+-----------------+       +------------------+       +---------------------+

The server supports three transport modes:

TransportUse caseEntry point
streamable-httpProduction with lightspeed-stackoma_service_mcp.src.main
sseServer-Sent Events for compatible clientsoma_service_mcp.src.main (set TRANSPORT=sse)
stdioIDE integration (Cursor, Claude Code)oma_service_mcp.src.stdio

Available MCP Tools

ToolDescription
list_sourcesList all migration sources (discovered vSphere environments)
get_sourceGet detailed info for a specific source (inventory, VMs, clusters)
list_assessmentsList all assessments, optionally filtered by source
get_assessmentGet detailed assessment data including snapshots and inventory
calculate_cluster_requirementsCalculate OpenShift cluster sizing for migrating VMs
calculate_migration_estimationEstimate migration duration with phase breakdown
calculate_migration_complexityAnalyze migration complexity by disk size and OS type

Prerequisites

  • Python >= 3.11
  • uv (package manager)
  • Access to a running Migration Planner API instance

Quick Start

# Install dependencies
make sync

# Copy and configure environment
cp .env.example .env
# Edit .env to set MIGRATION_PLANNER_URL to your instance

# Run the server (HTTP, port 8000)
make run-local

# Or run over stdio (for IDE integration)
make run-stdio

Configuration

All configuration is via environment variables (or .env file):

VariableDefaultDescription
MCP_HOST0.0.0.0Host address for the MCP server
MCP_PORT8000Port number (1024-65535)
TRANSPORTstreamable-httpTransport protocol: streamable-http or sse
MIGRATION_PLANNER_URLhttp://localhost:7443Migration Planner API base URL
AUTH_TYPEnoneAuthentication: none (local dev) or forwarded (production)
LOGGING_LEVELINFOLog level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_TO_FILEtrueWrite logs to oma-service-mcp.log (set false in containers)
LOGGER_NAMEoma-service-mcpLogger name

Authentication

Two modes are supported:

  • none -- No auth headers sent to Migration Planner. Use for local development.
  • forwarded -- Forwards the Authorization: Bearer <token> header from the incoming request to the Migration Planner API. Used in production with lightspeed-stack, which resolves auth from secret files, Kubernetes tokens, or client-provided tokens.

See examples/lightspeed-stack.yaml for integration examples.

IDE Integration

Cursor

A .cursor/mcp.json is included. Adjust the MIGRATION_PLANNER_URL in it to point to your local Migration Planner instance:

{
  "mcpServers": {
    "oma-service-mcp": {
      "command": "uv",
      "args": ["run", "python", "-m", "oma_service_mcp.src.stdio"],
      "cwd": "/path/to/oma-service-mcp",
      "env": {
        "MIGRATION_PLANNER_URL": "http://localhost:7443",
        "AUTH_TYPE": "none"
      }
    }
  }
}

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "oma-service-mcp": {
      "command": "uv",
      "args": ["run", "python", "-m", "oma_service_mcp.src.stdio"],
      "cwd": "/path/to/oma-service-mcp",
      "env": {
        "MIGRATION_PLANNER_URL": "http://localhost:7443",
        "AUTH_TYPE": "none"
      }
    }
  }
}

Running on OpenShift

Build and push the container image

make build                  # Build with podman
make push                   # Push to quay.io/oma/oma-service-mcp

Deploy

# Deploy to current namespace
make deploy

# Or build, push, and deploy in one step
make deploy-image

The deployment includes:

  • ConfigMap (deploy/openshift/configmap.yaml) -- Migration Planner URL and auth type
  • Secret (deploy/openshift/secret.yaml) -- Optional token storage
  • Deployment with health probes on /health
  • Service (ClusterIP on port 8000)
  • Route with TLS edge termination

Operations

make deploy-status          # Check deployment status
make deploy-logs            # Tail pod logs
make deploy-set-config KEY=migration-planner-url VALUE=http://host:7443
make undeploy               # Remove from OpenShift

Development

make sync                   # Install dependencies
make test                   # Run tests
make test-coverage          # Run tests with HTML coverage report
make lint                   # Run ruff linter
make typecheck              # Run mypy type checker
make format                 # Auto-format code
make verify                 # Run all checks (lint + typecheck + test)

Project Structure

oma_service_mcp/
  src/
    main.py                 # HTTP server entry point (uvicorn)
    stdio.py                # Stdio transport entry point (IDE integration)
    api.py                  # Starlette app setup, health endpoint
    mcp_server.py           # MCP server class, tool registration, auth wrapping
    settings.py             # Pydantic settings from env vars
    logger.py               # Logging with sensitive data redaction
    tools/
      source_tools.py       # list_sources, get_source
      assessment_tools.py   # list/get assessments, cluster sizing, estimation, complexity
    service_client/
      migration_planner_client.py   # Async HTTP client for Migration Planner API
      exceptions.py                 # Error handling and exception sanitization
  utils/
    auth.py                 # Bearer token extraction and forwarding
tests/
  conftest.py               # Shared fixtures
  test_assessment_tools.py   # Assessment tool tests
  test_source_tools.py       # Source tool tests
  test_migration_planner_client.py  # API client tests
  test_mcp_server.py         # Server initialization and tool registration tests
deploy/openshift/            # OpenShift manifests (Deployment, Service, Route, ConfigMap, Secret)
examples/
  lightspeed-stack.yaml      # lightspeed-stack integration examples
Ver o original no GitHub

Bom para

Relacionados