</>MCP Agents Market
MCP Server

vscode-terraform

by hashicorp975TypeScriptUpdated 2026-09-03

HashiCorp Terraform VSCode extension

The HashiCorp Terraform extension for Visual Studio Code integrates the Terraform Language Server and includes an MCP server component that provides AI-powered assistance for Terraform development. When enabled, it registers the Terraform MCP Server to deliver advanced AI capabilities through the Model Context Protocol, giving AI assistants contextual knowledge about Terraform providers, modules, and best practices. The MCP server runs as a container (hashicorp/terraform-mcp-server) and requires Docker or Podman, extending the extension's existing features like IntelliSense, syntax validation, code navigation, and HCP Terraform workspace integration with AI-driven development support.

Key Features

MCP server integration providing AI assistance with Terraform provider, module, and best practice knowledge
Container-based MCP server deployment using Docker or Podman with automatic lifecycle management
IntelliSense and autocomplete for Terraform, Terraform Stacks, Terraform Search, and Terraform Policy files
Real-time syntax validation and enhanced validation based on detected Terraform and provider versions
Code navigation with Go to Definition and Symbol support across modules and configurations
Automatic code formatting using terraform fmt for all Terraform file types
HCP Terraform workspace integration with run status viewing and log inspection within VS Code
Terraform module and provider explorer with Registry documentation links

Use Cases

  • 01Enabling AI-powered Terraform development assistance through MCP server integration in compatible AI clients
  • 02Writing infrastructure-as-code with context-aware completions for resources, data sources, and modules
  • 03Validating Terraform configurations in real-time to catch errors, deprecations, and missing attributes
  • 04Managing HCP Terraform workspaces and monitoring run statuses directly from the editor
  • 05Navigating complex Terraform projects with multiple modules using Go to Definition and symbol references
  • 06Authoring Terraform policies and policy tests with specialized autocomplete support

Related MCP Servers

View more

vscode-terraform — FAQ

What is the Terraform VS Code extension's MCP server integration?+

It's a feature that registers the Terraform MCP Server to provide AI assistants with contextual knowledge about Terraform providers, modules, and best practices through the Model Context Protocol. The MCP server runs as a container and is disabled by default but can be enabled through settings or the command palette.

How do I enable the Terraform MCP server in VS Code?+

Use the command palette to run 'HashiCorp Terraform: Enable MCP Server' or set 'terraform.mcp.server.enable' to true in settings. You must have Docker or Podman installed and running on your system before enabling the feature.

What are the prerequisites for using this extension?+

You need VS Code v1.86 or greater and Terraform v0.12 or higher installed. For MCP server integration specifically, you must have either Docker or Podman installed and running as a container runtime.

Which AI clients work with the Terraform MCP server?+

Any AI client that supports the Model Context Protocol (MCP) can interact with the Terraform MCP server once it's enabled in VS Code. The extension automatically manages the server lifecycle for AI interactions.

Is the Terraform VS Code extension free to use?+

Yes, the HashiCorp Terraform extension for VS Code is free and open source. It's available on the Visual Studio Code Marketplace and includes all features, including the optional MCP server integration, at no cost.

What container runtime does the MCP server support?+

The extension automatically detects and supports both Docker (preferred) and Podman (fallback). It uses Docker if available and running, otherwise falls back to Podman if installed and running.

How do I install vscode-terraform?+

Open the source repository on GitHub and follow its README. vscode-terraform is a mcp server — MCP Agents Market links you directly to the official repo.

Is vscode-terraform free?+

vscode-terraform is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches