ansible-log-mcp
Provides the ability to trigger Ansible playbooks that scan logs across an inventory group and return combined results from the target hosts.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ansible-log-mcp
MCP server that lets Claude Desktop trigger Ansible-driven log scans across
an inventory group (e.g. patching_group, up to 200+ hosts) and returns
combined results.
Architecture
Claude Desktop -> MCP server (stdio) -> Ansible playbook -> target hosts (parallel forks) -> combined result -> back up the same chain.
Related MCP server: log-analyzer-mcp
Setup
git clone <this-repo>
cd ansible-log-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtEdit config.yaml:
playbook_dir/inventory_path— point at real pathsallowed_groups— restrict to groups this server may touch
Symlink the real inventory instead of duplicating it:
ln -sf /etc/ansible/hosts playbooks/inventory/hosts.iniTest before wiring into Claude Desktop
# 1. Playbook directly, against a small test group
ansible-playbook playbooks/logscan.yml \
-i playbooks/inventory/hosts.ini \
-e target_group=dev_test_hosts -e search_pattern=error -f 5
# 2. Unit tests
pytest tests/
# 3. MCP server via inspector (browser UI, no Claude Desktop needed)
npx @modelcontextprotocol/inspector python3 server/ansible_mcp.pyWire into Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ansible-logs": {
"command": "/absolute/path/to/.venv/bin/python3",
"args": ["/absolute/path/to/ansible-log-mcp/server/ansible_mcp.py"]
}
}
}Restart Claude Desktop. Ask: "scan patching_group for kernel panics in the last day."
Security notes
Runs as a dedicated
claude-agentSSH user, key-based auth onlyallowed_groupsinconfig.yamlis the only guardrail on scope — keep it tightNo
become: trueby default; add sudo only for specific read commands if needed, not blanket root
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your app's logs, metrics and incidents from your AI assistant.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Read and write Sage Intacct from Claude or ChatGPT. Write tools are flagged for approval.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables comprehensive Ansible automation management through natural language, including playbook creation and execution, inventory management, role scaffolding, and project workflows. Supports both local inventories and full project lifecycle management with syntax validation and idempotency testing.30-
- FlicenseBqualityDmaintenanceEnables log analysis, searching, counting, and system metrics retrieval (CPU, memory, disk) via natural language, using 5 tools that can be integrated with Claude Code.5-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to discover and launch Ansible job templates on Ansible Automation Platform, monitor job status, and retrieve outputs.4-
- FlicenseCqualityDmaintenanceEnables AI assistants to manage Ansible infrastructure, including inventories, playbooks, roles, and advanced troubleshooting with self-healing capabilities.39-