Skip to main content
🚀 Claude Code Bootcamp — May 30 5 hours from prompting to production. Build 10 real-world projects with AI-assisted development. Register Now
Ansible MCP Server live demo showing root cause analysis of failed job in Cursor IDE
Automation

Ansible MCP Server Live Demo: AI-Driven Automation in Cursor IDE

Watch the Ansible MCP Server in action — live demo from Red Hat Tech Day Netherlands 2026 showing agentic job management, failed job root cause analysis, survey validation, and natural language automation through Cursor IDE with 6 connected MCP tool sets.

LB
Luca Berton
· 4 min read

At Red Hat Tech Day Netherlands (June 2026), Fred van Zeile demonstrated the Ansible MCP Server live — connecting Cursor IDE to a real Ansible Automation Platform instance and running agentic automation workflows through natural language.

This isn’t a slide deck or a video. This is real-time AI driving actual infrastructure automation.

The Setup: 6 MCP Servers, 107 Tools

Cursor IDE settings showing 6 installed MCP servers

The demo used Cursor IDE (Enterprise Plan) with six MCP server connections:

MCP ServerTools
aap-mcp-inventory-mgmnt7 tools
aap-mcp-job-mgmnt25 tools
aap-mcp-platform-conf18 tools
aap-mcp-sec-comp12 tools
aap-mcp-system-mon13 tools
aap-mcp-user-mgmnt32 tools

Total: 107 tools exposed to the AI agent through a standardized MCP interface.

The Configuration: mcp.json

mcp.json configuration file showing MCP server endpoints

The configuration is straightforward JSON:

