drio
Open app

Kubernetes MCP Server

Source

MCP server for all of your needs in k8s ☸️

Catalog onlyCatalog onlySTDIO

Overview

Kubernetes MCP Server is a backend system designed to provide an interactive and extensible interface for managing Kubernetes resources, retrieving and analyzing logs, and formatting logs for export through the Model Context Protocol (MCP).

To use the Kubernetes MCP Server, clone the repository, build the binary, and run the server. You can interact with the server through HTTP endpoints for various Kubernetes operations and log management.

  • CRUD operations on Kubernetes resources (Pods, Services, Namespaces, Deployments, etc.) - Log retrieval and pattern searching - Log formatting and exporting in multiple formats (Plaintext, JSON, CSV, NDJSON) - Extensible architecture for future enhancements
  1. Managing Kubernetes resources efficiently.
  2. Retrieving and analyzing logs from Kubernetes pods.
  3. Exporting logs in different formats for reporting or analysis.

Add to your AI client

Use these steps to connect Kubernetes MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "k8s-mcp-server-mayukhsobo": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "k8s-mcp-server-mayukhsobo": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "k8s-mcp-server-mayukhsobo": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "k8s-mcp-server-mayukhsobo": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "k8s-mcp-server-mayukhsobo": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "k8s-mcp-server-mayukhsobo": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-k8s-mcp-server-mayukhsobo"
      ]
    }
  }
}

FAQ

What are the requirements to run the MCP Server?

You need Go 1.24+, access to a Kubernetes cluster, and kubectl configured.

Is there an API documentation available?

Yes, the MCP server exposes HTTP endpoints for interacting with Kubernetes resources and logs.

How can I get help with using the server?

You can use the command `./k8s-mcp-server --help` to get help.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2477,"uuid":"09de2971-7c9d-49b9-b5ca-638dc5785811","name":"k8s-mcp-server","title":"Kubernetes MCP Server","description":"MCP server for all of your needs in k8s ☸️","avatar_url":"https://avatars.githubusercontent.com/u/8527634?v=4","created_at":"2025-03-13T08:12:37.264Z","updated_at":"2025-03-13T08:17:25.208Z","status":"created","author_name":"MayukhSobo","author_avatar_url":"https://avatars.githubusercontent.com/u/8527634?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MayukhSobo/k8s-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"Go\",\"is_official\":false,\"latest_commit_time\":\"2025-03-22 14:26:29\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]