finops-cluster) is running.
1) Confirm kubectl connectivity and namespaces
First, verify thatkubectl can communicate with the cluster and that the expected namespaces are present:
kubectl cannot reach the cluster, fix your kubeconfig or ensure the kind cluster is running before continuing.
2) Verify and pull the MCP image
The MCP image is published on Docker Hub asmcp/kubernetes:latest. The repository is MIT licensed and its README documents included tools and usage.
Optional: verify the image signature using cosign before pulling:
3) Prepare a container-reachable kubeconfig
By default your kubeconfig may referencelocalhost (or other host-local addresses). That works from the host machine but not from inside a container. For kind, generate a kubeconfig that uses the internal Docker network address so containers attached to the kind network can reach the API server:
/tmp/kubeconfig-docker.yaml whose server address is reachable from containers on the kind network.
Tip: If you later run MCP as a Kubernetes pod inside the same cluster, the pod’s in-cluster configuration will handle API access for you and you won’t need to rewrite kubeconfig.
Warning: The kubeconfig file contains cluster credentials. Avoid uploading or sharing it publicly and prefer read-only mounts where possible. Remove temporary files when finished.
4) Run the MCP Docker container
Run MCP attached to thekind Docker network and mount the adjusted kubeconfig into the container. The command below exposes MCP on port 8000 and sets environment variables for transport and access controls:
This starts the MCP server and exposes it on
http://localhost:8000 on your host. The container uses the mounted kubeconfig to reach the kind cluster API.
5) Next steps — build and connect an agent
With MCP running, the typical next steps are:- Build an agent that implements the connection protocol to MCP.
- Point the agent’s connection logic to the MCP endpoint (e.g.,
http://<MCP_HOST>:8000). - Implement request/response handling and any tool-specific integration (read-only vs. read/write behaviors, authentication, etc.).
- Test communication between the agent and MCP and validate expected workflows.
Links and references
- kind — Kubernetes in Docker (kind.sigs.k8s.io)
- cosign — Container image signing
- Docker Hub — mcp/kubernetes
- kubectl — Kubernetes CLI