/ ディレクトリ / プレイグラウンド / MKP (Model Kontext for K8s)
● 公式 StacklokLabs ⚡ 即起動

MKP (Model Kontext for K8s)

作者 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.

なぜ使うのか

主な機能

ライブデモ

実際の動作

mkp-mcp.replay ▶ 準備完了
0/0

インストール

クライアントを選択

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

Claude Desktop → Settings → Developer → Edit Config を開く。保存後、アプリを再起動。

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

Cursor は Claude Desktop と同じ mcpServers スキーマを使用。プロジェクト設定はグローバルより優先。

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

Cline サイドバーの MCP Servers アイコンをクリックし、"Edit Configuration" を選択。

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

Claude Desktop と同じ形式。Windsurf を再起動して反映。

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

Continue はマップではなくサーバーオブジェクトの配列を使用。

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

context_servers に追加。保存時に Zed がホットリロード。

claude mcp add mkp-mcp -- mkp serve

ワンライナー。claude mcp list で確認、claude mcp remove で削除。

ユースケース

実用的な使い方: MKP (Model Kontext for K8s)

Find which pod is OOMKilling and propose a fix

👤 K8s operators ⏱ ~15 min intermediate

使うタイミング: You're paged for memory pressure and don't have a dashboard up.

前提条件
  • Server/skill installed and authenticated — See repo README
フロー
  1. Spot the OOMs
    Find pods in any namespace with restartCount > 3 in the last hour. Show pod, namespace, last termination reason.✓ コピーしました
    → 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.✓ コピーしました
    → Resource diff + a dry-run apply

結果: Targeted patch ready to apply, RBAC-checked.

注意点
  • 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.
組み合わせ: portainer-mcp

組み合わせ

他のMCPと組み合わせて10倍の力を

mkp-mcp + portainer-mcp

Pair with portainer-mcp for complementary capabilities

Use this server together with portainer-mcp to complete a multi-step task.✓ コピーしました

ツール

このMCPが提供する機能

ツール入力呼び出すタイミングコスト
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

コストと制限

運用コスト

APIクォータ
See provider docs for rate limits
呼び出しあたりのトークン
Varies by tool
金額
See repo README for pricing details
ヒント
Cache tool results and avoid repeated identical calls.

セキュリティ

権限、シークレット、影響範囲

認証情報の保管: Use environment variables; never commit secrets
データ送信先: Tool calls go to the provider's API as documented

トラブルシューティング

よくあるエラーと対処法

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.

確認: kubectl auth can-i list pods
context not found

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

確認: kubectl config get-contexts

代替案

MKP (Model Kontext for K8s) 他との比較

代替案代わりに使う場面トレードオフ
containers/kubernetes-mcp-serverYou want the most-starred optionSimilar feature set; pick by org preference

その他

リソース

📖 GitHub の公式 README を読む

🐙 オープンな issue を見る

🔍 400以上のMCPサーバーとSkillsを見る