# StackGen

StackGen — an MCP server for managing cloud infrastructure and apps through Claude Code. Generates Terraform configs, imports existing resources, queries logs.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: stackgenhq
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/stackgenhq/homebrew-stackgen
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — warning: a command downloads a script from raw.githubusercontent.com and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/stackgen

## What it does

StackGen bundles several DevOps tools into one MCP tap. The main CLI generates infrastructure as code, `terraform-importer` pulls existing IaC into StackGen, `cloud2code` turns cloud resources into tfstate files, `logexplorer` queries logs, and `genie` handles generative infrastructure. StackBoot runs on macOS only.

Two environment variables are mandatory: `STACKGEN_URL` and `STACKGEN_TOKEN`. Without them the server will not start. The token comes from `cloud.stackgen.com` or your organization's StackGen instance. All tools install via the `stackgenhq/homebrew-stackgen` Homebrew tap.

Formulae ending in `-beta` track release candidates for the main CLI and `cloud2code`. Other formulae are stable.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- generate Terraform configurations from infrastructure descriptions
- import existing Terraform IaC into StackGen
- convert cloud resources to tfstate files
- query application logs from the CLI
- manage cloud infrastructure through prompts

## Example prompts
- Set up `STACKGEN_URL` and `STACKGEN_TOKEN` in my `.zshrc`
- Import all Terraform modules from `infrastructure/modules` into StackGen
- Convert AWS resources from my account to tfstate using `cloud2code`

## Similar
- [terraform-search-import](https://affpapa.org/en/nevibecode/skills/terraform-search-import.md) — skill · 5200 installs
- [terraform-module-builder](https://affpapa.org/en/nevibecode/skills/terraform-module-builder.md) — skill · 229 installs
- [terraform](https://affpapa.org/en/nevibecode/plugins/terraform.md) — plugin · ★ 47914 repo stars
- [terraform-iac-expert](https://affpapa.org/en/nevibecode/skills/terraform-iac-expert.md) — skill · 179 installs
- [InsideOut](https://affpapa.org/en/nevibecode/mcp/insideout.md) — MCP server · 317 installs
- [terraform-helper](https://affpapa.org/en/nevibecode/plugins/terraform-helper.md) — plugin · ★ 2858 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
