Infra Guard
БесплатноНе проверенEnables AI assistants to scan Terraform and Dockerfiles for security misconfigurations, returning structured Checkov findings that can be explained in plain lan
Описание
Enables AI assistants to scan Terraform and Dockerfiles for security misconfigurations, returning structured Checkov findings that can be explained in plain language.
README
An MCP server that scans Terraform and Dockerfiles for real security misconfigurations — open security groups, public S3 buckets, wildcard IAM policies, hardcoded secrets, containers running as root — and hands back structured findings instead of a guess.
It plugs into Claude Code, Claude Desktop, or Cursor as a tool. Ask your AI assistant to review your infrastructure code, and it calls infra-guard, gets back real findings from Checkov, and explains them to you.
Try it in the browser: infra-guard-frontend-production.up.railway.app — paste Terraform, click Scan, see real findings. No install required.
MCP endpoint: https://infra-guard-production.up.railway.app/mcp
Why this exists
I did cloud infrastructure work at A.P. Moller–Maersk — Terraform, Docker, AWS provisioning at real scale. Most portfolio projects are generic web apps; this one is the tool I actually wished existed: something that turns "does my Terraform have any obvious security holes" into a real, structured answer instead of an AI assistant's best guess.
infra-guard doesn't guess. It runs your file through Checkov, a real static analysis engine with hundreds of built-in checks, and returns the actual findings — check ID, title, affected resource, line range, code snippet. The hosting LLM (Claude, or whatever's on the other end of the MCP connection) explains the findings in plain English. The tool's job is just to be correct.
How it works
scanner.py → core engine: scan_terraform(...) / scan_dockerfile(...) -> structured dict
server.py → wraps both as MCP tools, served over stdio or Streamable HTTP
api.py → wraps both as a plain REST API (POST /api/scan, POST /api/scan-dockerfile)
frontend/ → React + Vite playground that calls api.py, with a Terraform/Dockerfile toggle
scanner.py shells out to the Checkov CLI, parses its JSON output, and returns the same shape regardless of which framework ran:
{
"summary": { "passed": 14, "failed": 34, "total_checks": 48 },
"findings": [
{
"check_id": "CKV_AWS_24",
"title": "Ensure no security groups allow ingress from 0.0.0.0:0 to port 22",
"resource": "aws_security_group.app_sg",
"start_line": 6,
"end_line": 24,
"code_snippet": "resource \"aws_security_group\" \"app_sg\" { ... }"
}
]
}
server.py exposes two MCP tools, scan_terraform_file(file_content, filename) and scan_dockerfile_file(file_content, filename), with no interpretation layer of its own — the structured data goes straight to whatever LLM is hosting the session.
insecure_example.tf has four intentional Terraform issues (open SSH ingress, a public+unencrypted S3 bucket, a wildcard IAM policy, a hardcoded RDS password) — 14 passed / 34 failed checks. insecure_example.Dockerfile has five (unpinned base image, ADD instead of COPY, port 22 exposed, no HEALTHCHECK, runs as root) — 26 passed / 5 failed checks.
Running it locally
Requires uv.
git clone https://github.com/SanjanaJanardhan/infra-guard.git
cd infra-guard
uv sync
Run the scanner directly:
uv run python3 scanner.py
Run the MCP server over stdio (for local clients like Claude Code/Desktop):
uv run python3 server.py
Run it over Streamable HTTP (for remote clients, or to reproduce the deployed setup):
uv run python3 server.py --transport streamable-http --port 8000
Connecting it to an MCP client
Claude Code / Claude Desktop — add to .mcp.json (project-level) or your global MCP config:
{
"mcpServers": {
"infra-guard": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/infra-guard", "run", "python3", "server.py"]
}
}
}
Any Streamable HTTP client (including the live deployment above) — point it at:
https://infra-guard-production.up.railway.app/mcp
Running the playground locally
# terminal 1 — API
uv run python3 api.py
# terminal 2 — frontend
cd frontend
npm install
npm run dev
The frontend reads its API base URL from VITE_API_URL (see frontend/.env.local), defaulting to http://localhost:8001.
Deployment
Three services on Railway, all built from Docker/Nixpacks with no manual server config:
- MCP server —
Dockerfile, Streamable HTTP - REST API —
Dockerfile.api, samescanner.pycore, powers the playground - Frontend — Railway's Nixpacks builder auto-detects the Vite app in
frontend/;VITE_API_URLis set at build time to the deployed API's URL
Both Python services read PORT from the environment, so they adapt to whatever port Railway assigns with no config changes.
Stack
Python · Checkov · MCP Python SDK · FastAPI · React · Vite · uv · Docker · Railway
Roadmap
- Core Terraform scanning engine
- MCP server over stdio
- Streamable HTTP transport
- Deployed to Railway
- Web frontend with a live playground
- Dockerfile scanning, including a Terraform/Dockerfile toggle in the playground
- Cost-impact estimate for findings
License
MIT
Установка Infra Guard
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/SanjanaJanardhan/infra-guardFAQ
Infra Guard MCP бесплатный?
Да, Infra Guard MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Infra Guard?
Нет, Infra Guard работает без API-ключей и переменных окружения.
Infra Guard — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Infra Guard в Claude Desktop, Claude Code или Cursor?
Открой Infra Guard на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
автор: lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare Infra Guard with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