{
  "mcpServers": {
    "aap-mcp-job-agent": {
      "type": "http",
      "url": "https://aap.fvz.ansible-labs.de:8448/job_management/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    },
    "aap-mcp-inventory-agent": {
      "type": "http",
      "url": "https://aap.fvz.ansible-labs.de:8448/inventory_management/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    },
    "aap-mcp-system-mon": {
      "type": "http",
      "url": "https://aap.fvz.ansible-labs.de:8448/system_monitoring/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    },
    "aap-mcp-user-agent": {
      "type": "http",
      "url": "https://aap.fvz.ansible-labs.de:8448/user_management/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    },
    "aap-mcp-sec-comp": {
      "type": "http",
      "url": "https://aap.fvz.ansible-labs.de:8448/security_compliance/mcp"
    }
  }
}

Key detail: it’s just HTTP endpoints with Bearer token authentication. Any MCP-compatible client (Cursor, Claude Desktop, VS Code, custom apps) can connect.

Demo 1: “Show Me the Last 5 Jobs from AAP”

Last 5 jobs table showing Paint and Demo Job Template runs

The agent queries AAP and returns a structured table:

IDNameStatusPlaybookLaunched byFinishedDuration
78Paint✅ successfulhello_world.ymladmin (manual)Jun 2, 2026 16:187.1s
77Paint✅ successfulhello_world.ymladmin (manual)Jun 2, 2026 16:176.1s
76Demo Job Template✅ successfulhello_world.ymladmin (manual)Jun 2, 2026 16:156.8s
74Demo Job Template✅ successfulhello_world.ymladmin (manual)Jun 2, 2026 15:4312.7s
73Demo Job Template✅ successfulhello_world.ymladmin (manual)Jun 1, 2026 13:136.7s

Notes from the agent:

  • All five ran against Demo Inventory on project Demo Project
  • Jobs 76 and 77 used the Paint job template; the rest used Demo Job Template
  • Extra vars included color: Yellow (Job 76), Green (Job 77), and Rood (Jobs 73-75)

Demo 2: “Run the Paint Job with Color Purple”

Paint job with purple rejected — validation error

The agent attempts to launch the Paint job template via MCP:

Checking how to launch the Paint job template via AAP MCP.

⚡ Ran Job Templates Launch Create in aap-mcp-job-mgmnt

The Paint job template (ID 43) rejected the launch with this validation error:

Value 'Purple' for color expected to be one of ['Green', 'Yellow', 'Red'].

The template’s survey only allows those three colors, so Purple cannot be used without updating the job template survey first.

Would you like me to:

  1. Run it with one of the allowed colors (Green, Yellow, or Red), or
  2. Help update the Paint job template to add Purple as an option?

This is the key safety feature — the MCP server respects AAP’s survey validation. The AI can’t bypass guardrails.

Demo 2b: “Ok, Just Use Green”

Paint job launched successfully with color Green

The Paint job has been launched and completed successfully.

Field          Value
Job ID         78
Name           Paint
Template       Green
Color          ✅ successful
Status         successful
Playbook       hello_world.yml
Inventory      Demo Inventory
Duration       5.3s
Hosts          1 ok

From natural language request to successful job execution in seconds.

Demo 3: “Show Me the Last Failed Job and Analyse What Went Wrong”

This is where it gets powerful. The agent performs multi-step investigation:

Agent thinking and exploring files for root cause analysis

The investigation flow:

  1. Thought briefly — Finding the most recent failed job
  2. Ran Jobs List in aap-mcp-job-mgmnt
  3. Ran Jobs Retrieve in aap-mcp-job-mgmnt
  4. Ran Jobs Stdout Retrieve in aap-mcp-job-mgmnt
  5. Ran Jobs Job Events List in aap-mcp-job-mgmnt
  6. Read jobs_list.json (L1-21), jobs_stdout_retrieve.json (L1-27), jobs_job_events_list.json

The Root Cause Analysis

Root cause analysis — wrong VPC name and parallel job race condition

Root cause analysis

Two issues line up:

1. Wrong VPC name: caap instead of aap

The failed workflow used: "ec2_vpc_name": "caap"

A later successful rerun of the same workflow (jobs #24-26) used: "ec2_vpc_name": "aap"

caap looks like a typo for aap. That likely caused the playbook to create or look up the wrong VPC stack.

2. Parallel jobs racing on the same VPC name

Workflow #18 launched two EC2 deploy jobs at once (prometheus + node1), both with ec2_vpc_name: caap. Both tried to create VPC/subnet/IGW/route-table resources with the same tags at the same time. That can leave duplicate or ambiguous route tables in AWS — exactly what triggers “Tags provided do not identify a unique route table”.

How to fix it

Immediate fix (most likely sufficient):

  1. Update the workflow Deploy EDA Prometheus Demo 1 so ec2_vpc_name is aap, not caap
  2. Relaunch the workflow.

The agent identified a typo (caap vs aap) AND a race condition from parallel job execution — all by reading job events and stdout through MCP tools.

Demo: Failed Job Summary

Job summary showing failed EDA Deploy Instance on EC2

The failed job details:

  • Job ID: 20
  • Name: EDA - Deploy Instance on EC2
  • Template: EDA - Deploy Instance on EC2 (ID 34)
  • Workflow: Deploy EDA Prometheus Demo 1 (#18)
  • Playbook: instance.yml
  • Inventory: ec2
  • Status: failed
  • Duration: 13.2s
  • Extra vars: ec2_vpc_name: caap, instance_name: node1

The most recent failed job is Job #20 (Mar 17, 2026). Job #10 failed at the same time with the same root cause — both were launched in parallel by workflow Deploy EDA Prometheus Demo 1 (workflow job #18).

Key Takeaways

  1. 107 tools across 6 domains — comprehensive AAP coverage through MCP
  2. Survey validation enforced — AI can’t bypass AAP guardrails
  3. Multi-step root cause analysis — agent autonomously queries jobs, stdout, events
  4. Natural language → real automation — no API knowledge required
  5. Any MCP client works — Cursor, Claude Desktop, custom apps
  6. Standard HTTP + Bearer auth — simple, secure configuration

The Bigger Picture

This demo shows what “AI-driven automation” actually means in practice:

  • Not replacing Ansible playbooks
  • Not generating code and hoping it works
  • Actually using AI as an intelligent operator that understands platform constraints, investigates failures, and executes within guardrails

The MCP server is the bridge between natural language intent and deterministic automation execution.

Free 30-min AI & Cloud consultation

Book Now