Skip to main content
Glama
infra-mdsystems

ansible-mcp-server

Ansible NLP MCP

Codex がこの Ansible リポジトリと自然言語で対話できるようにするローカル MCP サーバー。汎用シェルを公開する代わりに、安全なツールを使用します。

ツール

  • health: ルート、タイムアウト、可変実行が有効かどうかを表示します。

  • list_playbooks: 実行可能なプレイブックとワークフローを一覧表示します。

  • inspect_playbook: plays、ホスト、vars_files、初期タスク、一般的な必須変数を要約します。

  • suggest_playbooks: 自然言語のリクエストからプレイブックをランク付けします。

  • inventory_graph: ansible-inventory --graph を実行します。

  • inventory_summary: インベントリのグループとホストを要約します。

  • syntax_check: ansible-playbook --syntax-check を実行します。

  • check_playbook: ansible-playbook --check を実行します。

  • run_playbook: 実際のプレイブックを実行します。デフォルトではブロックされます。

  • ping_hosts: ansible -m ping または ansible.windows.win_ping を実行します。

  • list_logstail_log: logs/ 内のログを照会します。

Related MCP server: AAP MCP Server

インストール

cd /root/ansible
python3 -m venv .venv-mcp
. .venv-mcp/bin/activate
pip install -r ansible_mcp/requirements.txt

ローカルテスト

cd /root/ansible
. .venv-mcp/bin/activate
python -m ansible_mcp.server

このコマンドは stdio 経由で MCP サーバーを起動し、MCP クライアントを待機します。

Codex での設定

プロジェクト内の .codex/config.toml の例、またはグローバルに有効にする場合は ~/.codex/config.toml の例:

[mcp_servers.ansible]
command = "/root/ansible/.venv-mcp/bin/python"
args = ["/root/ansible/ansible_mcp/server.py"]
cwd = "/root/ansible"
enabled = true
startup_timeout_sec = 10
tool_timeout_sec = 900
env = { ANSIBLE_MCP_ROOT = "/root/ansible", ANSIBLE_MCP_ALLOW_RUN = "0" }

ANSIBLE_MCP_ALLOW_RUN = "0" の場合、MCP は検査、インベントリ、ping、syntax-check、check-mode を許可しますが、プレイブックの実際の実行はブロックします。

可変実行を許可するには:

[mcp_servers.ansible]
command = "/root/ansible/.venv-mcp/bin/python"
args = ["/root/ansible/ansible_mcp/server.py"]
cwd = "/root/ansible"
enabled = true
startup_timeout_sec = 10
tool_timeout_sec = 900
env = { ANSIBLE_MCP_ROOT = "/root/ansible", ANSIBLE_MCP_ALLOW_RUN = "1" }

有効にしても、run_playbook はツール呼び出しで confirm = "RUN" を依然として要求します。

NLP インテントの例

  • "wuday1 の Windows を更新するにはどのプレイブックを使いますか?"

  • "day=wuday1 で Windows Update のプレイブックの syntax-check を実行してください。"

  • "rocky グループのみで Linux 更新をチェックモードで実行してください。"

  • "Citrix Day の最新ログを表示してください。"

  • "インベントリのグループを一覧表示し、各グループに何台のホストがあるか表示してください。"

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    C
    quality
    F
    maintenance
    This Model Context Protocol server enables AI assistants to interact directly with Ansible, allowing them to execute playbooks, manage inventory, check syntax, and perform other Ansible operations.
    18
    26
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enterprise-grade MCP server exposing Ansible Automation Platform 2.x as a complete AI interface for LLMs, enabling natural language management of automation resources.
    86
    1
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    Industry-standard MCP server for AWX/AAP/Ansible Tower automation, enabling AI agents to manage job templates, launch and monitor jobs, and handle inventories and projects through natural language.
    10

View all related MCP servers

Related MCP Connectors

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

  • GibsonAI MCP server: manage your databases with natural language

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

View all MCP Connectors

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/infra-mdsystems/ansible_mcp-server'

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