AI Integration via MCP

Connect advanced AI agents to your infrastructure with the Model Context Protocol.

IaCConsole provides native support for the Model Context Protocol (MCP). This allows advanced AI agents, like Google’s Gemini, to autonomously query your Configuration Management Database (CMDB), read infrastructure state, and assist with troubleshooting directly from their CLI or interface.

What is MCP?

The Model Context Protocol is an open standard that enables AI models to securely connect to external data sources and tools. By implementing an MCP server, IaCConsole exposes its internal inventory, dimensions, and execution history as “tools” that an AI can use to reason about your infrastructure.

Adding IaCConsole to Gemini CLI

You can easily add the IaCConsole MCP server to your local gemini-cli environment. This gives your local AI assistant direct access to your live infrastructure data.

Prerequisites

  • You must have the Gemini CLI installed.
  • You need a valid IaCConsole API token.

Configuration Command

To add the server, use the gemini mcp add command. We use the http transport to maintain an asynchronous Streamable HTTP connection over the network.

Run the following command in your terminal, replacing your_api_token with your actual token:

gemini mcp add --transport http --header "Authorization: Bearer your_api_token" iacconsole https://api.iacconsole.com/v1/mcp

How to use it

Once added, the Gemini CLI will automatically discover the tools provided by IaCConsole (such as query_dimensions, set_dimension, and delete_dimension).

You can now ask Gemini questions like:

  • “What are the dimensions in the ‘myOrg’ organization?”
  • “Check the current state of my production workspace.”

Gemini will securely use your token to query the IaCConsole API and provide context-aware answers based on your actual infrastructure configuration.

Master Branch Protection

To protect production infrastructure from autonomous or accidental modifications by AI agents, VirtualGitOps enforces strict branch protection on the master workspace.

While AI agents and MCP tools (query_dimensions) can freely read and analyze the state of the master branch, any tools that attempt to modify state (set_dimension, delete_dimension) will automatically fail if the target workspace is empty or explicitly set to master.

All AI-driven changes, experiments, or updates must be executed on isolated workspaces/branches. Once the AI finishes its work and the changes are validated, they can be merged into master via standard approval workflows.