Skip to main content
Glama
infra-mdsystems

ansible-mcp-server

Ansible NLP MCP

Lokaler MCP-Server, der es Codex ermöglicht, mit diesem Ansible-Repository über natürliche Sprache zu interagieren, unter Verwendung von sicheren Werkzeugen anstatt einer generischen Shell.

Werkzeuge

  • health zeigt das Root-Verzeichnis, den Timeout und ob veränderliche Ausführung aktiviert ist.

  • list_playbooks: listet ausführbare Playbooks und Workflows auf.

  • inspect_playbook: fasst Play, hosts, vars_files, anfängliche Tasks und gemeinsame Pflichtvariable zusammen.

  • sugeest_playbook: bewertet Playbooks anhand einer Anfraan in natürlicher Sprache.

  • inventory_graph: fürht ansible-inventory --graph aus.

  • inventory_summary: fasst Gruppen und Hosts des Inventars zusammen.

  • syntax_check: fürht ansible-playbook --syntax-check aus.

  • check_playbook: fürht ansible-playbook --check aus.

  • run_playbook: führt das tatsächliche Playbook aus, standardmäßig blockiert.

  • ping_hosts: führt ansible -m ping oder ansible.windows.win_ping aus.

  • list_logs und tail_log: fragt Logs in logs/ ab.

Related MCP server: AAP MCP Server

Installation

cd /root/ansible
python3 -m venv .venv-mcp
. .venv-mcp/bin/activate
pip install -r ansible_mcp/requirements.txt

Lokaler Test

cd /root/ansible
. .venv-mcp/bin/activate
python -m ansible_mcp.server

Dieser Befehl startet einen MCP-Server über stdio und wartet auf einen MCP-Client.

Konfiguration in Codex

Ein Beispiel für .codex/config.toml im Projekt, oder für ~/.codex/config.toml, falls du es global aktivieren möchtest:

[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" }

Mit ANSIBLE_MCP_ALLOW_RUN = "0" erlaubt der MCP-Server Inspektion, Inventar, Ping, Syntax-Check und Check-Modus, blockiert aber die tatsächliche Ausführung von Playbooks.

Um eine veränderliche Ausführung zu ermöglichen:

[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" }

Auch wenn sie aktiviert ist, erfordert run_playbook weiterhin confirm = "RUN" beim Werkzeug-Aufruf.

Beispiele für NLP-Absichten

  • „Welches Playbook verwende ich, um Windows auf wuday1 zu aktualisieren?"

  • „Führe einen Syntax-Check des Windows-Update-Playbooks mit day=wuday1 durch."

  • „Führe im Check-Modus die Linux-Aktualisierung nur für die Gruppe rocky aus."

  • „Zeige die letzten Logs von Citrix Day an."

  • "Liste die Inventargruppen auf und wie viele Hosts in jeder enthalten sind."

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    C
    quality
    F
    maintenance
    This 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.
    18
    26
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enterprise-grade MCP server exposing Ansible Automation Platform 2.x as a complete AI interface for LLMs, enabling natural language management of automation resources.
    86
    1
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    Industry-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

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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