mcp -aap
This is an example of MCP Server to work with Ansible Automation Platform
claude mcp add --transport stdio mancubus77-mcp-server-aap uv run python server.py \ --env AAP_URL="https://your-aap-instance.com" \ --env AAP_TOKEN="your-access-token-here" \ --env AAP_TIMEOUT="30" \ --env AAP_PROJECT_ID="your-project-id" \ --env AAP_VERIFY_SSL="True" \ --env AAP_MAX_RETRIES="3"
How to use
This MCP server provides an integration layer with Ansible Automation Platform (AAP). It exposes tools to discover available Ansible job templates within a configured AAP project, launch those templates with custom extra variables and parameters, and monitor or retrieve outputs for running jobs. It also includes a lightweight capability to test connectivity to AAP and handle errors with retry logic. Use it as an interface for LLMs to plan and execute automation against your AAP environment, then fetch status and logs to present actionable feedback. The available tools include get_job_templates, launch_job_template, get_job_status, get_job_output, and test_aap_connection, enabling discovery, execution, and monitoring of AAP automation from MCP conversations.
How to install
Prerequisites:
- Python 3.8+ installed on the host
- Access to an Ansible Automation Platform (AAP) instance
- AAP API access token with appropriate permissions
Installation steps:
- Clone this repository to your environment.
- Create and populate environment variables (see env_example in the repo or use a .env file):
- AAP_URL: Base URL of your AAP instance
- AAP_TOKEN: Bearer token for API authentication
- AAP_PROJECT_ID: Default project ID to extract templates from
- AAP_VERIFY_SSL: true/false to verify SSL certificates
- AAP_TIMEOUT: Request timeout in seconds
- AAP_MAX_RETRIES: Retry attempts for failed requests
- Install Python dependencies:
uv pip install -r requirements.txt - Run the MCP server (example for uv):
uv run python server.py - Optionally, configure Claude Desktop or other MCP clients to connect using the provided MCP server configuration.
Notes:
- Ensure network access from the MCP host to the AAP instance
- Keep AAP_TOKEN secure and do not commit it to source control
Additional notes
Tips and notes:
- Use AAP_VERIFY_SSL to enforce SSL in production environments and avoid exposing tokens over insecure connections.
- The server expects AAP_PROJECT_ID to determine the scope for template discovery; adjust as needed for multi-project setups.
- If you encounter authentication errors, double-check token permissions and token scope within AAP.
- For long-running templates or large outputs, use get_job_status and get_job_output to fetch incremental updates and logs.
- Consider enabling retry logic (AAP_MAX_RETRIES) and adjusting AAP_TIMEOUT for network reliability in your environment.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP