Integrates with Ansible Automation Platform, OpenShift, and Event-Driven Ansible to enable advanced automation workflows...
Created byApr 23, 2025
Setup of the Environment for the AI Powered Ansible & OpenShift Automation with Model Context Protocols (MCP) Servers
Overview
This guide will walk you through setting up the MCP Servers + Claude Desktop portions of the demo that focused on using Claude Desktop to interact with your Ansible Automation Platform and OpenShift Cluster environments.
Prerequisites
Ensure you have the following installed.
Required
An Ansible Automation Platform (AAP) environment
An OpenShift Cluster with OpenShift Virtualization
[Claude Desktop](https://claude.ai/download) installed on your laptop (Pro Plan required for best results)
Python 3.10 or higher installed on your laptop
Ensure you are authenticated with your OpenShift cluster (e.g. exporting kubeconfig)
Step One: Setup your laptop environment
Install `uv` and setup your Python project and environment.
Install [jbang](https://www.jbang.dev/download/) which will be used when using the Kubernetes MCP Server.
Restart your terminal to ensure that the `uv` and `jbang` command are now available.
Step Two: Create and Setup your Project
Step 3 Building your Ansible Automation Controller MCP Server
This is the MCP Server I used to interact with my automation controller. Feel free to copy/paste this into your `ansible.py` file.
Step 4: Configuring Claude Desktop to use your MCP Servers
In my particular case, I want to take advantage of two MCP Servers: the Ansible MCP Server above and the Kubernetes MCP Server that I found within the [quarkus-mcp-servers](https://github.com/quarkiverse/quarkus-mcp-servers/tree/main/kubernetes) Git repo
Open the `claude_desktop_config.json` , which on MacOS is located at
Save the file.
WARNING: Absolute path to your `uv` binary is required. Do a `which uv` on your system to get the full path.
NOTE: If you need to create the AAP_TOKEN, go to the AAP Dashboard, select Access Management -> Users -> <your_user> -> Tokens -> Create token -> Select the Scope dropdown and select 'Write' and click Create token.
Step 5: Re-Launch Claude Desktop
If you already had Claude Desktop open, relaunch it, otherwise make sure Claude Desktop is picking up the MCP servers. You can verify this by ensuring the hammer icon is launched.

NOTE: The number next to the hammer will vary based up on the amount of MCP tools available.
Once you click on the hammer icon, you can see a list of tools. Below is an example.

Step 6: Test your Environment
Now with everything setup, see if you can interact with your Ansible Automation Platform and OpenShift cluster.
Feel free to ask it questions such as:
How many Job Templates are available?
How many VMs are on my OpenShift cluster?
NOTE: It is very likely you will need to take advantage of the Claude Desktop Pro Plan in order to get the full functionality.
References
[Claude Desktop Quickstart for Server Developers](https://modelcontextprotocol.io/quickstart/server)
BONUS: Adding Event Driven Ansible MCP Server
If you have setup Event Driven Ansible, you can take advantage of the Event Driven Ansible MCP Server below. The instructions are similar to the above.
Create an `eda.py` and store it in your `/absolute/path/to/ansible_mcp`
Update your `claude_desktop_config.json`
Restart your Claude Desktop and verify the hammer has picked up your new MCP tools
The two files are listed below for easy copy/paste.
claude_desktop_config.json
WARNING: Absolute path to your `uv` binary is required. Do a `which uv` on your system to get the full path.
NOTE: An EDA Token can be generated from the AAP Dashboard.