InfraClaude
An MCP server that enables Claude to manage infrastructure across Kubernetes, Docker, Prometheus, and Terraform through natural language. It provides over 42 specialized tools with a safety-first design, including risk-based command classification and audit logging.
README
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 Skills
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-setup
Then try the demo scenarios.
Safety Model
InfraClaude classifies every operation by risk level:
| Level | Action | Example |
|---|---|---|
| Safe | Always allowed | k8s_get_pods, prom_instant_query |
| Caution | Allowed with warning | k8s_scale_deployment |
| Dangerous | Requires confirmation | k8s_delete_pod |
| Blocked | Never allowed | k8s_delete_namespace, terraform_apply |
System namespaces (kube-system, kube-public) have additional protections.
See Safety Documentation for details.
Documentation
- Setup Guide
- Tools Reference — all 42+ tools documented
- Safety Model
- Hooks Guide
- Skills Guide
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.