Loading...
cargo install tfmcp{
"mcpServers": {
"tfmcp": {
"command": "/path/to/your/tfmcp", // Replace with the actual path from step 2
"args": ["mcp"],
"env": {
"HOME": "/Users/yourusername", // Replace with your username
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin",
"TERRAFORM_DIR": "/path/to/your/terraform/project" // Optional: specify your Terraform project
}
}
}
}init_terraformInitializes a Terraform working directory to prepare for operations.
Initializes the directory but does not modify infrastructure.
get_terraform_planGenerates an execution plan showing proposed changes to infrastructure.
Read-only operation; does not modify infrastructure.
apply_terraformApplies the Terraform configuration to create or modify infrastructure.
Modifies infrastructure and can cause irreversible changes.
destroy_terraformDestroys all Terraform-managed infrastructure.
Destroys infrastructure and can cause significant data loss.
terraform_workspaceManages Terraform workspaces, allowing you to switch between different environments.
Can modify the active workspace, potentially affecting subsequent operations.
terraform_importImports existing resources into Terraform management.
Adds resources to the state, which can affect future plans.
terraform_taintTaints or untaints resources, forcing them to be recreated on the next apply.
Forces resource recreation, potentially causing downtime.
terraform_refreshRefreshes the Terraform state to reflect the current state of the infrastructure.
Updates the state but does not modify infrastructure.
terraform_fmtFormats Terraform code to adhere to a consistent style.
Modifies code formatting, which could introduce unintended changes if not reviewed.
terraform_graphGenerates a dependency graph of Terraform resources.
Read-only operation; does not modify infrastructure.
terraform_outputRetrieves output values from the Terraform state.
Read-only operation; does not modify infrastructure.
terraform_providersGets information about the Terraform providers used in the configuration.
Read-only operation; does not modify infrastructure.
tfmcp offers robust security features, but its safety depends heavily on proper configuration. It is safe for read-only operations and analysis. Risky operations like applying changes should only be enabled with caution and thorough review of plans.