/ Directory / Playground / MKP (Model Kontext for K8s)
● Official StacklokLabs ⚡ Instant

MKP (Model Kontext for K8s)

by StacklokLabs · StacklokLabs/mkp

Kubernetes MCP from Stacklok — native API client, not a kubectl wrapper.

MKP is a Kubernetes MCP server written in Go that talks directly to the API server (not by shelling out to kubectl). That means structured outputs, less prompt pollution, and proper RBAC enforcement based on the agent's serviceaccount.

Why use it

Key features

Live Demo

What it looks like in practice

mkp-mcp.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mkp-mcp",
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "mkp-mcp": {
      "command": {
        "path": "mkp",
        "args": [
          "serve"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add mkp-mcp -- mkp serve

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use MKP (Model Kontext for K8s)

Find which pod is OOMKilling and propose a fix

👤 K8s operators ⏱ ~15 min intermediate

When to use: You're paged for memory pressure and don't have a dashboard up.

Prerequisites
  • Server/skill installed and authenticated — See repo README
Flow
  1. Spot the OOMs
    Find pods in any namespace with restartCount > 3 in the last hour. Show pod, namespace, last termination reason.✓ Copied
    → Targeted list, likely with OOMKilled in the reason
  2. Propose the fix
    Get the limits/requests for the worst offender. Tell me what to raise and write an apply_manifest dry-run patch.✓ Copied
    → Resource diff + a dry-run apply

Outcome: Targeted patch ready to apply, RBAC-checked.

Pitfalls
  • MKP only exposes what the bound SA can do — MKP only exposes what the bound SA can do — to enable apply_manifest you must bind an SA with patch permission.
Combine with: portainer-mcp

Combinations

Pair with other MCPs for X10 leverage

mkp-mcp + portainer-mcp

Pair with portainer-mcp for complementary capabilities

Use this server together with portainer-mcp to complete a multi-step task.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
list_resources kind, namespace, label_selector Inventory any resource type 1 API call
get_logs pod, container, tail_lines Triage a pod 1 API call
apply_manifest yaml, dry_run Deploy a change (dry-run first) 1 API call

Cost & Limits

What this costs to run

API quota
See provider docs for rate limits
Tokens per call
Varies by tool
Monetary
See repo README for pricing details
Tip
Cache tool results and avoid repeated identical calls.

Security

Permissions, secrets, blast radius

Credential storage: Use environment variables; never commit secrets
Data egress: Tool calls go to the provider's API as documented

Troubleshooting

Common errors and fixes

Forbidden on list pods

Bind a Role/ClusterRole with pods:get,list,watch to the SA mkp uses. Use kubectl auth can-i to verify.

Verify: kubectl auth can-i list pods
context not found

Set KUBECONFIG to a file with the right context, or pass --context.

Verify: kubectl config get-contexts

Alternatives

MKP (Model Kontext for K8s) vs others

AlternativeWhen to use it insteadTradeoff
containers/kubernetes-mcp-serverYou want the most-starred optionSimilar feature set; pick by org preference

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills