@mhdd_24/ansible-mcp
Provides tools for interacting with Ansible, enabling availability checks, inventory host listing, playbook syntax checking, and playbook execution.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@mhdd_24/ansible-mcp run the playbook site.yml in production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@mhdd_24/ansible-mcp
MCP server for Ansible: playbooks, inventories, and execution.
Same architecture as @mhdd_24/sublime-mcp.
Full documentation: docs/WIKI.md
How it works (30 seconds)
You (chat) → MCP client → ansible-mcp → Ansible APIs / CLIs / local toolsRelated MCP server: AAP MCP Server
Prerequisites
Requirement | Notes |
Node.js 18+ | ESM TypeScript MCP server |
Credentials / CLIs | See environment variables below |
Install
Option A — npm (after publish)
npm install -g @mhdd_24/ansible-mcpOption B — npx
npx @mhdd_24/ansible-mcpOption C — clone and build
git clone https://github.com/Mhdd-24/Ansible-MCP.git
cd Ansible-MCP
npm install
npm run build
node dist/index.jsConfigure Cursor
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"ansible": {
"command": "npx",
"args": ["-y", "@mhdd_24/ansible-mcp"],
"env": {
"ANSIBLE_PLAYBOOK_BIN": "...",
"ANSIBLE_WORKDIR": "..."
}
}
}
}Local development:
{
"command": "node",
"args": ["/absolute/path/to/Ansible-MCP/dist/index.js"]
}Environment variables
Variable | Description |
| ansible-playbook binary |
| Default workdir |
Tools
Tool | Description |
| Check ansible / ansible-playbook availability. |
| List inventory hosts. |
| Syntax-check a playbook. |
| Run a playbook (confirm required). |
License
ISC
Available Tools
4 toolsansible_list_inventoryB
List inventory hosts.
Inputs: inventory (required).
ansible_run_playbookC
Run a playbook (confirm required).
Inputs: playbook (required), confirm, extraVars, inventory.
ansible_statusA
Check ansible / ansible-playbook availability.
Inputs: no named parameters.
ansible_syntax_checkC
Syntax-check a playbook.
Inputs: playbook (required), inventory.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct action: checking environment, inventory listing, syntax validation, and playbook execution. There is no overlap in purpose, making selection unambiguous.
All tools follow the same ansible_ prefix followed by clear verb_noun structure. This consistent pattern makes the tool names predictable and easy to scan.
With only 4 tools, the server is tightly scoped to the core Ansible workflows. Every tool addresses a fundamental need and none feel redundant or unnecessary.
The server covers the main lifecycle for working with Ansible: verify availability, inspect inventory, validate playbooks, and run them. Missing are advanced features like ad-hoc commands or detailed inventory introspection, but these are not essential for basic operation.
Maintenance
Related MCP Connectors
Manage Pipefork API projects, drafts, connections, secrets, and deployments through MCP.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Manage Nife.io cloud apps, sites, secrets and Git integrations from MCP clients.
Authenticated MCP server for ClearPolicy policy and compliance workflows.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables management and analysis of AWS security groups, S3 buckets, and VPC connections via MCP.7MIT
- AlicenseBqualityDmaintenanceEnterprise-grade MCP server exposing Ansible Automation Platform 2.x as a complete AI interface for LLMs, enabling natural language management of automation resources.861Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables infrastructure operations including provisioning, configuration, monitoring, compliance auditing, and auto-remediation through natural language, using Terraform and Ansible tools exposed over MCP.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for Ansible automation, enabling AI clients to list inventories, ping hosts, run ad-hoc commands, validate and execute playbooks, and manage playbook files via SSE.-