Ansible MCP logo

Ansible MCP

by @yawlabs

Inspect an Ansible checkout’s installed specs, task arguments, roles, inventory, configuration, drift, and upgrade impact without executing plays.

Install Ansible MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "yawlabs-ansible-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ansible-mcp@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 11 tools correctly ().

Overview

@yawlabs/ansible-mcp connects an AI agent to the Ansible installation and project files on a control node, exposing read-only inspection and validation tools. It reports installed module specifications, checks task arguments, examines roles and redacted inventory, parses playbook structure, compares collections, and assesses upgrade impact. Reach for it when agent-generated Ansible must match the exact collections and configuration installed in a checkout. It never runs plays, connects to managed hosts, or supplies vault secrets.

Use cases

  • Check generated task arguments against the installed collection version
  • Inspect a role’s argument specification and redacted defaults
  • Compare requirements.yml with installed collection copies
  • Review playbook structure and syntax warnings before editing
  • Assess task breakage before upgrading a collection

Key features

  • Installed Ansible module and plugin documentation
  • Task argument and YAML-aware validation
  • Redacted inventory, role, and configuration inspection
  • Playbook structure and offline lint reporting
  • Collection drift and upgrade-impact analysis
  • Read-only operation with vault safeguards

Tools11

What Ansible MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.8k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

5/5 checks healthy over the last 17d

What it can do

From the 11 tools this server returned when we ran it; 11 declare their own safety hints.

Handles credentials · 3Makes network requests · 1Read-only tools · 11
Network at startup3 connections
Files written at startupNone
Install scriptsprepare
npm provenanceNot published
Package age29 days
Maintainers1

Observed 2026-11-14 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · @yawlabs/ansible-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads1.1kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed11Callable tools this server registers over MCP.

How Ansible MCP works

What @yawlabs/ansible-mcp does

@yawlabs/ansible-mcp gives an MCP client visibility into the Ansible environment and project it is pointed at. Its source of truth is the installed Ansible and collection content on the control node, rather than training data or an assumed latest release.

The server is read-only. It can inspect module and plugin argument specifications, role interfaces, inventories, playbook structure, effective configuration, collection requirements, and offline lint results. It can also compare the modules used by a project with a specified collection version and identify likely task breakage.

Sensitive material is redacted. Inventory values are always redacted, secret-like configuration values are masked, vault markers are represented safely, and whole-file vaults are listed without being read.

How it works

Every tool accepts an optional dir identifying the Ansible project. ansible_project_info is intended as the first call because it identifies the Ansible version, effective configuration, collections and roles paths, installed binaries, detected playbooks, inventories, roles, and requirements files.

The server uses local Ansible inspection commands such as ansible-doc, ansible-config, ansible-inventory, ansible-playbook --syntax-check, and collection or role listing commands. Task validation compares YAML against the installed documentation and reports unknown options, missing required arguments, invalid choices or types, suboption problems, duplicate keys, deprecated options, and YAML 1.1 concerns such as unquoted off or 0755. It also states which cross-option rules the documentation cannot check instead of claiming a task is fully valid.

Collection upgrade analysis installs the target collection into a server-owned cache when needed, then compares relevant argument specifications and project requirements. This is the only operation that may contact Galaxy or configured collection servers. On macOS and Linux, Ansible runs locally; on Windows, the server invokes Ansible through WSL.

Setup and configuration

Install it as an MCP command with the npm package through npx:

config.json
{
  "command": "npx",
  "args": ["-y", "@yawlabs/ansible-mcp"]
}

Point tool calls at the project directory with dir when the checkout is not the default working directory. The server reads the Ansible installation, collection paths, roles, configuration, and project files available on that control node.

Dynamic inventory sources are disabled by default. Play-level lookups are also refused before Ansible parses a playbook unless explicitly enabled. Optional environment settings include ANSIBLE_MCP_ALLOW_DYNAMIC_INVENTORY=1 and ANSIBLE_MCP_ALLOW_PLAY_LOOKUPS=1.

Tools and capabilities

  • ansible_module_doc returns installed module or plugin options, defaults, aliases, suboptions, deprecations, return data, examples, and collection version.
  • ansible_module_search searches installed modules and plugins by name or description.
  • ansible_check_task_args validates inline YAML, task files, or playbooks against installed documentation.
  • ansible_role_interface reports role argument specifications, defaults, dependencies, variables, and Galaxy metadata.
  • ansible_inventory shows groups, hosts, and inventory structure with values redacted.
  • ansible_playbook_structure reports syntax-check results, plays, matched hosts, tasks, tags, locations, and parse warnings.
  • ansible_config shows effective settings and their origins while flagging safety overrides.
  • ansible_collections compares requirements with installed collections, including constraints and shadowed copies.
  • ansible_lint_summary groups offline lint findings by rule, severity, count, and location.
  • ansible_upgrade_impact identifies removed or moved modules, changed options, new requirements, choice and type changes, constraints, and an optional target syntax check.

Limitations and notes

The server does not execute plays, modules, check mode, diffs, fact gathering, or connections to managed hosts. It never runs configured vault password scripts and does not accept vault secrets. Dynamic inventory, play-level lookups, and related code paths can execute project-controlled behavior when explicitly enabled, so the checkout should be treated as code being inspected by Ansible.

It complements tools that execute Ansible, fix lint issues, manage controller jobs, scaffold content, or build execution environments; those actions are outside this server’s scope.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Ansible MCP

@yawlabs/ansible-mcp is an MCP server that connects AI clients to an Ansible checkout on a control node. Its main tools inspect installed module specs, validate task arguments, examine roles and redacted inventory, parse playbooks, review configuration and collection drift, and estimate collection-upgrade impact without executing plays.

Install it through an MCP client using `npx -y @yawlabs/ansible-mcp` as the command and `-y`, `@yawlabs/ansible-mcp` as its arguments. Tool calls can then provide an optional `dir` value for the Ansible project checkout.

No, it does not run playbooks, modules, check mode, diffs, or fact gathering. It can run `ansible-playbook --syntax-check` and list or inspect playbook structure, but it does not connect to managed hosts.

It redacts inventory values, secret-like names, vault markers, tokens, private keys, and URL passwords. Configured vault password scripts are replaced with a server-owned dummy file and are never run; whole-file vaults are listed without being read.

Yes, it is listed for use with VS Code. The server provides MCP tools that can inspect the local Ansible checkout, while the VS Code Ansible extension remains the interactive editing and language-server interface.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAnsible MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/yawlabs-ansible-mcp?style=directory)](https://allmcps.com/mcp/yawlabs-ansible-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/yawlabs-ansible-mcp"><img src="https://allmcps.com/api/badge/yawlabs-ansible-mcp?style=directory" alt="Ansible MCP on AllMCPs" /></a>