ansible-mcp-server

ansible-mcp-server

MCP server that enables natural language interaction with an Ansible repository, providing tools for inventory inspection, syntax checking, and playbook execution with configurable safety controls.

Category
Visit Server

README

Ansible NLP MCP

Servidor MCP local para permitir que o Codex interaja com este repositório Ansible por linguagem natural, usando ferramentas seguras em vez de expor um shell genérico.

Ferramentas

  • health: mostra raiz, timeout e se execução mutável está habilitada.
  • list_playbooks: lista playbooks e workflows executáveis.
  • inspect_playbook: resume plays, hosts, vars_files, tasks iniciais e variáveis obrigatórias comuns.
  • suggest_playbooks: ranqueia playbooks a partir de um pedido em linguagem natural.
  • inventory_graph: executa ansible-inventory --graph.
  • inventory_summary: resume grupos e hosts do inventário.
  • syntax_check: executa ansible-playbook --syntax-check.
  • check_playbook: executa ansible-playbook --check.
  • run_playbook: executa playbook real, bloqueado por padrão.
  • ping_hosts: executa ansible -m ping ou ansible.windows.win_ping.
  • list_logs e tail_log: consulta logs dentro de logs/.

Instalação

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

Teste local

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

Esse comando inicia um servidor MCP por stdio e fica aguardando um cliente MCP.

Configuração no Codex

Exemplo para .codex/config.toml no projeto, ou para ~/.codex/config.toml se quiser habilitar globalmente:

[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" }

Com ANSIBLE_MCP_ALLOW_RUN = "0", o MCP permite inspeção, inventário, ping, syntax-check e check-mode, mas bloqueia execução real de playbooks.

Para permitir execução mutável:

[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" }

Mesmo habilitado, run_playbook ainda exige confirm = "RUN" na chamada da ferramenta.

Exemplos de intenção NLP

  • "Qual playbook eu uso para atualizar Windows do wuday1?"
  • "Faça syntax-check do playbook de Windows Update com day=wuday1."
  • "Rode em check mode a atualização Linux só no grupo rocky."
  • "Mostre os últimos logs do Citrix Day."
  • "Liste os grupos de inventário e quantos hosts existem em cada um."

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured