AWS Terraform MCP Server

How to setup AWS's Terraform MCP Server

Overview

  • AWS has open-sourced an MCP server specifically for using Terraform on AWS

  • It includes things like best practices, security scanning (checkov), documentation, and more

  • While AI is capable of writing Terraform, this provides it with more prescriptive and up-to-date guidance


Installation

Pre-Requisites

  • The following are required before the server will run

brew install uv terraform checkov
uv python install 3.10

MCP Config

  • Since I use the Claude Code extension in VS Code, adding this to ~/.claude.json will ensure the MCP server can be used

"mcpServers": {
    "awslabs.terraform-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.terraform-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false,
      "autoApprove": []
    }
  }

Resources

Last updated