StackGuardian MCP server
2026년 11월 13일 커밋StackGuardian 워크플로를 통해 Terraform, OpenTofu, Ansible을 사용하여 AI 에이전트가 인프라를 배포, 관리 및 트러블슈팅할 수 있도록 지원합니다.
다른 이름 StackGuardian/stackguardian-mcp
- 스타
- 12
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- Apache-2.0
StackGuardian MCP란?
StackGuardian은(는) MCP server입니다. StackGuardian 워크플로를 통해 Terraform, OpenTofu, Ansible을 사용하여 AI 에이전트가 인프라를 배포, 관리 및 트러블슈팅할 수 있도록 지원합니다.
프로젝트 README에서 생성된 요약
StackGuardian MCP server 정보
stackguardian-mcp는 DevOps 엔지니어와 개발자가 자연어로 인프라 배포를 관리할 수 있게 해줍니다. AI 코딩 에이전트를 StackGuardian 플랫폼에 연결하면 Terraform, OpenTofu, Ansible을 사용하여 인프라를 배포, 관리 및 트러블슈팅할 수 있습니다. 이 MCP server는 에이전트와 StackGuardian 조직 사이의 가교 역할을 하며, 기존 git 리포지토리나 라이브러리 템플릿으로부터 워크플로를 생성할 수 있도록 지원합니다.
설정은 npx를 사용하는 단일 명령 마법사나 macOS, Linux, Windows용 독립형 설치 프로그램을 통해 진행합니다. 서버를 사용하려면 유럽 또는 미국 리전에 StackGuardian 계정이 있어야 하며, 클라우드 및 git 커넥터가 구성되어 있어야 합니다. 연결이 완료되면 Claude Code, Cursor, Windsurf와 같은 에이전트가 sg-create-workflow 또는 sg-manage-secrets와 같은 특정 SKILL을 실행할 수 있습니다. 시스템은 실행 시작, 승인 또는 취소 전에 사용자 승인을 요구하여 안전을 보장하며, Tirith 또는 Rego 정책을 사용하여 규정에 어긋나는 변경 사항을 차단할 수도 있습니다.
활용 사례
- 1인프라 배포 워크플로 자동화리포지토리에 있는 특정 Terraform 또는 OpenTofu 코드를 위한 새로운 배포 파이프라인을 구축하도록 에이전트에게 지시할 수 있습니다.
- 2거버넌스 및 보안 정책 강제 적용개발자는 에이전트를 사용하여 보안에 취약한 인프라 설정이 배포되는 것을 방지하는 가드레일을 구현할 수 있습니다.
- 3인프라 실행 실패 트러블슈팅배포에 실패했을 때 에이전트에게 로그와 상태를 분석하여 원인을 파악하도록 요청할 수 있습니다.
- 4비밀 정보 및 민감 데이터 관리자격 증명을 코드에 직접 입력하는 대신 AI 에이전트를 통해 StackGuardian vault에 안전하게 저장할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
SG_API_KEY
| 이름 | 설명 | 유형 |
|---|---|---|
| SG_API_KEY | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식
- 소스 저장소 연결 및 접근 가능stackguardian/stackguardian-mcp is public and reachablegithub.com/stackguardian/stackguardian-mcp ↗통과
- 패키지가 이 저장소를 소스로 지정검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-12github.com/stackguardian/stackguardian-mcp ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지와 의존성에 심각한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 endpoint가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기StackGuardian MCP - Deploy Terraform, OpenTofu and Ansible with your AI coding agent
One-command MCP setup and ready-to-use agent skills for Claude Code, Cursor, Codex and more.
Connect your coding agent to StackGuardian, the platform that runs and governs your infrastructure deployments. Then ask in plain language to turn your existing infrastructure code into deployment workflows, review changes, require approvals, add policies and find out why a run failed.
npx @stackguardian/mcp-wizard
No Node.js? Use the one-line installer for macOS, Linux or Windows.
Then try asking your agent:
Deploy the Terraform in my
infrarepository, folderenvs/dev, to AWS.
Create an OpenTofu workflow for this repository that waits for my approval before every apply.
Find out why my last infrastructure deployment failed.
Get started · Supported agents · Skills · Skills guide
What you can do
| Goal | Ask your agent, for example | What happens |
|---|---|---|
| Deploy Terraform | "Create a workflow for the Terraform in github.com/acme/infra, folder envs/staging." |
A Terraform workflow that runs your own repository's code. The agent asks for the branch, the cloud connector and any variables. |
| Deploy OpenTofu | "Create an OpenTofu workflow from our repo that needs approval before every apply." | The same, with OpenTofu as the engine. |
| Run Ansible playbooks | "Set up a workflow that runs our Ansible playbook as a custom step." | A custom step pipeline built from workflow step templates in your StackGuardian library. Helm, Kubernetes manifests and CloudFormation work the same way. |
| Start from a template | "Deploy the S3 bucket template from our library into the dev workflow group." |
A workflow from a library template. You see every input and its default before anything is created. |
| Deploy related pieces together | "Create a stack that sets up a VPC, a security group and an EC2 instance in staging." |
Several workflows from a stack template, run in the order the template sets. |
| Govern deployments | "Block any deployment in the prod group that makes an S3 bucket public." |
A policy that blocks, warns on or requires approval for a change, written in Tirith or Rego, or taken from a library policy template. |
| Approve or stop runs | "Approve the run of prod-vpc that's waiting for approval." |
The agent always asks you before it approves, rejects or cancels a run. |
| Troubleshoot | "Why did the last run of prod-vpc fail?" · "Show the outputs of that run." |
The agent reads the run's status, logs and outputs. |
| Manage what you deployed | "Add a nightly 2 AM schedule to prod-vpc." · "Upgrade prod-vpc to the latest template revision." |
Changes only the settings you name, or moves the workflow to another template revision after a dry run. |
| Keep secrets out of code | "Store a GitHub token as a secret called GITHUB_TOKEN." |
The value goes into the StackGuardian vault, and workflows refer to it by name. |
| Check your cloud | "How are we doing on cloud posture?" · "What isn't managed by IaC?" | The agent reads your cloud inventory and posture data. |
Creating a workflow doesn't deploy anything. A deployment happens when a run starts: when you or your agent start a plan or apply, or when a schedule you set fires. Most agents ask you to approve each tool call, so you see a run request before it starts.
Get started
Before you start
- A StackGuardian account with access to the organization you want to connect, and roles that let you create and run workflows. Your region is Europe (
app.stackguardian.io) or United States (us.stackguardian.io). - Connectors for what you deploy: a cloud connector for the account you deploy to (AWS, for example), and a git (VCS) connector if your infrastructure code is in a private repository. The agent lists the connectors your organization already has.
- At least one supported coding agent on this machine.
- Node.js 18 or later for
npx, or the standalone executable below.
Install
With Node.js:
npx @stackguardian/mcp-wizard
Without Node.js, the installer downloads a standalone executable, checks it against the release's SHA256SUMS, installs it and runs it:
# macOS and Linux
curl -fsSL https://dl.stackguardian.io/add-sg-mcp/install.sh | sh
# Windows (PowerShell)
irm https://dl.stackguardian.io/add-sg-mcp/install.ps1 | iex
Then:
- Sign in. Pick your region. The StackGuardian dashboard opens in your browser; sign in if needed, then choose the organization, the roles the agent may use and how long the access lasts.
- Connect your agents. Back in the terminal, choose the agents to connect. The ones found on this machine (or those you picked last time) are preselected.
- Restart those agents. Most read their MCP configuration only at startup.
- Ask. Describe what you want to deploy, change or investigate. The agent looks up your workflow groups, templates and connectors, and checks with you before it creates or changes anything.
With the standalone executable, run add-sg-mcp wherever this README says npx @stackguardian/mcp-wizard. See Install script options to pin a version, change the install folder or use a mirror.
Check that it works
- Claude Code: run
/mcp.StackGuardian-<org>should be listed, and the skills show up as/sg-create-workflow,/sg-update-workflow,/sg-upgrade-workflow,/sg-create-stack,/sg-create-policyand/sg-manage-secrets. - Any agent:
npx @stackguardian/mcp-wizard statusshows your saved sign-in and which agents have the server and the skills. - Ask your agent something small, such as "Show my five most recent StackGuardian workflow runs and their status."
Nothing there? See Troubleshooting.
Supported agents
Claude Code, Cursor, Codex, VS Code (Copilot), Gemini CLI, OpenCode, Windsurf, plus GitHub Copilot CLI, Kiro CLI, Zed, Cline, Goose, Grok Build, Kilo Code, Kimi Code, Antigravity, Pi, Mastra Code and MCPorter. Run npx @stackguardian/mcp-wizard list-agents for the current list and each agent's config file.
Every agent gets the MCP server. Skills are installed into each agent's skills directory where the agent has one; Mastra Code and MCPorter get the server only. How a skill starts differs by agent: Claude Code offers each one as a slash command, and other agents pick up a skill when your request matches it. See Agent-specific notes for other differences.
MCP and skills
MCP provides the tools. Skills provide the playbooks.
- The StackGuardian MCP server gives your agent tools for your StackGuardian organization: search workflows, read run logs, create a workflow, start a run, store a secret and more. The server is hosted by StackGuardian; this repository contains the installer that connects your agents to it. In Claude Code,
/mcplists the server's current tools. - The skills are playbooks for multi-step tasks, bundled in
skills/. Each one tells the agent which tools to use, in what order, and what to ask you along the way, so it brings you choices instead of guessing IDs or defaults.
| Skill | Use it to | Try saying |
|---|---|---|
sg-create-workflow |
Create a workflow from your own git repository or a library template: Terraform, OpenTofu or a custom step pipeline (Ansible, Helm and so on). You review the inputs and defaults first. | "Create a workflow for the Terraform in github.com/acme/infra, folder envs/staging, branch main." |
sg-update-workflow |
Change an existing workflow's connector, variables, schedules, approvals, runner, notifications, sizing and more. Only what you change is touched. | "Require approval from alice@example.com or bob@example.com before prod-vpc applies." |
sg-upgrade-workflow |
Move a workflow to another template revision, with a dry run that shows the exact change first. | "What would change if I moved prod-vpc to revision 5 of its template?" |
sg-create-stack |
Create several workflows together from a stack template, reviewing each workflow's inputs. Nothing runs until you start it. | "Create a stack that sets up a VPC, a security group and an EC2 instance in staging." |
sg-create-policy |
Add a guardrail that blocks, warns on or requires approval for infrastructure changes, from a library policy, a Tirith rule or your own Rego. | "Warn when the estimated monthly cost of an EC2 instance goes over $100." |
sg-manage-secrets |
Store, rotate or delete vault secrets, and use them in workflows. | "Store this API token and add it to prod-vpc as the API_TOKEN environment variable." |
The skills guide walks through each skill step by step, with more examples and the StackGuardian terms you'll meet.
Why run deployments through StackGuardian?
Terraform, OpenTofu and Ansible still do the work. Running them as StackGuardian workflows instead of from your laptop adds the parts a team needs around them:
- Managed execution. Runs happen on StackGuardian-managed runners or on your own private runner group, not on the machine your agent runs on.
- Run history. Every plan and apply is recorded with its logs and outputs, so you, your teammates and your agent can look back at what happened.
- Reviews and approvals. A Terraform or OpenTofu workflow can pause after the plan until named approvers release it; a custom pipeline can pause before any step.
- Policies. Tirith or Rego rules check infrastructure changes and block them, warn or ask for approval.
- Reusable templates. Library templates and stack templates give teams a reviewed starting point, with revisions you can upgrade to.
- After the deploy. Schedules, drift detection for Terraform and OpenTofu workflows, notifications, webhooks and chained workflows.
- Secrets and connectors. Workflows use cloud and git connectors and vault secrets by reference, so credentials don't have to sit in your repository.
These are per-workflow settings: none is switched on just by connecting your agent, and some apply only to certain workflow types.
Choose how your agent signs in
| Grant token (default) | API key | OAuth (preview) | |
|---|---|---|---|
| Command | npx @stackguardian/mcp-wizard |
npx @stackguardian/mcp-wizard --token <api-key> --org <org> --region <eu|us> |
npx @stackguardian/mcp-wizard --auth oauth --org <org> --region <eu|us> |
| How you sign in | In the browser | No browser: you pass a key from Profile → API keys | In the agent, on first use |
| What the agent gets | A token for one organization and the roles you approve | Your user API key for the organization | No stored credential; the agent signs you in on first use |
| Access | Only the roles you approved | Everything your roles allow | Your access, through the agent's own sign-in |
| Expiry and revoking | You choose the expiry; revoke from Profile → Connected apps | No expiry; rotate it from Profile → API keys | Handled through the agent's own sign-in |
Only the grant sign-in opens the dashboard. An API key is never fetched for you: pass it with --token (or SG_API_KEY). Without --auth, a key you pass, or one saved by an earlier --token run, selects the API key; otherwise you sign in for a grant.
The tools that create, change, run or delete things act on your real StackGuardian organization, with the access of the credential you chose. Read what the agent is about to do before you approve a tool call.
Grant tokens
npx @stackguardian/mcp-wizard (optionally --region eu --org my-org) asks the StackGuardian OAuth broker for a grant token instead of using your API key. The browser opens a consent page where you pick the organization, the roles the agent may use and how long the grant should last; the CLI receives an sgat_ token on a loopback callback and writes it to each agent as an Authorization: Bearer header.
- The token is bound to one organization and the roles you approved — it is not your full user key, so an agent can be given less than you have.
npx @stackguardian/mcp-wizard statusshowsexpires <date>,no expiryorexpired. An expired grant is never reused; the next run asks for a new one.logoutrevokes the saved grant and deletes the local copy. Revoke a grant any time from Profile → Connected apps in the dashboard.npx @stackguardian/mcp-wizard loginrequests a fresh grant, then asks which agents to install it to.- If an API key is saved from an earlier
--tokenrun,npx @stackguardian/mcp-wizardkeeps using it. Pass--auth grantto switch to a grant.
OAuth (preview)
npx @stackguardian/mcp-wizard --auth oauth --org my-org --region eu writes the server URL without a credential for agents that implement MCP OAuth themselves (Claude Code, VS Code, Cursor, Codex, Gemini CLI, Windsurf). The agent then signs you in on first use. This needs the StackGuardian OAuth broker to be enabled for your environment.
Everyday tasks
| To | Run |
|---|---|
| Connect another agent | npx @stackguardian/mcp-wizard -a cursor (npx @stackguardian/mcp-wizard list-agents shows the names) |
| Connect another organization | npx @stackguardian/mcp-wizard login --org other-org --region eu, then pick your agents. It gets its own StackGuardian-other-org entry next to the first. |
| Disconnect one organization | npx @stackguardian/mcp-wizard remove --name StackGuardian-<org>. The skills stay for the organizations you keep. |
| Update the tool and the skills | npx @stackguardian/mcp-wizard@latest, or run the install script again. Each run refreshes the skills. |
| See what's installed | npx @stackguardian/mcp-wizard status |
| Remove everything | npx @stackguardian/mcp-wizard logout --purge removes the server and skills from your agents and forgets the credential. For the standalone executable, also delete ~/.local/bin/add-sg-mcp (Windows: %LOCALAPPDATA%\add-sg-mcp). |
Headless / CI
Skip the browser with an API key from Profile → API keys in the dashboard:
npx @stackguardian/mcp-wizard --token sgu_… --org my-org --region eu -y --all
# or
SG_API_KEY=sgu_… SG_ORG=my-org SG_REGION=eu npx @stackguardian/mcp-wizard -y -a claude-code
--api-base https://…/api/v1 replaces --region for non-standard environments. In a Docker image, curl -fsSL https://dl.stackguardian.io/add-sg-mcp/install.sh | ADD_SG_MCP_NO_RUN=1 sh installs the executable without running it.
Troubleshooting
The server doesn't show up in my agent. Restart the agent; most read their MCP config only at startup. Then run npx @stackguardian/mcp-wizard status. If the agent isn't listed, it wasn't selected: run npx @stackguardian/mcp-wizard -a <agent>. With --project, the server is only in that project's config.
"No coding agents detected on this machine." With -y, or when there's no terminal to prompt in, only detected agents are used. Name them instead (-a claude-code -a cursor) or pass --all.
The browser doesn't open, or sign-in times out. Add --no-browser and open the printed link in a browser on the same machine; the sign-in returns to a listener on 127.0.0.1. Sign-in waits five minutes (--login-timeout <seconds> changes that). On a remote server or in CI, use an API key instead (Headless / CI).
My agent gets "unauthorized" errors. The credential in the agent's config no longer works:
- API key rotated or deleted: run
npx @stackguardian/mcp-wizard --token <new-key> --org <org> --region <eu|us>to write the new key to your agents. - Grant expired:
npx @stackguardian/mcp-wizardasks for a new one. - Grant revoked: run
npx @stackguardian/mcp-wizard loginand pick your agents.
The skills don't appear. Restart the agent. Mastra Code and MCPorter have no skills support, so they get the server only. --skip-skills skips them on purpose.
"… exists and was not installed by add-sg-mcp." A skill folder with the same name is already in the agent's skills directory. Move it away and run again.
Claude Desktop. Not supported here: Claude Desktop only takes local servers from this tool. Add StackGuardian through Settings → Connectors instead.
"this Linux has no glibc". The standalone executables need glibc, which Alpine and other musl-based systems lack. Use npx @stackguardian/mcp-wizard with Node.js there.
Reference
StackGuardian MCP 질문
워크플로를 생성하면 인프라가 자동으로 배포되나요?
아니요, 워크플로를 생성한다고 해서 배포가 시작되지는 않습니다. 배포는 스케줄, 수동 트리거 또는 에이전트 명령을 통해 실행(run)이 시작될 때만 발생합니다.