ansible-mcp-server
Ansible NLP MCP
Servidor MCP local para permitir que el Codex interactúe con este repositorio Ansible mediante lenguaje natural, utilizando herramientas seguras en lugar de exponer un shell genérico.
Herramientas
health: muestra la raíz, el timeout y si la ejecución mutable está habilitada.list_playbooks: lista playbooks y workflows ejecutables.inspect_playbook: resume plays, hosts,vars_files, tareas iniciales y variables obligatorias comunes.suggest_playbooks: clasifica playbooks a partir de una solicitud en lenguaje natural.inventory_graph: ejecutaansible-inventory --graph.inventory_summary: resume grupos y hosts del inventario.syntax_check: ejecutaansible-playbook --syntax-check.check_playbook: ejecutaansible-playbook --check.run_playbook: ejecuta el playbook real, bloqueado por defecto.ping_hosts: ejecutaansible -m pingoansible.windows.win_ping.list_logsytail_log: consulta los logs dentro delogs/.
Related MCP server: AAP MCP Server
Instalación
cd /root/ansible
python3 -m venv .venv-mcp
. .venv-mcp/bin/activate
pip install -r ansible_mcp/requirements.txtPrueba local
cd /root/ansible
. .venv-mcp/bin/activate
python -m ansible_mcp.serverEste comando inicia un servidor MCP por stdio y queda a la espera de un cliente MCP.
Configuración en Codex
Ejemplo para .codex/config.toml en el proyecto, o para ~/.codex/config.toml si quieres habilitarlo globalmente:
[mcp_servers.ansible]
command = "/root/ansible/.venv-mcp/bin/python"
args = ["/root/ansible/ansible_mcp/server.py"]
cwd = "/root/ansible"
enabled = true
startup_timeout_sec = 10
tool_timeout_sec = 900
env = { ANSIBLE_MCP_ROOT = "/root/ansible", ANSIBLE_MCP_ALLOW_RUN = "0" }Con ANSIBLE_MCP_ALLOW_RUN = "0", el MCP permite inspección, inventario, ping, syntax-check y check-mode, pero bloquea la ejecución real de playbooks.
Para permitir ejecución auténtica:
[mcp_servers.ansible]
command = "/root/ansible/.venv-mcp/bin/python"
args = ["/root/ansible/ansible_mcp/server.py"]
cwd = "/root/ansible"
enabled = true
startup_timeout_sec = 10
tool_timeout_sec = 900
env = { ANSIBLE_MCP_ROOT = "/root/ansible", ANSIBLE_MCP_ALLOW_RUN = "1" }Incluso habilitado, run_playbook aún exige confirm = "RUN" en la llamada a la herramienta.
Ejemplos de intención NLP
"¿Qué playbook uso para actualizar Windows de wuday1?"
"Haz el syntax-check del playbook de Windows Update con
day=wuday1.""Ejecuta en modo check la actualización de Linux solo en el grupo
rocky.""Muestra los últimos logs del Citrix Day."
"Lista los grupos del inventario y cuántos hosts existen en cada uno."
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityFmaintenanceThis Model Context Protocol server enables AI assistants to interact directly with Ansible, allowing them to execute playbooks, manage inventory, check syntax, and perform other Ansible operations.1826MIT
- AlicenseBqualityBmaintenanceEnterprise-grade MCP server exposing Ansible Automation Platform 2.x as a complete AI interface for LLMs, enabling natural language management of automation resources.861Apache 2.0
- FlicenseAqualityCmaintenanceAn MCP server that lets AI agents discover Ansible Galaxy collection input/output contracts, including module arguments, return values, and role facts, to help generate accurate playbooks.6
- FlicenseNot gradedqualityCmaintenanceIndustry-standard MCP server for AWX/AAP/Ansible Tower automation, enabling AI agents to manage job templates, launch and monitor jobs, and handle inventories and projects through natural language.10
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
GibsonAI MCP server: manage your databases with natural language
Official Microsoft MCP Server to query Microsoft Entra data using natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/infra-mdsystems/ansible_mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server