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

triangle-exclamation

Pre-Requisites

  • The following are required before the server will run

brew install uv terraform checkov
uv python install 3.10

MCP Setup

  • Then run the installation command below to add the MCP server to your ~/.claude.json configuration

    • --scope

      • setting to user will enable us to the MCP server anytime otherwise

      • setting to project will only use the MCP server within a project directory e.g., my-project-folder/project-code

  • Alternatively, you can copy/paste this into your ~/.cluade.json file for the same effect but the previous CLI command is recommended to avoid issues

MCP Health Checks

  • Check to ensure the MCP server is running

MCP Configuration

  • The GitHub repo for this particular AWS Terraform MCP server can be found herearrow-up-right so be sure to review all the code it can run

  • Additionally, the MCP code gets cached locally and since we installed this with uv we can find the data in these paths

circle-info

The * will be unique to your environment


Resources

Last updated