Kubectl MCP Server
MCP Server that enables AI assistants to interact with Kubernetes clusters via kubectl operations.
MCP Info
| Attribute | Details |
|---|---|
| Docker Image | mcp/kubectl-mcp-server |
| Author | rohitg00 |
| Repository | https://github.com/rohitg00/kubectl-mcp-server |
Image Building Info
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/rohitg00/kubectl-mcp-server/blob/14f9c138a7efd80a2bbb83e7ecfcdbe259f6e598/Dockerfile |
| Commit | 14f9c138a7efd80a2bbb83e7ecfcdbe259f6e598 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | Docker Scout Health Score |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/kubectl-mcp-server --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | MIT License |
Available Tools (26)
| Tools provided by this Server | Short Description |
|---|---|
check_pod_health |
Check the health status of a pod. |
create_deployment |
Create a new deployment. |
delete_resource |
Delete a Kubernetes resource. |
get_api_resources |
List Kubernetes API resources. |
get_cluster_roles |
Get all cluster-wide RBAC roles. |
get_configmaps |
Get all ConfigMaps in the specified namespace. |
get_current_context |
Get current kubeconfig context. |
get_deployments |
Get all deployments in the specified namespace. |
get_events |
Get all events in the specified namespace. |
get_logs |
Get logs from a pod. |
get_namespaces |
Get all Kubernetes namespaces. |
get_nodes |
Get all nodes in the cluster. |
get_pod_events |
Get events for a specific pod. |
get_pods |
Get all pods in the specified namespace. |
get_rbac_roles |
Get all RBAC roles in the specified namespace. |
get_resource_usage |
Get resource usage statistics via kubectl top. |
get_secrets |
Get all Secrets in the specified namespace. |
get_services |
Get all services in the specified namespace. |
health_check |
Check cluster health by pinging the API server. |
install_helm_chart |
Install a Helm chart. |
kubectl_explain |
Explain a Kubernetes resource using kubectl explain. |
port_forward |
Forward local port to pod port. |
scale_deployment |
Scale a deployment. |
switch_context |
Switch current kubeconfig context. |
uninstall_helm_chart |
Uninstall a Helm release. |
upgrade_helm_chart |
Upgrade a Helm release. |
Tools Details
Tool: check_pod_health
Check the health status of a pod.
| Parameters | Type | Description |
|---|---|---|
pod_name |
string |
|
namespace |
string optional |
Tool: create_deployment
Create a new deployment.
| Parameters | Type | Description |
|---|---|---|
image |
string |
|
name |
string |
|
replicas |
integer |
|
namespace |
string optional |
Tool: delete_resource
Delete a Kubernetes resource.
| Parameters | Type | Description |
|---|---|---|
name |
string |
|
resource_type |
string |
|
namespace |
string optional |
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.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_current_context
Get current kubeconfig context.
Tool: get_deployments
Get all deployments in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_events
Get all events in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_logs
Get logs from a pod.
| Parameters | Type | Description |
|---|---|---|
pod_name |
string |
|
container |
string optional |
|
namespace |
string optional |
|
tail |
string optional |
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.
| Parameters | Type | Description |
|---|---|---|
pod_name |
string |
|
namespace |
string optional |
Tool: get_pods
Get all pods in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_rbac_roles
Get all RBAC roles in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_resource_usage
Get resource usage statistics via kubectl top.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_secrets
Get all Secrets in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: get_services
Get all services in the specified namespace.
| Parameters | Type | Description |
|---|---|---|
namespace |
string optional |
Tool: health_check
Check cluster health by pinging the API server.
Tool: install_helm_chart
Install a Helm chart.
| Parameters | Type | Description |
|---|---|---|
chart |
string |
|
name |
string |
|
namespace |
string |
|
repo |
string optional |
|
values |
string optional |
Tool: kubectl_explain
Explain a Kubernetes resource using kubectl explain.
| Parameters | Type | Description |
|---|---|---|
resource |
string |
Tool: port_forward
Forward local port to pod port.
| Parameters | Type | Description |
|---|---|---|
local_port |
integer |
|
pod_name |
string |
|
pod_port |
integer |
|
namespace |
string optional |
Tool: scale_deployment
Scale a deployment.
| Parameters | Type | Description |
|---|---|---|
name |
string |
|
replicas |
integer |
|
namespace |
string optional |
Tool: switch_context
Switch current kubeconfig context.
| Parameters | Type | Description |
|---|---|---|
context_name |
string |
Tool: uninstall_helm_chart
Uninstall a Helm release.
| Parameters | Type | Description |
|---|---|---|
name |
string |
|
namespace |
string |
Tool: upgrade_helm_chart
Upgrade a Helm release.
| Parameters | Type | Description |
|---|---|---|
chart |
string |
|
name |
string |
|
namespace |
string |
|
repo |
string optional |
|
values |
string optional |
Use this MCP Server
{
"mcpServers": {
"kubectl-mcp-server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/local-directory:/local-directory",
"mcp/kubectl-mcp-server"
]
}
}
}