此内容没有您所选择的语言版本。

Chapter 2. Configuring the Ansible VS Code extension MCP server


As an automation developer, you can enable the Ansible MCP (Model context protocol) server to work with the Ansible VS Code extension. Doing so empowers Ansible development tools to give customized suggestions tuned specifically to your working environment.

You can enable the MCP server through the VS Code command palette, or the Settings menu.

2.1. Prerequisites

  • VS Code is installed and running.
  • The GitHub Copilot extension is installed, running, and enabled in Agent Mode.
  • The Ansible VS Code extension is installed.

Take the following steps to enable the MCP server through the VS Code command palette.

Procedure

  1. In VS Code, click into the command palette at the top of the window, or type ctrl + Shift + P or Cmd + Shift + P.
  2. Find and select Ansible: Enable Ansible development tools MCP Server.

    A message confirms that you have successfully enabled the MCP server and that it is now available for AI assistants that support MCP.

  3. Find and select MCP: List servers in the command palette. In the list you should see an entry for Ansible development tools MCP Server.
  4. Select Ansible development tools MCP Server to start the server.

Verification

Verify that the server has started by looking for Discovered 10 tools in your VS Code output window.

Take the following steps to enable the MCP server through the VS Code settings menu.

Procedure

  1. In VS Code, select the Extensions icon in the left menu.
  2. Find the Ansible VS Code extension and click the settings wheel.
  3. Select Settings from the menu that appears.
  4. In the Settings window, select Extensions > Ansible > MCP Server.
  5. Click the checkbox next to Enable the Ansible development tools MCP server for AI integration.

    A message confirms that the MCP server is enabled.

  6. Find and select Ansible: Enable Ansible development tools MCP Server.

    A message confirms that you have successfully enabled the MCP server and that it is now available for AI assistants that support MCP.

  7. Find and select MCP: List servers in the command palette at the top of the window. In the list that appears you should see an entry for Ansible development tools MCP Server.
  8. Select Ansible development tools MCP Server to start the server.

Verification

Verify that the server has started by looking for Discovered 10 tools in your VS Code output window.

2.4. Disable the MCP server

Take the following steps to disable the MCP server in VS Code.

Procedure

  • To disable the server from the VS Code command palette, find and select Disable Ansible development tools MCP Server.
  • To disable the server from the Ansible VS Code settings menu, navigate to Extensions > Ansible > MCP Server, and clear the checkbox next to Enable the Ansible MCP server for AI integration.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部