Tfmcp MCP Server

tfmcp is a command-line tool that helps you interact with Terraform via the Model Context Protocol (MCP). It allows LLMs to manage and operate your

Local serverstdio

What is the Tfmcp MCP server?

Most cloud and infrastructure work still happens through a UI a human drives. Tfmcp MCP server moves it into the conversation instead. tfmcp is a command-line tool that helps you interact with Terraform via the Model Context Protocol (MCP). It allows LLMs to manage and operate your Terraform environments, including:.

The tools it exposes

The server publishes 3 tools. What each one is for:

  • Registry — The Registry tool exposed by this server
  • Completed — The Completed tool exposed by this server
  • Planned — The Planned tool exposed by this server

What it needs from you

Configuration is passed through the environment: TERRAFORM_DIR, TFMCP_ALLOW_DANGEROUS_OPS, TFMCP_ALLOW_AUTO_APPROVE, TFMCP_MAX_RESOURCES, TFMCP_AUDIT_ENABLED, TFMCP_AUDIT_LOG_SENSITIVE, TRANSPORT_HOST. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Rust 1.88.0+ (Rust Edition 2024) - Terraform CLI 1.15.8 installed and available in PATH - Claude Desktop (for AI assistant integration) - Docker (optional, for containerized deployment)

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

How it compares

This sits in the cloud and infrastructure group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Tfmcp's toolset — Registry, Completed, Planned — is a fair guide to whether it matches your workflow. It is maintained by nwiizo; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
RegistryThe Registry tool exposed by this server.
CompletedThe Completed tool exposed by this server.
PlannedThe Planned tool exposed by this server.

Configuration

  • Rust 1.88.0+ (Rust Edition 2024) - Terraform CLI 1.15.8 installed and available in PATH - Claude Desktop (for AI assistant integration) - Docker (optional, for containerized deployment)
VariableDescriptionRequired
TERRAFORM_DIRFilesystem location the server is allowed to use.Optional
TFMCP_ALLOW_DANGEROUS_OPSConfiguration value read at startup.Optional
TFMCP_ALLOW_AUTO_APPROVEConfiguration value read at startup.Optional
TFMCP_MAX_RESOURCESConfiguration value read at startup.Optional
TFMCP_AUDIT_ENABLEDConfiguration value read at startup.Optional
TFMCP_AUDIT_LOG_SENSITIVEConfiguration value read at startup.Optional
TRANSPORT_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Tfmcp to Registry.
  • Use Tfmcp to Completed.
  • Use Tfmcp to Planned.

Frequently asked questions

It connects Tfmcp to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (Registry, Completed, Planned) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Tfmcp directly.