convez.ai
MCP ServerDevOps & InfraestruturaIntermediário
a-slvn

Selectel MCP — Controle de Cloud OpenStack e S3

a-slvn/selectel-mcp

Integração com Selectel: compute, storage S3 e billing via MCP

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que conecta Claude a conta Selectel, permitindo gerenciar servidores OpenStack, armazenamento S3 e consultar billing. Inclui deploy one-shot de aplicações Docker, gestão de redes, volumes e security groups com gates de segurança para operações destrutivas e pagas.

Instalação

$npx convez-ai a-slvn/selectel-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
1
Forks
1
Acompanhando
0
Saúde
42%
Último commit
há 4 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Provisionar e destruir servidores na nuvem via comandos do Claude
  • Fazer deploy de aplicações Docker completas (servidor + IP flutuante) em uma chamada
  • Gerenciar buckets S3, volumes e grupos de segurança programaticamente
  • Consultar saldo e previsão de billing da conta

Veredito

Ferramenta sólida e bem arquitetada para DevOps na Selectel. Segurança thoughtful com gates em operações destrutivas e pagas; porém, escopo limitado ao ecossistema Selectel (relevante para quem usa esse provider russo).

README

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

selectel-mcp

CI

An MCP server that gives an AI agent (Claude Code, Claude Desktop, etc.) controlled access to a Selectel cloud account: OpenStack cloud servers, S3 object storage, and account billing.

Unofficial. Community project — not affiliated with, endorsed by, or supported by Selectel. It talks to the public Selectel/OpenStack APIs with credentials you provide. Use at your own risk; you are responsible for any resources it creates and any charges they incur.

What it can do

AreaTools
Deploy (one-shot)deploy_docker_app, destroy_app
Compute (OpenStack)list_servers, get_server, list_flavors, list_images, create_server, server_action, delete_server
Keypairslist_keypairs, import_keypair, delete_keypair
Security groupslist_security_groups, create_security_group, add_security_group_rule, delete_security_group
Networklist_networks, list_subnets, list_floating_ips, create_floating_ip, attach_floating_ip, release_floating_ip
Volumeslist_volumes, create_volume, attach_volume, delete_volume
Object storage (S3)list_buckets, list_objects, create_bucket, upload_object, download_object, delete_object
Billingget_balance, get_balance_prediction
Accountlist_projects

Paid tools (create_server, deploy_docker_app, create_floating_ip) and destructive tools (delete_*, destroy_app, release_floating_ip) are gated: the destructive ones require confirm=True and otherwise return a dry-run preview, so the agent can show you what would happen first.

Deploy an app in one call

deploy_docker_app(
  name="myapp",
  image="Ubuntu 22.04",
  flavor="SL1.1-1024",
  git_repo="https://github.com/you/myapp",   # cloned to /opt/app, `docker compose up -d`
  ports=[22, 80, 443],
  confirm=True,                               # paid: provisions a server + public IP
)
# → creates a security group, a cloud-init server that installs Docker and runs your
#   repo, and a floating IP. destroy_app("myapp") removes it all later.

How auth maps to Selectel

LayerEndpointCredential
OpenStack (servers/networks/volumes)cloud.api.selcloud.ru/identity/v3IAM service user (username + password + account id) → Keystone token
Balance / billingapi.selectel.ruaccount IAM token, or a static token (X-Token) for detailed reports
Projectsapi.selectel.ru/vpc/resell/v2same as above
S3 object storages3.<pool>.storage.selcloud.ruS3 access key issued to the service user

Setup

  1. Create a service user in the control panel: Account → Users → Service users. Give it the roles you want the agent to have (start with read-only roles, or scope it to a single project).
  2. Issue an S3 key to that service user (Service users → Access → S3 keys) if you want object-storage access.
  3. (Optional) Create a static token (Profile → Access → API keys) for billing reports/transactions.
python3 -m venv .venv
.venv/bin/python -m pip install -e .
cp .env.example .env   # then fill in credentials

Fill .env:

SEL_ACCOUNT_ID=123456          # domain name, top-right in the control panel
SEL_USERNAME=mcp-agent         # service user
SEL_PASSWORD=...
SEL_PROJECT_ID=<project uuid>  # default project (or discover via list_projects)
SEL_REGION=ru-2
SEL_S3_ACCESS_KEY=...
SEL_S3_SECRET_KEY=...
SEL_STATIC_TOKEN=              # optional

Run / connect to Claude Code

# from this directory
claude mcp add selectel -- /absolute/path/to/.venv/bin/python -m selectel_mcp

Or run it directly over stdio:

.venv/bin/python -m selectel_mcp

For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "selectel": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["-m", "selectel_mcp"]
    }
  }
}

The server reads credentials from .env in its working directory (or from real environment variables).

Development

pip install -e ".[dev]"   # installs ruff + pytest
ruff check .
pytest

The pure helpers (cloud-init rendering, server summarization, public-IP picking) are unit-tested without touching the network. CI runs lint + tests on every push.

Safety notes

  • The service user is the blast radius — scope its IAM roles to exactly what you want the agent to touch. Read-only roles make the whole server read-only.
  • deploy_docker_app opens the requested ports to 0.0.0.0/0 — the whole internet — including SSH (22) by default. Pass a narrower ports list, or tighten the security group afterward, for anything beyond a quick throwaway test.
  • .env holds secrets and is git-ignored. Don't commit it.
  • For infrastructure changes, consider managing them with Terraform (provider selectel/selectel) so every change goes through a reviewable plan → apply. This MCP server is best for queries and quick actions.
Ver o original no GitHub

Bom para

Relacionados