๐ Terraform Model Context Protocol (MCP) Tool - An experimental CLI tool that enables AI assistants to manage and operate Terraform environments. Supports reading Terraform configurations, analyzing plans, applying configurations, and managing state with Claude Desktop integration. โก๏ธ
Config is the same across clients โ only the file and path differ.
{
"mcpServers": {
"tfmcp": {
"env": {
"HOME": "/Users/yourusername",
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
"TERRAFORM_DIR": "/path/to/your/terraform/project"
},
"args": [
"mcp"
],
"command": "/path/to/your/tfmcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
โ ๏ธ This project includes production-ready security features but is still under active development. While the security system provides robust protection, please review all operations carefully in production environments. โ ๏ธ
This server supports HTTP transport. Be the first to test it โ help the community know if it works.
Five weighted categories โ click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience โ it helps other developers decide.
Sign in to write a review.
Others in devops
MCP server for using the GitLab API
Enhanced MCP server for GitLab: group projects listing and activity tracking
Yunxiao MCP Server provides AI assistants with the ability to interact with the Yunxiao platform. It provides a set of tools that interact with Yunxiao's API, allowing AI assistants to manage Codeup repository, Project, Pipeline, Packages etc.
MCP server for Komodo - manage Docker containers, servers, stacks, and deployments via AI
MCP Security Weekly
Get CVE alerts and security updates for Tfmcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
โ ๏ธ This project includes production-ready security features but is still under active development. While the security system provides robust protection, please review all operations carefully in production environments. โ ๏ธ
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:
See tfmcp in action with Claude Desktop:

The latest version of tfmcp (v0.1.9) is now available on Crates.io! You can easily install it using Cargo:
cargo install tfmcp
๐ Terraform Integration Deeply integrates with the Terraform CLI to analyze and execute operations.
๐ MCP Server Capabilities Runs as a Model Context Protocol server, allowing AI assistants to access and manage Terraform.
๐ฌ Module Health Analysis Whitebox approach to Infrastructure as Code with cohesion/coupling analysis, health scoring, and refactoring suggestions based on software engineering principles.
๐ Resource Dependency Graph Visualize resource relationships including explicit depends_on and implicit reference dependencies.
๐ฆ Module Registry Integration Search and explore Terraform modules from the registry, get module details and versions.
๐ Enterprise Security Production-ready security controls with configurable policies, audit logging, and access restrictions.
๐ Advanced Analysis Detailed Terraform configuration analysis with best practice recommendations and security checks.
๐ Guideline Compliance (v0.1.8) Future Architect Terraform guidelines integration with compliance scoring, secret detection, and variable quality checks.
โก๏ธ Blazing Fast High-speed processing powered by the Rust ecosystem with optimized parsing and caching.
๐ ๏ธ Automatic Setup Automatically creates sample Terraform projects when needed, ensuring smooth operation even for new users.
๐ณ Docker Support Run tfmcp in a containerized environment with all dependencies pre-installed.
# Clone the repository
git clone https://github.com/nwiizo/tfmcp
cd tfmcp
# Build and install
cargo install --path .
cargo install tfmcp
# Clone the repository
git clone https://github.com/nwiizo/tfmcp
cd tfmcp
# Build the Docker image
docker build -t tfmcp .
# Run the container
docker run -it tfmcp