Multi-Cloud DevOps MCP Server
Manages AWS, Azure, and Hetzner Cloud resources, and executes remote SSH commands via MCP integration.
README
Multi-Cloud DevOps MCP Server 🚀
Un servidor MCP (Model Context Protocol) que proporciona herramientas para gestionar recursos en múltiples proveedores de nube (AWS, Azure, Hetzner Cloud) y ejecutar comandos SSH remotos.
📋 Características
- AWS: Ejecución de código boto3 para gestión de recursos AWS
- Azure: Gestión de recursos Azure mediante Azure SDK
- Hetzner Cloud: Administración de recursos en Hetzner Cloud
- SSH: Ejecución remota de comandos SSH
- Dockerizado: Fácil despliegue con Docker Compose
- MCP Compatible: Integración directa con clientes MCP
🛠️ Prerrequisitos
- Docker y Docker Compose instalados
- Cliente MCP compatible (como Cursor IDE)
- Credenciales de los proveedores de nube que planeas usar
🚀 Instalación y Configuración
1. Configurar Credenciales
Copia el archivo de ejemplo y configura tus credenciales:
cp local.env .env
Edita el archivo .env con tus credenciales:
# ===== AWS Configuration =====
AWS_ACCESS_KEY_ID=tu_access_key_id
AWS_SECRET_ACCESS_KEY=tu_secret_access_key
AWS_DEFAULT_REGION=us-east-1
AWS_PROFILE=tu_perfil_aws # Opcional
# ===== Azure Configuration =====
AZURE_CLIENT_ID=tu_client_id
AZURE_CLIENT_SECRET=tu_client_secret
AZURE_TENANT_ID=tu_tenant_id
AZURE_SUBSCRIPTION_ID=tu_subscription_id
2. Construir el Contenedor Docker
docker compose build
3. Ejecutar el Servidor
docker compose up
El servidor estará disponible en http://localhost:8080
Para ejecutar en segundo plano:
docker compose up -d
4. Verificar que el Servidor Funciona
Puedes verificar el estado del servidor visitando:
- Health check:
http://localhost:8080/health - MCP endpoint:
http://localhost:8080/mcp
🔧 Integración con Cliente MCP
Configuración en Cursor IDE
- Abre la configuración de MCP en Cursor IDE
- Agrega la siguiente configuración (basada en
cursor_mcp_config.json):
{
"mcpServers": {
"devops-aws": {
"url": "http://localhost:8080/mcp"
}
}
}
Crear Agente con Prompt Personalizado
Crea un nuevo agente en tu cliente MCP con el siguiente prompt del sistema:
DO NOT IMPLEMENT CODE UNLESS I SPECIFY IT. I WANT YOU TO ALWAYS GIVE ME THE OPTIONS TO IMPLEMENT BEFORE MAKING ANY CHANGES TO THE CODE.
Always write code comments in English.
ALWAYS check how a feature is implemented in the code before starting your own, to see if a similar solution exists or to follow the repository's coding style. You are a useful assistant. You have to use "wide_reasoning" before responding to the user's question.
Wide Reasoning
Description: This field is to think in depth about the problem. Think carefully, trying to prevent mistakes. Always analyze the situation, the problem and do self-criticism and planning in the thoughts before saying something or giving a solution.
Points of View
Description: Analyze from multiple expert perspectives, thinking step-by-step. Points of view are a kind of thought that the character is thinking, but they are more specific and are used to analyze situations or possibilities from different unique perspectives and should be used always in these kinds of situations.
Format:
Expert name: "Perspective and reasoning of the expert"
Description: Step-by-step analysis of the problem. Minimum 3 points of view. The experts try to solve the problem in the most detailed and close manner possible, leaving nothing to chance.
Debate
Description: Have the experts from Points of View discuss and argue their perspectives. Experts can think and talk using "disfluencies". THE DEBATE SHOULD ALWAYS BE FOCUSED ON THE MAIN QUESTION, AND EACH CHARACTER SHOULD BE ARGUING OVER THAT. Each character of these points of view characters does a debate with each other to argue talking in a dialog about the situation and what to do or say.
Format:
Expert: "Argument"
Expert: "Counter-argument"
Conclusion
"Final thought content."
Final response to the user's question.
📚 Herramientas Disponibles
AWS (boto3_execute_wrapper)
Ejecuta código boto3 para gestionar recursos AWS:
# Ejemplo: Listar buckets S3
import boto3
s3 = boto3.client('s3')
response = s3.list_buckets()
print(response['Buckets'])
Azure (azure_execute_wrapper)
Gestiona recursos Azure:
# Ejemplo: Listar grupos de recursos
from azure.mgmt.resource import ResourceManagementClient
resource_client = ResourceManagementClient(credential, subscription_id)
for rg in resource_client.resource_groups.list():
print(rg.name)
Hetzner Cloud (hetzner_execute_wrapper)
Administra recursos en Hetzner Cloud:
# Ejemplo: Listar servidores
from hcloud import Client
client = Client(token=hetzner_token)
servers = client.servers.get_all()
for server in servers:
print(f"{server.name}: {server.status}")
SSH (ssh_execute_wrapper)
Ejecuta comandos remotos via SSH:
# Ejemplo: Ejecutar comando remoto
result = ssh_execute("ls -la /home", "usuario@servidor.com", "password")
print(result)
🐳 Estructura Docker
El proyecto utiliza Docker Compose con:
- Puerto: 8080 (mapeado a localhost:8080)
- Volúmenes:
- Código fuente montado en
/app - Credenciales AWS desde
~/.aws - Credenciales Azure desde
~/.azure
- Código fuente montado en
- Red:
mcp-network(bridge)
🔍 Troubleshooting
El servidor no inicia
- Verifica que el puerto 8080 no esté en uso
- Revisa los logs:
docker compose logs - Asegúrate de que el archivo
.envexiste y tiene las credenciales correctas
Errores de autenticación
- Verifica que las credenciales en
.envsean correctas - Para AWS, asegúrate de que las credenciales tengan los permisos necesarios
- Para Azure, verifica que el Service Principal tenga acceso a la suscripción
Cliente MCP no se conecta
- Verifica que el servidor esté ejecutándose:
curl http://localhost:8080/health - Revisa la configuración del cliente MCP
- Asegúrate de que la URL sea
http://localhost:8080/mcp
📁 Estructura del Proyecto
aws_mcp/
├── src/
│ ├── server.py # Servidor MCP principal
│ ├── providers/ # Proveedores de nube
│ │ ├── aws.py # Funciones AWS/boto3
│ │ ├── azure.py # Funciones Azure
│ │ ├── hetzner.py # Funciones Hetzner Cloud
│ │ └── ssh.py # Funciones SSH
│ └── utils.py # Utilidades
├── docker-compose.yml # Configuración Docker
├── Dockerfile # Imagen Docker
├── requirements.txt # Dependencias Python
├── .env # Credenciales (crear desde local.env)
└── cursor_mcp_config.json # Configuración ejemplo para Cursor
🤝 Contribuir
- Fork el proyecto
- Crea una rama para tu feature (
git checkout -b feature/AmazingFeature) - Commit tus cambios (
git commit -m 'Add some AmazingFeature') - Push a la rama (
git push origin feature/AmazingFeature) - Abre un Pull Request
📄 Licencia
Este proyecto está bajo la licencia MIT. Ver el archivo LICENSE para más detalles.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。