Is the Ansible MCP server safe? What it can reach
What the Ansible MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
Red Hat’s Ansible team ships an official local MCP server for Ansible development tools. It runs over stdio with no sign-in, so it acts with your own account’s permissions on your machine. It can create projects, install packages and run playbooks through ansible-navigator, which can change real hosts. Red Hat also offers a separate Automation Platform MCP server (technology preview) with a read-only mode.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| @ansible/ansible-mcp-server (Ansible development tools) | Official | active |
| MCP server for Red Hat Ansible Automation Platform (technology preview) | Official | active |
It runs as a local process on your machine.
How it signs in
The development tools server has no credential. It runs as a child process of your MCP client with that process’s permissions. The Automation Platform server is a separate product that inherits each user’s role-based access.
What its tools can do
| Kind | Tools |
|---|---|
| Read | zen_of_ansible, ansible_content_best_practices, list_available_tools, ade_environment_info |
| Write | ansible_lint, ade_setup_environment, adt_check_env, ansible_create_playbook, ansible_create_collection, define_and_build_execution_env |
| Can’t be undone | ansible_navigator |
These are the 11 tools of the development tools server. ansible_lint only edits files when fix is true. ansible_navigator runs a playbook, so its effect depends on the playbook and the hosts it targets, which is why it sits under destructive. The Automation Platform server lists six toolsets (job, inventory, system monitoring, user, security and compliance, platform configuration) but no tool names, so they are not covered here.
Built-in limits
| Option | What it does |
|---|---|
WORKSPACE_ROOT | Optional environment variable that sets the root for file operations. It defaults to the current working directory. |
ansible_lint fix parameter | Automatic fixes are applied only when fix is true. |
ansible_navigator disableExecutionEnvironment and environment | The environment parameter picks auto, system, venv or a named venv. disableExecutionEnvironment defaults to false. |
Automation Platform read-only mode | Red Hat says administrators can run the Automation Platform MCP server read-only for querying and monitoring, or read-write so agents can run jobs. |
Automation Platform RBAC | Platform actions follow the signed-in user’s role-based access. Red Hat advises a read-only token unless the assistant needs to launch jobs. |
The risks
- ansible_navigator can run any playbook your agent points it at, so an injected instruction in a README or a collection could make it change servers that your user can reach.
- ade_setup_environment and adt_check_env install Python packages and collections on your machine, so a poisoned requirements file could pull in code you did not choose.
- ansible_lint with fix set to true rewrites playbook files in place, and ansible_create_playbook and ansible_create_collection write new project files in your workspace.
- Red Hat says the Automation Platform server can launch jobs and modify platform state, and it is a technology preview, so use a development or staging instance.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env WORKSPACE_ROOT=... ansible -- npx -y @ansible/ansible-mcp-server --stdioClaude Code names MCP tools mcp__ansible__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__ansible__ansible_navigator"
],
"ask": [
"mcp__ansible__ansible_lint",
"mcp__ansible__ade_setup_environment",
"mcp__ansible__adt_check_env",
"mcp__ansible__ansible_create_playbook",
"mcp__ansible__ansible_create_collection",
"mcp__ansible__define_and_build_execution_env"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.ansible]
command = "npx"
args = ["-y", "@ansible/ansible-mcp-server", "--stdio"]
env_vars = ["WORKSPACE_ROOT"]
disabled_tools = ["ansible_navigator"]Checklist
- Deny ansible_navigator until you have read the playbook it would run.
- Set WORKSPACE_ROOT to the project folder, not your home folder.
- Ask before ansible_lint runs with fix, since it edits files.
- For the Automation Platform server, use read-only mode and a read-only token on a staging instance.
Checked against the vendor documentation on November 25, 2026. Ansible MCP server: tools reference · Red Hat Developer: Ansible development tools MCP server · Red Hat blog: MCP server for Ansible Automation Platform
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing