mcp-ansible mcp
v1.0.1 · MCP Tool · devops · registry.pascalai.org
Ansible CLI wrapper — ping hosts, run ad-hoc modules, execute playbooks, gather facts. Requires ansible/ansible-playbook in PATH.
ansibleautomationdevopsconfigurationplaybook
Input Parameters
| Parameter | Type | Description |
| operationrequired |
string |
Operation to perform. One of: ping, run_module, run_playbook, list_hosts, list_tasks, check, syntax_check, gather_facts. |
| inventoryrequired |
string |
Path to inventory file or directory, or comma-separated hosts (e.g. host1,host2,). |
| hostsoptional |
string |
Host pattern (default: all) e.g. webservers, 192.168.1.0/24. Default: all. |
| playbookoptional |
string |
Path to playbook .yml file. Required for: run_playbook, list_tasks, check, syntax_check. |
| moduleoptional |
string |
Module name for run_module/gather_facts (default: command). Default: command. |
| moduleArgsoptional |
string |
Module arguments e.g. 'cmd=uptime'. |
| extraVarsoptional |
string |
Extra variables as JSON string or key=val pairs. |
| tagsoptional |
string |
Tags to run (comma-separated). |
| skipTagsoptional |
string |
Tags to skip (comma-separated). |
| limitoptional |
string |
Limit to subset of hosts. |
| useroptional |
string |
Remote user (-u). |
| privateKeyoptional |
string |
Path to private key file. |
| forksoptional |
integer |
Number of parallel forks (default: 5). Default: 5. |
| verboseoptional |
boolean |
Verbose output (-v). Default: False. |
| timeoutoptional |
integer |
Command timeout in seconds (default: 300). Default: 300. |
Output Fields
| Field | Type | Description |
| ok |
boolean |
|
| output |
string |
|
| exit_code |
integer |
|
| timeout |
boolean |
|
| error |
string |
|
Examples
Ping all hosts
// Input
{
"operation": "ping",
"inventory": "/ansible/hosts"
}
// Output
{
"ok": true,
"output": "..."
}
Run deployment playbook
// Input
{
"operation": "run_playbook",
"inventory": "/ansible/hosts",
"playbook": "/ansible/deploy.yml",
"limit": "web_servers"
}
// Output
{
"ok": true
}
Install & Discovery
Install
ppm install mcp-ansible
Get JSON Schema
GET /v1/packages/mcp-ansible/1.0.1/schema
Discover by keyword
GET /v1/mcp/discover?q=ansible
Discovery hint: Install with ppm install mcp-ansible or invoke remotely via POST /v1/invoke/mcp-ansible on the MCP Service.
PascalAI Usage
uses toolslib;
var Tool := LoadTool('mcp-ansible');
var R := Tool.Call(JsonObj(['operation','ping','inventory','/ansible/hosts']));
Writeln(R.ToJSON);