mcp-devops-server
# mcp-devops-server
An MCP (Model Context Protocol) server that gives AI agents access to DevOps tools — kubectl, terraform, helm, docker, and AWS cost analysis.
Works with Claude Desktop, Cursor, GitHub Copilot, and any MCP-compatible client.
## Tools
| Tool | Description |
|------|-------------|
| `kubectl_get` | Get Kubernetes resources |
| `kubectl_describe` | Describe a Kubernetes resource |
| `kubectl_logs` | Get pod logs |
| `terraform_plan` | Run terraform plan |
| `terraform_show` | Show terraform state |
| `helm_list` | List Helm releases |
| `helm_diff` | Preview Helm upgrade changes |
| `docker_ps` | List Docker containers |
| `docker_logs` | Get container logs |
| `aws_cost_summary` | Get AWS cost summary (last 7/30 days) |
| `aws_resource_inventory` | List AWS resources by service |
## Installation
### Using npx (no install)
```bash
npx @basel5001/mcp-devops-server
```
### Global install
```bash
npm install -g @basel5001/mcp-devops-server
mcp-devops-server
```
### From source
```bash
git clone https://github.com/basel5001/mcp-devops-server.git
cd mcp-devops-server
npm install
npm run build
npm start
```
## Configuration
### Claude Desktop
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"devops": {
"command": "npx",
"args": ["-y", "@basel5001/mcp-devops-server"]
}
}
}
```
### Cursor
Add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"devops": {
"command": "npx",
"args": ["-y", "@basel5001/mcp-devops-server"]
}
}
}
```
## Security Considerations
- **Command allowlist**: Only `kubectl`, `terraform`, `helm`, `docker`, and `aws` commands can be executed.
- **Argument sanitization**: Shell metacharacters (`;`, `&`, `|`, `` ` ``, `$`) and path traversal (`..`) are rejected.
- **No shell execution**: Commands run via `execFile` (not `exec`), preventing shell injection.
- **Timeouts**: All commands have configurable timeouts (default 30s) to prevent hanging.
- **Read-only by design**: No destructive operations (delete, apply, destroy) are exposed.
## Development
```bash
npm install
npm run dev # watch mode
npm run build # compile
npm run lint # lint
```
## License
MIT
TDQS
Scored across 11 tools
Every tool uses a platform prefix that clearly separates Kubernetes, Terraform, Helm, Docker, and AWS concerns. Within each platform, the actions target distinct resources or operations, so no two tools are easily confused.
Tool names mostly follow a predictable <platform>_<command-or-action> pattern, such as kubectl_get, terraform_show, and helm_list. The two AWS tools use noun phrases instead of verbs, which is a minor deviation from the otherwise consistent style.
With 11 tools, the server covers a broad DevOps range without feeling bloated. Each tool represents a distinct and useful operation for infrastructure inspection and planning.
The toolset is heavily oriented toward read-only and planning operations: logs, describe, list, plan, show, and diff. There are no apply, deploy, delete, or mutation actions, so core DevOps workflows like applying Terraform changes or upgrading Helm releases cannot be completed.