{"slug": "show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks", "title": "Show HN: Rocannon – Any Ansible module to MCP Tool, record sessions as playbooks", "summary": "Rocannon, a new open-source tool, converts any installed Ansible module or role into a typed MCP (Model Context Protocol) tool, enabling AI assistants like Claude Code and Cursor to drive real infrastructure via natural language. The tool also records sessions as standard Ansible playbooks and supports dry runs, check mode, and a CLI interface.", "body_md": "**Every installed Ansible module and role, as a typed MCP tool.**\n\nRocannon runs on your Ansible control node and turns it into an MCP server. At\nstartup it reads `ansible-doc`\n\nand exposes every module you have installed (plus\nany role with an argument spec) as a typed tool, so an MCP client like Claude\nCode, Cursor, or your own agent can drive your real environment in plain English.\nThe tool surface is whatever you have installed, one collection or a hundred.\n\n*Claude Haiku driving Rocannon's typed Ansible tools against a real RHEL 9 host.*\n\n```\npip install rocannon\n```\n\nThis brings `ansible-core`\n\nand `ansible-runner`\n\nwith it. `rocannon doctor`\n\nchecks the environment for anything missing.\n\n```\nrocannon quickstart\n```\n\nScaffolds a `localhost`\n\nprofile under `.rocannon/`\n\nand prints the wiring for your\nMCP client (Claude Code, Claude Desktop, Cursor) plus a command to confirm the\ntools registered. Then ask your assistant something like *\"Gather facts from\nlocalhost and tell me the OS and kernel version.\"*\n\nYou don't need an LLM, though. The same tools are a shell:\n\n```\nrocannon mcp doctor --profile .rocannon/quickstart.yml   # list registered tools\nrocannon repl       --profile .rocannon/quickstart.yml   # operator shell\n```\n\n**Reflects your modules.** Each installed module becomes a typed MCP tool, with parameters, types, defaults, and choices read from`ansible-doc`\n\n. Whatever you install shows up automatically.**Reflects your roles.** A role with a`meta/argument_specs.yml`\n\nbecomes a typed tool too; its arguments are the parameters, validated by ansible at run time.**Carries the metadata.** Tools get safety hints (read-only vs destructive), collection and namespace tags, and a`meta`\n\nblock with the module's documented requirements, return keys, and version, straight from`ansible-doc`\n\n.**No lock-in.** Record any session, from an agent or the CLI, to a standard Ansible playbook under`.rocannon/playbooks/`\n\nthat runs with plain`ansible-playbook`\n\n. Saved sessions also load back as MCP prompts.**Dry runs.** Modules that support check mode expose`--check`\n\nand`--diff`\n\n, both on the CLI and as MCP tool parameters.**A CLI, too.** Every module is a subcommand:`rocannon ansible.builtin.copy --target h1 -i hosts --src a --dest b`\n\n.\n\n: natural language to ad-hoc Ansible on a real RHEL 9 host, then replayed as a standard playbook.`examples/case-study`\n\n: the same agent driving a two-node Arista cEOS fabric, where the`examples/containerlab`\n\n`arista.eos`\n\nmodules become tools.: Rocannon baked into an Ansible Execution Environment for a frozen, reproducible tool set.`examples/execution-environment`\n\nA profile is a YAML file declaring an inventory plus the modules and roles to expose:\n\n```\ninventories:\n  - ./hosts\nmodules:\n  - ansible.builtin\n  - community.docker\nroles:                      # optional\n  - my_ns.my_coll.setup_web\nroles_path: ./roles         # optional, for standalone (non-collection) roles\n```\n\ntakes a module (`modules`\n\n`ansible.builtin.copy`\n\n), a collection (`ansible.builtin`\n\n), or a namespace (`community`\n\n). Only modules become tools; filter and lookup plugins are skipped.takes a collection role by FQCN, or a standalone role by its directory name together with`roles`\n\n`roles_path`\n\n(which resolves against the profile's own directory). Roles without an argument spec are skipped.- Optional keys:\n`ansible_cfg`\n\n,`vault_password_file`\n\n,`extra_envvars`\n\n.\n\nDrop multiple profiles in `.rocannon/profiles/`\n\n(with a `default.yml`\n\n) and switch\nat runtime via the `rocannon_list_profiles`\n\n, `rocannon_current_profile`\n\n, and\n`rocannon_use_profile`\n\ntools.\n\nDependencies:modules with third-party Python libraries (for example`community.crypto`\n\nneeds`cryptography`\n\n,`community.docker`\n\nneeds the`docker`\n\nSDK) need them installed in the same environment as Rocannon. The quickstart inventory pins`ansible_python_interpreter`\n\nso localhost runs use it.\n\n```\nrocannon quickstart    scaffold a localhost profile and print client wiring\nrocannon <fqcn>        invoke a module: rocannon ansible.builtin.copy ...\n                       optional --record FILE appends each call to a playbook\nrocannon mcp serve     start the MCP server (stdio or http)\nrocannon mcp doctor    list registered tools, resources, prompts\nrocannon repl          interactive shell on the same MCP server\nrocannon doctor        system health (binaries, env, inventory)\nrocannon doc <module>  print parsed schema for a module\nrocannon search <q>    find modules by name or description\nrocannon ls <kind>     list hosts, groups, or modules from a profile\nrocannon playbook      list/show/run saved playbooks\n```\n\nEach module invocation needs an inventory: pass `-i/--inventory`\n\n, `--profile`\n\n,\nor run where a `.rocannon/profiles/`\n\nis discovered. `rocannon <fqcn> --help`\n\nshows that module's typed flags.\n\nA working `.mcp.json`\n\nships at the repo root; per-client snippets are in\n[ examples/clients/](/msradam/rocannon/blob/main/examples/clients).\n\n| Client | Config location |\n|---|---|\n| Claude Code | `.mcp.json` at project root, or `claude mcp add` |\n| Claude Desktop | macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` |\n| Cursor | `.cursor/mcp.json` or `~/.cursor/mcp.json` |\n| mcphost | `~/.mcphost.yml` or `--config <path>` |\n| IBM Bob | `.bob/mcp.json` or `~/.bob/mcp_settings.json` |\n\nAll use the standard `mcpServers`\n\nenvelope pointing at\n`rocannon mcp serve --profile <your-profile.yml>`\n\n.\n\n```\ngit clone https://github.com/msradam/rocannon.git\ncd rocannon\nuv sync\n./tests/check.sh                # ruff format + lint + mypy + pytest\nuv run pytest -m integration    # opt-in: real Ansible against localhost / a UBI9 container\n```\n\nSee [ ARCHITECTURE.md](/msradam/rocannon/blob/main/ARCHITECTURE.md) for how the pieces fit together.\nRocannon is developed with AI assistance.\n\nUrsula K. Le Guin coined the word \"ansible\" in her 1966 novel *Rocannon's\nWorld*. The gryphon is a nod to the Windsteeds that Rocannon and his companions\nride.\n\n- Gryphon icon:\n[Gryphon by Aleksei Kovalenko from Noun Project](https://thenounproject.com/icon/gryphon-7096619/)(CC BY 3.0).", "url": "https://wpnews.pro/news/show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks", "canonical_source": "https://github.com/msradam/rocannon", "published_at": "2026-06-21 00:40:38+00:00", "updated_at": "2026-06-21 01:07:10.916313+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Rocannon", "Ansible", "Claude Code", "Cursor", "MCP", "Red Hat Enterprise Linux", "Arista cEOS", "Containerlab"], "alternates": {"html": "https://wpnews.pro/news/show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks", "markdown": "https://wpnews.pro/news/show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks.md", "text": "https://wpnews.pro/news/show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks.txt", "jsonld": "https://wpnews.pro/news/show-hn-rocannon-any-ansible-module-to-mcp-tool-record-sessions-as-playbooks.jsonld"}}