How to Configure Windsurf Kubernetes MCP Server
You set up a windsurf kubernetes mcp server by adding the server to your IDE settings. You then link it to a valid cluster config file on your machine. Note that Cognition renamed Windsurf to Devin Desktop in June 2026. The IDE keeps the same core features and legacy Cascade agent workflows. Many teams start by giving the agent their own local admin keys. That approach speeds up testing, but broad roles create big risks. A mistake in a prompt can delete live workloads or expose secret data. Ho
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up a windsurf kubernetes mcp server by adding the server to your IDE settings. You then link it to a valid cluster config file on your machine. Note that Cognition renamed Windsurf to Devin Desktop in June 2026. The IDE keeps the same core features and legacy Cascade agent workflows. Many teams start by giving the agent their own local admin keys. That approach speeds up testing, but broad roles create big risks. A mistake in a prompt can delete live workloads or expose secret data.
How a windsurf kubernetes mcp server works with cluster roles
The IDE agent connects to external tools through the Model Context Protocol. It reads your local MCP settings file to start the server process. Also, the agent can run terminal commands with your approval. It uses a dedicated shell that loads your local aliases and variables. When the MCP server starts, it uses your local cluster keys. Every tool call from the agent goes straight to the Kubernetes API server.
Kubernetes checks those requests using Role-Based Access Control, or RBAC. In Kubernetes, rules are only additive, and there are no deny rules. You grant rights by creating a Role for one namespace. For cluster-wide rights, you create a ClusterRole instead. You then attach those rules to a user or service account. A RoleBinding grants those rights inside a single namespace. A ClusterRoleBinding grants rights across the entire cluster at once.
How to scope permissions for the agent
You should not let the MCP server use a cluster admin role. Instead, create a dedicated service account just for your AI agent. Give that account a narrow Role limited to one test namespace. Start by granting read-only verbs like get, list, and watch on pods. This lets the agent check app status without changing live workloads.
Be very careful with Kubernetes subresources like pod logs and exec calls. RBAC treats subresources as separate items written with a slash. If you grant access to the pods/log subresource, the agent can read app output. Those logs often hold raw emails, phone numbers, or card numbers. If you grant the pods/exec subresource, the agent can run shell commands inside containers. Keep write verbs and exec rights off the agent role whenever possible.
Kubernetes API Server Access + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native setup solves and what it leaves open
Native Kubernetes RBAC controls which API endpoints the MCP server can reach. It stops an agent with a read role from deleting a deployment. It also blocks the agent from reading namespaces outside its RoleBinding. This setup solves basic access control at the API level.
Still, static RBAC leaves big operational gaps open during live sessions. RBAC decides who logs in, not what specific requests do in flight. If an agent needs exec rights to fix a bug, RBAC allows all commands. It cannot inspect the shell command inside that exec request. Also, Kubernetes cannot rewrite sensitive data inside pod logs before the agent reads them. Raw national IDs or card numbers flow straight into the model context. Finally, local MCP keys sit on engineer laptops where any shell process can read them.
Check Kubernetes API requests and responses on the wire
Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source proxy, a sidecar for your Kubernetes API, inline on the API connection. On every kubectl or API call an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error, or hold risky calls for approval. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs in memory. View the project on GitHub.
Frequently asked questions
Is Windsurf now called Devin Desktop?
Yes, Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The product keeps the same IDE interface, terminal runner, and MCP server support.
Can Kubernetes RBAC block specific commands inside pod exec?
No, Kubernetes RBAC only checks if the user can call the pods/exec subresource. Once allowed, RBAC cannot filter or block specific shell commands run inside the container.
How do I stop the MCP server from changing all namespaces?
Use a standard Role and RoleBinding instead of a ClusterRoleBinding. A RoleBinding restricts the service account permissions to one specific namespace.
Related guides
In this post