Building the Bridge: Making Kubernetes Security Accessible Through MCP

21 January 2026

Building the Bridge: Making Kubernetes Security Accessible Through MCP

Why Kubernetes Security Needed a Bridge

Kubernetes security is powerful—but notoriously complex. At Nirmata, we saw teams struggling to implement proper security governance because doing so requires deep expertise in Kubernetes internals and policy management.

That expertise gap introduces real risk. So, we asked a simple question:
How do we preserve Kyverno’s precision while making it accessible to non-experts?

The answer wasn’t simplifying Kyverno itself—it was transforming how people interact with it.

Why We Built an MCP Server

The Model Context Protocol (MCP) changed the game. MCP provides a standardized way for AI assistants to interact with systems like Kubernetes and Kyverno.

By building a Kyverno MCP Server, we created one interface that works with any AI assistant that speaks MCP—whether that’s ChatGPT, Claude, or a custom-built internal assistant.

This means anyone can query their cluster through natural language, asking questions such as:

  • “Does my cluster follow pod security standards?”

  • “Show me RBAC violations in production.”

  • “Which policies am I failing, and why?”

The MCP server translates those plain-language questions into Kyverno operations, runs the evaluations, and returns the results conversationally—bridging the gap between human understanding and machine precision.

How the Nirmata MCP Server Works

We exposed five key capabilities through the MCP interface:

  1. Cluster Discovery – View available Kubernetes environments

  2. Context Switching – Seamlessly move between clusters in one conversation

  3. Policy Application – Scan resources against policies for compliance insights

  4. Violation Reporting – Identify issues and explain why they matter

  5. Interactive Help – Guide users on what’s possible through MCP

Each capability is implemented as a modular Go component, designed for extensibility as Kyverno and Kubernetes evolve.

The data flow is straightforward but powerful:

  • The AI assistant sends a question through MCP

  • The server translates it into precise Kyverno operations

  • Kyverno evaluates the cluster

  • Results return enriched with context and explanations

This cycle allows natural, ongoing dialogue—turning traditional command-line operations into conversational experiences.

Embedded Policies for Instant Security

To ensure quick value, we embedded three curated policy sets directly into the MCP Server binary:

  • Pod Security Standards

  • RBAC Best Practices

  • General Kubernetes Operational Security

These built-in policies provide strong baselines out of the box, while still allowing customization or user-supplied policies. Teams can begin secure operations immediately—without hunting down YAML files or configuration docs.

Overcoming Key Technical Challenges

Multi-Transport Flexibility

Supporting multiple transport mechanisms (STDIO, HTTP/S, and Server-Sent Events) ensures the MCP Server fits naturally into diverse workflows—from local CLI use to enterprise cloud deployments.

Namespace Filtering

In enterprise-scale clusters, precision matters. Our namespace filtering logic allows scanning only relevant namespaces—critical for performance and compliance reporting at scale.

User-Centric Error Handling

Instead of cryptic errors, the MCP Server provides guided remediation. For example, if Kyverno isn’t installed, users receive clear instructions on how to fix it—dramatically improving usability.

Real-World Use Cases

Early adopters are using the MCP Server across multiple domains:

  • DevSecOps Pipelines – Integrating automated security checks into CI/CD

  • Compliance Auditing – Generating policy reports and tracking remediation

  • Education & Training – Teaching Kubernetes security through real cluster queries

  • Incident Response – Conversationally assessing cluster posture during production events

Teams report that conversational queries save time, reduce errors, and simplify decision-making during critical operations.

Performance and Security Built-In

Performance

Embedded policies and optimized file management deliver fast scan responses—even in large, multi-namespace clusters. Testing confirmed responsiveness remains strong for most real-world workloads.

Security

Every operation respects namespace boundaries and RBAC permissions. The MCP interface does not bypass existing controls, ensuring the same security posture you’d expect from direct Kyverno use.

As the MCP ecosystem evolves, Nirmata continues to refine access control and operational safeguards.

The Bigger Picture: AI Meets Cloud-Native Governance

The Nirmata MCP Server isn’t just about usability—it represents a step toward AI-orchestrated infrastructure management.

As more tools adopt MCP, AI assistants will be able to:

  • Audit policies via Kyverno

  • Correlate monitoring and deployment data

  • Generate unified, cross-system security insights

This creates a future where AI assistants orchestrate governance across entire cloud-native environments—securely and transparently.

By adopting MCP, Nirmata’s implementation is AI-agnostic, compatible with any assistant that follows the protocol—ensuring long-term interoperability.

Getting Started

Deploying the Nirmata MCP Server is simple:

  1. Run locally with one command for testing.

  2. Deploy in production with HTTPS and your kubeconfig file.

  3. Connect any MCP-compatible AI assistant.

The CLI supports:

  • Custom kubeconfig selection

  • Transport configuration (STDIO, HTTP, SSE)

  • TLS certificate setup

  • Namespace filtering

Our open-source documentation guides users through setup, configuration, and integration workflows.

What We Learned

This project reaffirmed a core belief:
The future of infrastructure management isn’t about simplifying systems—it’s about making complexity navigable through better interfaces.

Conversational interfaces like MCP change how engineers interact with tools. They expose new usability challenges, but also bring clarity, standardization, and scalability to policy-driven governance.

By open-sourcing the Nirmata MCP Server for Kyverno, we’re inviting contributors to help build this future—where AI-driven interfaces make Kubernetes security accessible to everyone.

Learn More

What Is Policy as Code in Kubernetes? 
Leveling Up Policy Enforcement in Kubernetes: A Look at Kyverno 1.14 and CEL

Latest

From the blog

The latest industry news, interviews, technologies, and resources.

View all blogs
How does Kyverno work
How Does Kyverno Work? A Simple Explanation for DevOps Teams

Kyverno is a Kubernetes-native policy engine that allows DevOps teams to define, validate, mutate, and generate Kubernetes resources using simple…

Kubernetes nodes/proxy GET → RCE: how “telemetry” permissions can compromise a cluster

A subtle (and frankly surprising) Kubernetes authorization behavior has resurfaced as a practical cluster-compromise path: an identity granted nodes/proxy access…