Vhtforums
AI Assistant
Adding Terraform MC...
 
Notifications
Clear all

Adding Terraform MCP server to Claude Desktop

1 Posts
1 Users
0 Reactions
1,713 Views
Brandon Lee
Posts: 689
Admin
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brandon-lee)
Member
Joined: 16 years ago
[#454]

I have been experimenting with a lot of MCP servers lately. How about you? One of the interesting ones I wanted to add was the Terraform MCP server since I work with a lot of Terraform code. You can easily add this to your Claude Desktop environment with just a simple file edit.

However, you will need to have Docker installed and running locally. In Windows I am using Docker Desktop to spin up the local Docker container. Just make sure you have Docker running and healthy before working with the Terraform MCP server.

In Windows, navigate to "c:\users\<your user>\AppData\Roaming\Claude\claude_desktop_config.json" and edit this file. Add the following code to the file and save it.

{
  "mcpServers": {
    "terraform": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "hashicorp/terraform-mcp-server:latest"
      ]
    }
  }
}

Exit out of Claude desktop and make sure you exit out in the task tray as well as it will keep running in the background by default. Now, relaunch Claude Desktop.

In Docker Desktop, you should see the following container launch:

terraform mcp server running in docker desktop

Also, if you navigate to Claude > File > Settings > Developer you will see the following:

claude desktop terraform mcp server running