infra-guard
Enables scanning Dockerfiles for security issues such as unpinned base images, ADD instead of COPY, exposed SSH ports, missing healthchecks, and running as root.
Enables scanning Terraform configuration files for security misconfigurations such as open security groups, public S3 buckets, wildcard IAM policies, and hardcoded secrets.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@infra-guardScan my Terraform for security misconfigurations and explain the findings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
infra-guard
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.
Related MCP server: MCP Security Scanner
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 togglescanner.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 syncRun the scanner directly:
uv run python3 scanner.pyRun the MCP server over stdio (for local clients like Claude Code/Desktop):
uv run python3 server.pyRun it over Streamable HTTP (for remote clients, or to reproduce the deployed setup):
uv run python3 server.py --transport streamable-http --port 8000Connecting 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/mcpRunning the playground locally
# terminal 1 — API
uv run python3 api.py
# terminal 2 — frontend
cd frontend
npm install
npm run devThe 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 HTTPREST API —
Dockerfile.api, samescanner.pycore, powers the playgroundFrontend — 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to scan project dependencies and Infrastructure as Code files for security vulnerabilities and misconfigurations. It also provides automated fixing capabilities to remediate identified security issues.183MIT

MCP Security Scannerofficial
AlicenseAqualityDmaintenanceIntegrates Checkov, Semgrep, Bandit, and ASH to provide comprehensive code security analysis for AI coding assistants.1515MIT No Attribution
shieldly-mcpofficial
AlicenseAqualityCmaintenanceEnables AI assistants to analyze AWS IAM policies and CloudFormation templates for security risks.243MIT- AlicenseNot gradedqualityAmaintenanceEnables AI agents to scan code for security and quality issues and receive machine-readable reports with suggested fixes and verification criteria.892MIT
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SanjanaJanardhan/infra-guard'
If you have feedback or need assistance with the MCP directory API, please join our Discord server