Get the FREE Ultimate OpenClaw Setup Guide →

ansible

MCP server from washyu/ansible-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio washyu-ansible-mcp-server node /path/to/ansible-mcp-server/src/index.js \
  --env PROXMOX_HOST="your-proxmox-host" \
  --env PROXMOX_USER="root@pam" \
  --env PROXMOX_PASSWORD="your-password"

How to use

This MCP server provides a suite of Ansible and Terraform related tools that allow AI assistants to manage and provision infrastructure. It exposes a range of tools under categories such as Ansible actions (playbook creation, execution, ad-hoc tasks, roles, and validation), infrastructure discovery and inventory generation, security auditing, and service provisioning from a catalog. The server is designed to preserve context between sessions and supports dynamic loading of tools to adapt to different infrastructure environments. To use it, configure the MCP server in your Claude Desktop (or your MCP client) with the appropriate node command and path to the server entry point, and supply any required environment variables (for example, credentials or endpoints) as shown in the example configuration.

Once running, you can invoke commands like create-playbook-flexible to generate Ansible playbooks from YAML strings or objects, ansible-playbook to execute those playbooks, and validate-playbook to check syntax. Infrastructure tasks include hardware-scan for inventory discovery, generate-inventory for creating Ansible inventories, and discover-proxmox for discovering Proxmox VMs. Security-focused tools perform quick or comprehensive scans, port checks, password policy audits, and SSH configuration reviews. Service management tools allow browsing a catalog of services and deploying selected services to specified environments, with environment protection via deploy-to-environment.

How to install

Prerequisites:

  • Node.js 16+ (for running the MCP server)
  • Ansible 2.9+ (for Ansible tooling)
  • Terraform (optional, for infrastructure provisioning)

Installation steps:

  1. Clone the repository git clone https://github.com/yourusername/ansible-mcp-server.git cd ansible-mcp-server

  2. Install dependencies npm install

  3. Copy and configure environment variables cp .env.example .env

    Edit .env with your settings (credentials, endpoints, etc.)

  4. Run the server npm start

  5. Optional: prepare Claude Desktop integration

    • For Claude Desktop, add the MCP server configuration (as shown in the README) to connect to the Node-based server.
    • If deploying on Windows with SSE, follow the Windows Setup Guide referenced in the docs.

Additional notes

Tips and considerations:

  • Ensure Ansible and Terraform versions are compatible with your playbooks and provisioning needs.
  • The MCP server is designed to handle a broad set of tools; if you enable many features, monitor resource usage and adjust environment isolation as needed.
  • Use the provided environment variables to supply credentials and endpoints (e.g., PROXMOX_HOST, PROXMOX_PASSWORD).
  • When running in production, consider separating the MCP server from the Claude Desktop client behind a secure proxy and enabling proper authentication.
  • If you encounter issues with tool loading, check the server logs for dynamic tool initialization messages and verify that the tool namespaces match the commands listed under Available Tools.
  • Validate and test your playbooks with validate-playbook before executing to reduce runtime errors.
  • Review the Documentation section in docs/ for integration guides and tool-specific usage notes.

Related MCP Servers

Sponsor this space

Reach thousands of developers