Enables managing Docker containers and performing security scans on images.
Allows querying clusters, managing pods and deployments, and monitoring service health across namespaces.
Provides tools for querying infrastructure metrics and checking service health and performance.
Enables infrastructure as code management, including running plans and inspecting resources.
Integrates security scanning capabilities for container images and infrastructure configurations to identify vulnerabilities.
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., "@InfraClaudecheck why the api-server pod is crashing and show the latest logs"
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.
InfraClaude
Give Claude superpowers over your infrastructure — MCP Server for Kubernetes, Docker, Terraform, Prometheus, and Security tools.
InfraClaude is an MCP (Model Context Protocol) server that exposes infrastructure management tools to Claude. Through InfraClaude, Claude Code can query Kubernetes clusters, manage Docker containers, check Prometheus metrics, run Terraform plans, and perform security scans — all through natural language.
Architecture
┌─────────────────────────────────────────────────────────┐
│ Claude Code / Claude Desktop │
│ │
│ User: "Check if any pods are crashlooping" │
│ │ │
│ MCP Client │
└─────────────────────────┼────────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────────────────────────────┐
│ InfraClaude MCP Server │
│ │
│ ┌───────────┐ ┌──────────┐ ┌────────────┐ │
│ │ Kubernetes │ │ Docker │ │ Prometheus │ │
│ │ 16 tools │ │ 9 tools │ │ 5 tools │ │
│ └───────────┘ └──────────┘ └────────────┘ │
│ ┌───────────┐ ┌──────────┐ ┌────────────┐ │
│ │ Terraform │ │ Security │ │ System │ │
│ │ 5 tools │ │ 3 tools │ │ 4 tools │ │
│ └───────────┘ └──────────┘ └────────────┘ │
│ │
│ Safety Layer: Command Guard → RBAC → Audit Logger │
└─────────────────────────────────────────────────────────┘
Plus: Claude Code Hooks + Custom SkillsFeatures
42+ infrastructure tools across Kubernetes, Docker, Prometheus, Terraform, Security, and System
Safety-first design — 4-tier risk classification (Safe → Caution → Dangerous → Blocked)
Audit logging — every operation logged for compliance
Claude Code hooks — pre/post tool-use safety checks and automation
Custom skills — K8s troubleshooting, incident response, Docker debugging, security review
MCP resources — cluster info, service health, infrastructure summary
MCP prompts — guided troubleshooting, capacity planning, security audit workflows
Quick Start
# Clone and build
git clone https://github.com/batu-sonmez/infraclaude.git
cd infraclaude
npm install
npm run build
# Add to Claude Code (~/.claude/claude_code_config.json)
{
"mcpServers": {
"infraclaude": {
"command": "node",
"args": ["/path/to/infraclaude/dist/index.js"],
"env": {
"KUBECONFIG": "~/.kube/config",
"PROMETHEUS_URL": "http://localhost:9090"
}
}
}
}Then in Claude Code:
"Show me all pods in production"
"Why is my pod crashing?"
"Run a security audit on the default namespace"
"What's the CPU usage of my cluster?"
"Scan the nginx:latest image for vulnerabilities"Demo
Set up a local demo environment with intentionally broken pods:
make demo-setupThen try the demo scenarios.
Safety Model
InfraClaude classifies every operation by risk level:
Level | Action | Example |
Safe | Always allowed |
|
Caution | Allowed with warning |
|
Dangerous | Requires confirmation |
|
Blocked | Never allowed |
|
System namespaces (kube-system, kube-public) have additional protections.
See Safety Documentation for details.
Documentation
Tools Reference — all 42+ tools documented
Tech Stack
Component | Technology |
MCP Server | TypeScript + @modelcontextprotocol/sdk |
Kubernetes | @kubernetes/client-node |
Docker | dockerode |
Prometheus | Native fetch API |
Terraform | CLI wrapper |
Security | Trivy, Gitleaks CLI |
Testing | Vitest |
CI/CD | GitHub Actions |
License
MIT — see LICENSE.
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.