InfraClaude
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 "Deploy 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., "@InfraClaude check 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 SkillsRelated MCP server: AWS Sage
Features
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.
Available Tools
43 toolsdocker_compose_logsB
Show logs from Docker Compose services
Inputs: directory, service, tail.
docker_compose_psC
Show status of Docker Compose services
Inputs: directory.
docker_container_logsC
Fetch logs from a Docker container
Inputs: id (required), tail, since.
docker_container_statsC
Get real-time CPU, memory, and network stats for a container
Inputs: id (required).
docker_inspect_containerC
Get detailed information about a Docker container
Inputs: id (required).
docker_inspect_imageC
Get detailed information about a Docker image
Inputs: name (required).
docker_inspect_networkA
Get detailed info about a Docker network including connected containers
Inputs: id (required).
docker_list_containersB
List Docker containers with their status, image, and ports
Inputs: all.
docker_list_imagesB
List local Docker images with repository, tag, and size
Inputs: all.
docker_list_networksB
List Docker networks with driver and scope
Inputs: no named parameters.
k8s_cordon_nodeA
Mark a node as unschedulable (cordon) — prevents new pods from being scheduled
Inputs: name (required).
k8s_delete_podA
Delete a specific pod (it will be recreated if managed by a controller)
Inputs: name (required), namespace.
k8s_describe_nodeB
Get detailed node info including capacity, allocatable resources, conditions, and taints
Inputs: name (required).
k8s_describe_podB
Get detailed information about a specific pod including containers, resources, and events
Inputs: name (required), namespace.
k8s_get_deploymentsB
List deployments with replica status, strategy, and age
Inputs: namespace, label_selector.
k8s_get_eventsC
List cluster events filtered by namespace and type (Normal/Warning)
Inputs: namespace, type, field_selector, limit.
k8s_get_nodesA
List all cluster nodes with status, roles, and version
Inputs: no named parameters.
k8s_get_pod_logsC
Fetch logs from a pod with options for tail lines, time range, and container selection
Inputs: name (required), namespace, container, tail, +2 more.
k8s_get_podsB
List pods in a Kubernetes namespace with their status, restarts, and age
Inputs: namespace, label_selector, field_selector.
k8s_get_servicesB
List services with type, cluster IP, ports, and age
Inputs: namespace.
k8s_rollback_deploymentC
Rollback a deployment to the previous revision
Inputs: name (required), namespace.
k8s_rollout_statusC
Check the rollout status of a deployment
Inputs: name (required), namespace.
k8s_scale_deploymentC
Scale a deployment to a specified number of replicas
Inputs: name (required), replicas (required), namespace.
k8s_top_nodesA
Show CPU and memory usage for all cluster nodes (requires metrics-server)
Inputs: no named parameters.
k8s_top_podsA
Show CPU and memory usage for pods (requires metrics-server)
Inputs: namespace.
k8s_uncordon_nodeA
Mark a node as schedulable (uncordon) — re-enables pod scheduling
Inputs: name (required).
prom_active_alertsA
List all currently firing Prometheus alerts
Inputs: no named parameters.
prom_alert_rulesA
List all Prometheus alert rules and their current state
Inputs: no named parameters.
prom_instant_queryC
Execute a PromQL instant query and return current values
Inputs: query (required).
prom_range_queryB
Execute a PromQL query over a time range and return series data
Inputs: query (required), start, end, step.
prom_targetsB
Show Prometheus scrape target health status
Inputs: no named parameters.
security_gitleaks_scanC
Scan a directory for leaked secrets and credentials using Gitleaks
Inputs: directory.
security_k8s_auditB
Audit Kubernetes namespace for security misconfigurations (privileged containers, missing limits, RBAC issues)
Inputs: namespace.
security_trivy_scanC
Scan a container image for vulnerabilities using Trivy
Inputs: image (required), severity.
system_disk_usageC
Show disk usage for the system or a specific path
Inputs: path.
system_logsC
Read system logs from journalctl or a log file
Inputs: unit, lines, path.
system_network_connectionsC
Show active network connections and listening ports
Inputs: state.
system_processesC
List top processes sorted by CPU or memory usage
Inputs: sort_by, limit.
terraform_outputB
Read Terraform output values
Inputs: directory (required), name.
terraform_planA
Run terraform plan to preview infrastructure changes (read-only, safe)
Inputs: directory (required).
terraform_state_listB
List all resources in the Terraform state
Inputs: directory (required).
terraform_state_showB
Show details of a specific resource in Terraform state
Inputs: directory (required), resource (required).
terraform_validateC
Validate Terraform configuration and check formatting
Inputs: directory (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 43 tools
Most tools have distinct purposes with clear boundaries between domains (Docker, Kubernetes, Prometheus, Security, System, Terraform). However, there is some overlap between docker_compose_logs and docker_container_logs, and between k8s_get_pods and k8s_describe_pod, which could cause minor confusion. Overall, the descriptions help clarify differences, but the sheer number of tools increases cognitive load.
Tool names follow a highly consistent snake_case pattern with clear domain prefixes (docker_, k8s_, prom_, security_, system_, terraform_) and descriptive verb_noun combinations. This predictable structure makes it easy to understand each tool's purpose and domain at a glance, with no deviations in naming conventions.
With 43 tools, this server feels overloaded for a single MCP server. While the tools cover multiple infrastructure domains, the count is excessive and will overwhelm agents. A more focused approach with separate servers for Docker, Kubernetes, monitoring, etc., would be more appropriate. The scope is too broad for effective tool selection.
Within each domain, the tool coverage is quite comprehensive. Docker has inspection, listing, and monitoring tools; Kubernetes covers pod management, scaling, rollouts, and monitoring; Prometheus includes queries and alerts; Security has scanning tools; System provides diagnostics; and Terraform covers state and planning. Minor gaps exist (e.g., no Docker container creation/management, no Kubernetes pod creation), but agents can work around these given the broad coverage.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server ecosystem providing Claude AI with 150+ specialized tools across enhanced memory, data analytics, security, design, and infrastructure domains with PostgreSQL, Redis, Qdrant, and Docker orchestration.MIT
- AlicenseCqualityDmaintenanceA unified MCP server for AWS that enables natural language infrastructure management, cross-service resource discovery, and dependency mapping. It features 30 intelligent tools for cost optimization, incident investigation, and multi-account operations protected by a robust safety system.305MIT
- AlicenseCqualityDmaintenanceSingle MCP server providing over 500 developer tools for Claude Code, covering security, testing, documentation, and more.500120 npm3MIT
- AlicenseNot gradedqualityCmaintenanceAn AI-DevOps MCP server that gives LLMs read-only-by-default access to Kubernetes clusters, Prometheus metrics, and GitHub Actions, enabling natural language queries about infrastructure status and safe write operations with previews.MIT