Skip to main content
Glama
infra-mdsystems

ansible-mcp-server

Ansible NLP MCP

Local MCP server to allow Codex to interact with this Ansible repository through natural language, using safe tools instead of exposing a generic shell.

Tools

  • health: shows root, timeout, and whether mutable execution is enabled.

  • list_playbooks: lists executable playbooks and workflows.

  • inspect_playbook: summarizes plays, hosts, vars_files, initial tasks, and common required variables.

  • suggest_playbooks: ranks playbooks based on a natural language request.

  • inventory_graph: runs ansible-inventory --graph.

  • inventory_summary: summarizes inventory groups and hosts.

  • syntax_check: runs ansible-playbook --syntax-check.

  • check_playbook: runs ansible-playbook --check.

  • run_playbook: runs the actual playbook, blocked by default.

  • ping_hosts: runs ansible -m ping or ansible.windows.win_ping.

  • list_logs and tail_log: queries logs inside logs/.

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

Local testing

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

This command starts an MCP server over stdio and waits for an MCP client.

Codex configuration

Example for .codex/config.toml in the project, or for ~/.codex/config.toml if you want to enable it globally:

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

With ANSIBLE_MCP_ALLOW_RUN = "0", the MCP allows inspection, inventory, ping, syntax-check, and check mode, but blocks actual playbook execution.

To allow mutable execution:

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

Even when enabled, run_playbook still requires confirm = "RUN" in the tool call.

NLP intent examples

  • "Which playbook do I use to update Windows on wuday1?"

  • "Run syntax-check on the Windows Update playbook with day=wuday1."

  • "Run the Linux update in check mode only on the rocky group."

  • "Show the latest Citrix Day logs."

  • "List the inventory groups and how many hosts are in each one."

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