@mhdd_24/ansible-mcp
v1.0.0
Published
MCP server for Ansible: playbooks, inventories, and execution
Maintainers
Readme
@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 toolsPrerequisites
| 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_BIN | ansible-playbook binary |
| ANSIBLE_WORKDIR | Default workdir |
Tools
| Tool | Description |
|------|-------------|
| ansible_status | Check ansible / ansible-playbook availability. |
| ansible_list_inventory | List inventory hosts. |
| ansible_syntax_check | Syntax-check a playbook. |
| ansible_run_playbook | Run a playbook (confirm required). |
License
ISC
