terragrunt-mcp-server
Verified Safeby omattsson
Overview
A Model Context Protocol server providing comprehensive Terragrunt documentation and tooling integration for AI assistants, supporting various operational modes to optimize for specific use cases.
Installation
node dist/index.jsEnvironment Variables
- TERRAGRUNT_MCP_FILE_WRITE_ENABLED
- TERRAGRUNT_MCP_ALLOWED_DIRS
- TERRAGRUNT_MCP_AUTO_BACKUP
- TERRAGRUNT_MCP_MAX_FILE_SIZE
- TERRAGRUNT_CACHE_TTL_HOURS
- TERRAGRUNT_WARMUP_STRATEGY
Security Notes
The server demonstrates strong security practices for file operations with robust path validation, directory whitelisting (defaulting to CWD), and path traversal detection in `FileWriter`. Critical components leverage environment variables for sensitive configuration, avoiding hardcoded secrets. While `child_process` is used, it's for fixed, internal commands (`terragrunt --version`, `terragrunt hcl fmt`) and not susceptible to direct command injection from user input. Network calls to `terragrunt.gruntwork.io` are part of core functionality for documentation retrieval. The main risk factor is potentially exposing internal error details via MCP responses, although the protocol includes an `isError` flag.
Similar Servers
terraform-mcp-server
Provides seamless integration with Terraform Registry APIs and HCP Terraform/Terraform Enterprise APIs, enabling AI assistants/LLMs to generate high-quality Terraform code and automate IaC workflows.
docfork
Provides live-synced, context-aware, and version-accurate documentation to AI models, preventing hallucinations and context bloat for developer tasks.
tfmcp
A CLI tool and MCP server that enables LLMs to analyze, manage, and operate Terraform configurations and infrastructure environments.
mcp-kubernetes
Enables AI assistants to interact with and debug Kubernetes clusters by translating natural language requests into Kubernetes operations.