ansible-mcp-server

ansible-mcp-server

Enables AI assistants to manage infrastructure using Ansible and Terraform with 58 tools for playbooks, provisioning, security scanning, and more.

Category
Visit Server

README

Ansible MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to manage infrastructure using Ansible and Terraform.

Features

  • 58 Infrastructure Management Tools

    • Ansible playbook creation and execution
    • Terraform infrastructure provisioning
    • Hardware discovery and inventory
    • Security scanning and auditing
    • Service deployment from catalog
    • Network device management
    • Environment management (test/staging/production)
  • AI-Optimized Design

    • Flexible playbook creation accepting YAML strings
    • Comprehensive error handling
    • Context persistence between sessions
    • Dynamic tool loading for services
  • Cross-Platform Support

    • Linux server deployment
    • Windows client support via SSE proxy
    • Remote server management

Quick Start

Prerequisites

  • Node.js 16+
  • Ansible 2.9+
  • Terraform (optional)

Installation

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

# Install dependencies
npm install

# Copy and configure environment
cp .env.example .env
# Edit .env with your settings

# Run the server
npm start

For Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "ansible": {
      "command": "node",
      "args": ["/path/to/ansible-mcp-server/src/index.js"],
      "env": {
        "PROXMOX_HOST": "your-proxmox-host",
        "PROXMOX_USER": "root@pam",
        "PROXMOX_PASSWORD": "your-password"
      }
    }
  }
}

Windows Users

For Windows Claude Desktop, use the SSE proxy:

  1. Deploy the MCP server to a Linux host
  2. Run the SSE server on the Linux host
  3. Configure Claude Desktop to use the Windows client

See Windows Setup Guide for details.

Available Tools

Ansible Tools

  • create-playbook-flexible - Create playbooks with YAML strings or objects
  • ansible-playbook - Run Ansible playbooks
  • ansible-task - Run ad-hoc Ansible tasks
  • ansible-role - Execute Ansible roles
  • validate-playbook - Validate playbook syntax
  • create-role-structure - Generate Ansible role directories

Infrastructure Tools

  • hardware-scan - Comprehensive hardware discovery
  • storage-analysis - Storage and SMART health analysis
  • network-interfaces - Network adapter discovery
  • discover-proxmox - Discover Proxmox VMs
  • generate-inventory - Create Ansible inventories

Security Tools

  • security-quick-scan - Quick security assessment
  • security-scan-ports - Port scanning
  • security-check-passwords - Password policy audit
  • security-audit-accounts - User account audit
  • security-check-ssh - SSH configuration audit

Service Management

  • browse-services - Browse service catalog
  • deploy-service - Deploy services from catalog
  • list-environments - List deployment environments
  • deploy-to-environment - Deploy with environment protection

Documentation

Testing

Run the comprehensive feature test suite:

# Run tests in development environment
npm test

# Test specific environments
npm run test:dev      # Development
npm run test:qa       # QA
npm run test:staging  # Staging
npm run test:prod     # Production

# Verbose output for debugging
npm run test:verbose

Our feature tests validate complete VM lifecycle workflows including:

  • VM creation from Proxmox templates
  • Service installation (Jenkins, etc.)
  • Service verification and management
  • VM deletion and cleanup
  • MCP context management

See Testing Guidelines for detailed information.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured