kubescape
MCP server from slashben/kubescape-mcp-server
claude mcp add --transport stdio slashben-kubescape-mcp-server ./ks-mcpserver
How to use
The Kubescape MCP Server is a middleware component that exposes Kubernetes vulnerability manifests and related tools through the Mark3 Labs MCP protocol. It connects to your Kubernetes cluster (via your kubeconfig/context) and leverages Kubescape's vulnerability storage API to provide discovery, listing, and querying capabilities for vulnerability manifests at both image and workload levels. Through the MCP interface, clients can enumerate available vulnerability manifests, retrieve the full set of vulnerabilities in a specific manifest, and obtain detailed matches for a given CVE within that manifest. Vulnerability manifests are exposed as MCP resources under Kubescape-specific templates, enabling standardized access across MCP-enabled tooling.
To use the server, run the binary (it listens for MCP protocol requests on standard IO). Once running, you can invoke the built-in MCP tools exposed by the server, such as listing vulnerability manifests, listing vulnerabilities within a manifest, and listing CVE matches within a manifest. The server translates MCP requests into interactions with the Kubescape storage layer, returning manifest data and vulnerability details in MCP-compatible responses. Ensure your tooling is configured to communicate over MCP and target the server instance to leverage the vulnerability data for images and workloads in your cluster.
How to install
Prerequisites:
- Go 1.18+ installed on your machine
- Access to a Kubernetes cluster with kubeconfig context configured
- Git to clone the repository (optional if you already have the source)
Install and run locally:
-
Clone the repository (if you haven't already): git clone https://github.com/slashben/kubescape-mcp-server.git cd kubescape-mcp-server
-
Build the server binary: go build -o ks-mcpserver ks-mcpserver.go
-
Run the server: ./ks-mcpserver
-
Verify the server is listening for MCP protocol requests via stdio as described in the project docs. You can then connect MCP clients to this process to perform discovery, listing, and CVE queries against your Kubernetes cluster.
Additional notes
Tips and considerations:
- The server relies on Kubernetes access via kubeconfig; ensure the appropriate context is active and the user has permissions to read vulnerability manifests via Kubescape storage APIs.
- The MCP resources exposed by Kubescape follow the kubescape://vulnerability-manifests/{namespace}/{manifest_name}/... template conventions described in the README.
- If you encounter authentication or RBAC issues, verify that your kubeconfig context is correct and that the service account or user running the server has permission to access the relevant resources.
- This is a playground project; production deployments should consider security hardening, proper RBAC, and versioned releases.
- For development, ensure code is formatted with gofmt and linted prior to PRs or local testing.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go