Kubectl MCP Server

Kubectl MCP Server

MCP Server that enables AI assistants to interact with Kubernetes clusters via kubectl operations.

1.0K

26 Tools

Packaged by
Requires Configuration
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

About

Kubectl MCP Server MCP Server

MCP Server that enables AI assistants to interact with Kubernetes clusters via kubectl operations.

What is an MCP Server?

Characteristics

AttributeDetails
Docker Imagemcp/kubectl-mcp-server
Authorrohitg00
Repositoryhttps://github.com/rohitg00/kubectl-mcp-server
Dockerfilehttps://github.com/rohitg00/kubectl-mcp-server/blob/main/Dockerfile
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/kubectl-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceMIT License

Available Tools (26)

Tools provided by this ServerShort Description
check_pod_healthCheck the health status of a pod.
create_deploymentCreate a new deployment.
delete_resourceDelete a Kubernetes resource.
get_api_resourcesList Kubernetes API resources.
get_cluster_rolesGet all cluster-wide RBAC roles.
get_configmapsGet all ConfigMaps in the specified namespace.
get_current_contextGet current kubeconfig context.
get_deploymentsGet all deployments in the specified namespace.
get_eventsGet all events in the specified namespace.
get_logsGet logs from a pod.
get_namespacesGet all Kubernetes namespaces.
get_nodesGet all nodes in the cluster.
get_pod_eventsGet events for a specific pod.
get_podsGet all pods in the specified namespace.
get_rbac_rolesGet all RBAC roles in the specified namespace.
get_resource_usageGet resource usage statistics via kubectl top.
get_secretsGet all Secrets in the specified namespace.
get_servicesGet all services in the specified namespace.
health_checkCheck cluster health by pinging the API server.
install_helm_chartInstall a Helm chart.
kubectl_explainExplain a Kubernetes resource using kubectl explain.
port_forwardForward local port to pod port.
scale_deploymentScale a deployment.
switch_contextSwitch current kubeconfig context.
uninstall_helm_chartUninstall a Helm release.
upgrade_helm_chartUpgrade a Helm release.

Tools Details

Tool: check_pod_health

Check the health status of a pod.

ParametersTypeDescription
pod_namestring
namespacestringoptional

Tool: create_deployment

Create a new deployment.

ParametersTypeDescription
imagestring
namestring
replicasinteger
namespacestringoptional

Tool: delete_resource

Delete a Kubernetes resource.

ParametersTypeDescription
namestring
resource_typestring
namespacestringoptional

Tool: get_api_resources

List Kubernetes API resources.

Tool: get_cluster_roles

Get all cluster-wide RBAC roles.

Tool: get_configmaps

Get all ConfigMaps in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_current_context

Get current kubeconfig context.

Tool: get_deployments

Get all deployments in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_events

Get all events in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_logs

Get logs from a pod.

ParametersTypeDescription
pod_namestring
containerstringoptional
namespacestringoptional
tailstringoptional

Tool: get_namespaces

Get all Kubernetes namespaces.

Tool: get_nodes

Get all nodes in the cluster.

Tool: get_pod_events

Get events for a specific pod.

ParametersTypeDescription
pod_namestring
namespacestringoptional

Tool: get_pods

Get all pods in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_rbac_roles

Get all RBAC roles in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_resource_usage

Get resource usage statistics via kubectl top.

ParametersTypeDescription
namespacestringoptional

Tool: get_secrets

Get all Secrets in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: get_services

Get all services in the specified namespace.

ParametersTypeDescription
namespacestringoptional

Tool: health_check

Check cluster health by pinging the API server.

Tool: install_helm_chart

Install a Helm chart.

ParametersTypeDescription
chartstring
namestring
namespacestring
repostringoptional
valuesstringoptional

Tool: kubectl_explain

Explain a Kubernetes resource using kubectl explain.

ParametersTypeDescription
resourcestring

Tool: port_forward

Forward local port to pod port.

ParametersTypeDescription
local_portinteger
pod_namestring
pod_portinteger
namespacestringoptional

Tool: scale_deployment

Scale a deployment.

ParametersTypeDescription
namestring
replicasinteger
namespacestringoptional

Tool: switch_context

Switch current kubeconfig context.

ParametersTypeDescription
context_namestring

Tool: uninstall_helm_chart

Uninstall a Helm release.

ParametersTypeDescription
namestring
namespacestring

Tool: upgrade_helm_chart

Upgrade a Helm release.

ParametersTypeDescription
chartstring
namestring
namespacestring
repostringoptional
valuesstringoptional

Use this MCP Server

{
  "mcpServers": {
    "kubectl-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/local-directory:/local-directory",
        "mcp/kubectl-mcp-server"
      ]
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Manual installation

You can install the MCP server using:

Installation for

Related servers