Skip to main content
Glama
debabrata-oss

ansible-log-mcp

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.txt

Edit config.yaml:

  • playbook_dir / inventory_path — point at real paths

  • allowed_groups — restrict to groups this server may touch

Symlink the real inventory instead of duplicating it:

ln -sf /etc/ansible/hosts playbooks/inventory/hosts.ini

Test 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.py

Wire 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-agent SSH user, key-based auth only

  • allowed_groups in config.yaml is the only guardrail on scope — keep it tight

  • No become: true by 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. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables 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
    -
  • F
    license
    B
    quality
    D
    maintenance
    Enables 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
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects Claude to OCI Logging Analytics for natural language querying and analysis of security logs, including detection catalog, MITRE ATT&CK integration, and cross-log correlation.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/debabrata-oss/ansible-log-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server