Ansible Development Tools MCP Server

Ansible linting, playbook runs, project scaffolding and dev-environment setup over MCP

Official · Ansible TypeScript Local · stdio Developer toolsDevOps and monitoring

49 popularity score ★ 492 ↓ 371/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add ansible-development-tools -- npx -y @ansible/ansible-mcp-server --stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "ansible-development-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@ansible/ansible-mcp-server",
        "--stdio"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "ansible-development-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@ansible/ansible-mcp-server",
        "--stdio"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "ansible-development-tools": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ansible/ansible-mcp-server",
        "--stdio"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.ansible-development-tools]
command = "npx"
args = ["-y", "@ansible/ansible-mcp-server", "--stdio"]
Gemini CLITerminal
gemini mcp add --scope user ansible-development-tools npx -- -y @ansible/ansible-mcp-server --stdio
Local (container)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

Claude CodeTerminal
claude mcp add ansible-development-tools -- docker run --rm -i -v '<ABSOLUTE_PATH>:/workspace' -e WORKSPACE_ROOT=/workspace ghcr.io/ansible/devtools-mcp-server:latest --stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "ansible-development-tools": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/workspace",
        "-e",
        "WORKSPACE_ROOT=/workspace",
        "ghcr.io/ansible/devtools-mcp-server:latest",
        "--stdio"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "ansible-development-tools": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/workspace",
        "-e",
        "WORKSPACE_ROOT=/workspace",
        "ghcr.io/ansible/devtools-mcp-server:latest",
        "--stdio"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "ansible-development-tools": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/workspace",
        "-e",
        "WORKSPACE_ROOT=/workspace",
        "ghcr.io/ansible/devtools-mcp-server:latest",
        "--stdio"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.ansible-development-tools]
command = "docker"
args = ["run", "--rm", "-i", "-v", "<ABSOLUTE_PATH>:/workspace", "-e", "WORKSPACE_ROOT=/workspace", "ghcr.io/ansible/devtools-mcp-server:latest", "--stdio"]
Gemini CLITerminal
gemini mcp add --scope user ansible-development-tools docker -- run --rm -i -v '<ABSOLUTE_PATH>:/workspace' -e WORKSPACE_ROOT=/workspace ghcr.io/ansible/devtools-mcp-server:latest --stdio

Settings 2

WORKSPACE_ROOT Optional: Path to the Ansible project the tools work in; defaults to the directory the server starts in (set to /workspace in the container form).
NODE_OPTIONS Optional: Extra Node.js flags, npm package only.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

The Ansible Development Tools MCP Server is published by the Ansible project from the same repository as the Ansible extension for VS Code, as the npm package @ansible/ansible-mcp-server and a container image. It runs locally over stdio and points at one Ansible project directory, set with WORKSPACE_ROOT (the directory it was started in when unset).

Its tools wrap the Ansible command-line tooling: ansible_lint runs ansible-lint on a file and can apply its automatic fixes, ansible_navigator runs a playbook through ansible-navigator and retries without an execution environment when Podman or Docker fails, create_ansible_projects scaffolds a collection or playbook project with ansible-creator, and define_and_build_execution_env writes and schema-checks an execution-environment.yml for ansible-builder. Other tools report the Python, Ansible and tool versions present, create a virtual environment and install collections and Python packages, or install ansible-dev-tools when it is missing. It also serves reference material as tools and resources: the Zen of Ansible, content best-practice guidelines, the execution environment schema, a sample file and its rules.

At version 26.6.0 the server registers 10 tools in server.ts, while the extension's documentation speaks of 11 tools "across multiple branches"; the list below follows the released code. The ansible_lint tool's own description tells the assistant to prefer running ansible-lint in a terminal and to use the tool only when no terminal is available.

What it needs

RuntimeNode.js 24+orDocker

Node.js 24 or newer for the npm package (engines field), or Docker or Podman for the ghcr.io/ansible/devtools-mcp-server image. Python 3.11 or newer and the Ansible tools it drives (ansible-lint, ansible-navigator, ansible-creator, ansible-builder, from the ansible-dev-tools pip package); the adt_check_env and ade_setup_environment tools can install these with pip. An Ansible project directory to work on. Running playbooks in execution environments needs Podman or Docker.

Limits

Stdio only: the CLI prints that WebSocket mode is not available in this build and exits when started with --ws, although its usage text still shows that form. Every tool is registered with an empty dependency list in server.ts, so a missing ansible-lint or ansible-navigator surfaces as a failed call rather than a check before the call. The setup tool asks for an OS type of linux or darwin and maps distributions to dnf, apt, brew or pacman; Windows is not among them. Tools work inside the single WORKSPACE_ROOT directory.

Who it suits

Suits Ansible authors who want an assistant to lint and fix playbooks, scaffold collections, draft execution environment definitions and run playbooks from the project they already have open, using Red Hat's own tooling rather than generic shell access. It is a local tool with no account or sign-in. Pick something else if you only need the assistant to read Ansible content, since several tools here install packages, change files and run playbooks against whatever inventory the project names, or if you are on Windows without WSL.

Tools 10

zen_of_ansible
Returns the 20 aphorisms of Ansible's design philosophy.
ansible_content_best_practices
Returns guidelines for writing Ansible content.
list_available_tools
Lists the tools this server offers and what each is for.
ansible_lint
Runs ansible-lint on a file in the workspace, optionally applying its automatic fixes.
ansible_navigator
Explains ansible-navigator modes, or runs a named playbook through it and formats the result.
ade_environment_info
Reports Python, Ansible, ADE/ADT status and installed collections.
ade_setup_environment
Creates a virtual environment and installs Ansible tools, collections and pip requirements.
adt_check_env
Checks whether ansible-dev-tools is installed and installs it if not.
create_ansible_projects
Scaffolds a new collection or playbook project with ansible-creator.
define_and_build_execution_env
Drafts and validates an execution-environment.yml for ansible-builder.

Similar servers