Terraform MCP Server
@hashicorp
About Terraform MCP Server
The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"terraform-mcp-server": {
"command": "docker",
"args": [
"run",
"-p",
"8080:8080",
"--rm",
"-e",
"TRANSPORT_MODE=streamable-http",
"-e",
"TRANSPORT_HOST=0.0.0.0",
"hashicorp/terraform-mcp-server"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Terraform MCP Server?
The Terraform MCP Server is a Model Context Protocol server that integrates with Terraform Registry APIs, HCP Terraform, and Terraform Enterprise. It enables AI assistants to manage Infrastructure as Code workflows, including workspace operations, provider/module lookups, and run management.
How to use Terraform MCP Server?
Run the server as a Docker container configured via environment variables. Connect it to an MCP-compatible assistant (VS Code, Cursor, Claude Desktop, etc.). Use the terraform-mcp-server stdio or terraform-mcp-server streamable-http command, or the equivalent Docker command, depending on your chosen transport mode. Set required environment variables like TFE_TOKEN, TFE_ADDRESS, and optionally TRANSPORT_MODE.
Key features of Terraform MCP Server
- Dual transport: Stdio and StreamableHTTP
- Terraform Registry integration for providers, modules, policies
- HCP Terraform and Terraform Enterprise workspace management
- Workspace CRUD with variables, tags, and run management
- OpenTelemetry metrics for tool usage monitoring
- Security and access controls (rate limiting, organization allowlists, TLS)
Use cases of Terraform MCP Server
- Manage Terraform workspaces (create, update, delete) via chat
- Query the Terraform Registry for provider and module versions
- Automate infrastructure deployment with AI assistants
- Audit workspace configurations and variables across organizations
- Integrate IaC workflows directly into IDE agent mode (VS Code, Cursor)
FAQ from Terraform MCP Server
What are the prerequisites for running the Terraform MCP Server?
You need Docker installed and running, plus an AI assistant that supports the Model Context Protocol (MCP).
What data does the Terraform MCP Server expose?
Depending on the query, the server may expose certain Terraform data to the MCP client and LLM. Do not use it with untrusted MCP clients or LLMs.
How do I configure the Terraform MCP Server for my organization?
Configure it via environment variables such as TFE_ADDRESS, TFE_TOKEN, and TRANSPORT_MODE. For StreamableHTTP mode you can set host, port, TLS, rate limits, and an organization allowlist.
How do I monitor usage of the Terraform MCP Server?
Enable OpenTelemetry
Frequently asked questions
What are the prerequisites for running the Terraform MCP Server?
You need Docker installed and running, plus an AI assistant that supports the Model Context Protocol (MCP).
What data does the Terraform MCP Server expose?
Depending on the query, the server may expose certain Terraform data to the MCP client and LLM. Do not use it with untrusted MCP clients or LLMs.
How do I configure the Terraform MCP Server for my organization?
Configure it via environment variables such as `TFE_ADDRESS`, `TFE_TOKEN`, and `TRANSPORT_MODE`. For StreamableHTTP mode you can set host, port, TLS, rate limits, and an organization allowlist.
How do I monitor usage of the Terraform MCP Server?
Enable OpenTelemetry
Basic information
More Cloud & Infrastructure MCP servers

Aws Kb Retrieval Server
modelcontextprotocolModel Context Protocol Servers

Kilo IoT Platform
Kilo IoTYour AI can finally reach the physical world. Kilo is an AI-first IoT platform for commercial and industrial operations, and this connector hands a live deployment to the AI client you already use. Not an export. Not a
Run Model Context Protocol (MCP) servers with AWS Lambda
awslabsRun existing Model Context Protocol (MCP) stdio-based servers in AWS Lambda functions
AWS Model Context Protocol (MCP) Server
alexei-ledA lightweight service that enables AI assistants to execute AWS CLI commands (in safe containerized environment) through the Model Context Protocol (MCP). Bridges Claude, Cursor, and other MCP-aware AI tools with AWS CLI for enhanced cloud infrastructure management.
MCP Server that interacts with Azure AI Foundry (experimental)
azure-ai-foundryA MCP Server for Azure AI Foundry: it's now moved to cloud, check the new Foundry MCP Server
Comments