claude-iac-mcp-server
Enables GitHub Copilot to generate compliant Terraform configurations for Azure by interacting with the MCP server's registry and tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-iac-mcp-serverProvision a storage account and a Postgres database for the payments app in prod."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI-Assisted IaC Self-Service Platform (Azure + Terraform)
An AI-assisted self-service platform for infrastructure. Developers use Claude Code or GitHub Copilot to query an approved Terraform module registry and generate compliant Azure infrastructure — without hand-rolling Terraform or pulling random modules off the internet.
The approved registry is hybrid:
Azure Verified Modules (AVM) — Microsoft's curated, compliance-grade modules from the public Terraform Registry (the baseline).
Your own modules — hosted in a GitHub repo and referenced via a
git::source. No registry product required. Seeregistry/modules/TEMPLATE-custom-git-module.yaml.
It has two halves:
An IaC MCP server (
server/iac_mcp_server.py) — exposes the approved module registry + standards as MCP tools.Agent skill / context (
skills/iac-self-service/SKILL.md) — encodes how the agent must use those tools to stay compliant.
developer ──▶ Claude Code / Copilot ──MCP──▶ iac_mcp_server ──▶ registry/ + standards/
│ (AVM + your git modules)
└── guided by skills/iac-self-service/SKILL.mdNote on names:
acmeis a placeholder org name and theapp.terraform.io/acme/*entry is an optional private-registry example. Replaceacmewith your own short name to brand it. The real, working modules are the AVM ones.
Layout
Path | Purpose |
| FastMCP server (7 tools) |
| The allowlist of approved modules |
| Per-module spec: source, version, |
| How to register your own git module |
| Naming, regions, required tags, source allowlist, security baseline |
| The agent skill encoding the standards |
| Example output: a compliant, AVM-based |
| Claude Code MCP wiring |
| Fast smoke test of the tools (19 checks) |
Related MCP server: Terraform Registry MCP Server
MCP tools
Tool | What it does |
| List approved modules (optionally by category) |
| Free-text search the registry |
| Full spec: source, version, |
| The org standards the agent must honor |
| Scaffold a compliant block (naming, RG wiring, tags) + |
| Heuristic policy check before |
| Hot-reload registry/standards after edits |
Setup
pip install -r requirements.txt
python tests/smoke_test.py # expect: ALL PASSED (19 checks)Use with Claude Code
.mcp.json is already provided. From the repo root:
claude # auto-discovers .mcp.json and starts the serverLoad the skill once:
New-Item -ItemType Directory -Force .claude\skills\iac-self-service | Out-Null
Copy-Item skills\iac-self-service\SKILL.md .claude\skills\iac-self-service\Then ask: "Provision a storage account and a Postgres database for the payments app
in prod." The agent runs list_standards → search_modules → get_module →
generate_module_usage → validate_config and writes a compliant main.tf.
Use with GitHub Copilot
Copilot (VS Code) reads MCP servers from .vscode/mcp.json:
{
"servers": {
"acme-iac-platform": {
"type": "stdio",
"command": "python",
"args": ["${workspaceFolder}/server/iac_mcp_server.py"]
}
}
}Mirror the rules from SKILL.md into .github/copilot-instructions.md so Copilot Chat
applies them.
Deploying the example
The generated example lives in environments/prod/payments/. To deploy it against
your Azure state account without editing committed files:
cd environments/prod/payments
Copy-Item backend.local.hcl.example backend.local.hcl # edit values if needed
terraform init -backend-config=backend.local.hcl
terraform plan
terraform applyThe example uses real AVM modules, so terraform init actually downloads them. The
state backend account (e.g. myterrasa) must already exist — backend.local.hcl is
gitignored, so your real account names never get published.
Add one of YOUR own modules
Copy
registry/modules/TEMPLATE-custom-git-module.yamltoregistry/modules/<name>.yaml.Set
sourceto agit::https://github.com/<you>/...//modules/<name>?ref=v1.0.0,rg_refto match how your module takes its resource group, andstatus: approved.Add
<name>toregistry/catalog.yaml.refresh_registry()(or restart). The AI now self-serves your module too.
Production hardening (next steps)
Replace the heuristic
validate_configwith OPA/Conftest policies, run both here and in CI (the heuristic is a fast pre-flight, not the enforcement gate).Pin AVM versions centrally and add a renovate/dependabot job to bump them.
Add auth + run the server over HTTP (streamable-http) for a shared team instance instead of per-developer stdio.
Emit telemetry on which modules are generated to measure adoption.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/net9876/claude-iac-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server