Back to Home
omattsson icon

terragrunt-mcp-server

Verified Safe

by 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

Run Command
node dist/index.js

Environment 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

Stats

Interest Score32
Security Score9
Cost ClassMedium
Avg Tokens1100
Stars2
Forks0
Last Update2026-01-19

Tags

TerragruntIaCDevOpsdocumentationAI assistantcode generationtroubleshootingmetricstooling