1. Conduid
  2. Cloud
  3. Kube Audit MCP
MCP server · Cloud

Kube Audit MCP

MCP Server for Kubernetes Audit Logs

61Good

Scored 4 days ago · breakdown

About Kube Audit MCP

Kube Audit MCP is an MCP server published by mozillazg in the Cloud category: mCP Server for Kubernetes Audit Logs. It has been installed 0 times through Conduid.

The repository has 19 stars and 2 forks, with the last commit 6 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx kube-audit-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Kube Audit MCP

Powered by Claude · Grounded in docs

I know everything about Kube Audit MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.4.1v0.4.1 · 14 Sep 2025Changelog 38d286967447203b72228864203cb59a4a7d0772 chore(deps): pin gcr.io/distroless/static-debian12 docker tag to 87bce11 (#22) 823cb8c37c84a84acd41e9e01041f2b36de1ccd6 chore(deps): update golang docker tag to v1.25.0 (#14)…
v0.4.0v0.4.0 · 6 Sep 2025Changelog d2ef2416269516193d5b979d17364014610592b7 chore(deps): update actions/checkout action to v5 (#9) 203e48af95b2a4af0bc97e02efbabce902c3176b chore(release): add docker image (#11) f118cc6c343c65ca81406c61650d2885268a01a3 feat(cli):…
v0.3.1v0.3.1 · 11 Aug 2025Changelog 95064d8e0bb57a021f57a11acb2dc0a62b44d5bc feat(docs): add README.zh-CN.md 2f25e523d516ed5c32ad4716c0fd0d9fd7a8a1c0 fix(config): Ensure default config file path is `~/.config/kube-audit-mcp/config.yaml` Released by…
v0.3.0v0.3.0 · 10 Aug 2025Changelog f268fed29feed7a261d0ed7e724cfba32ceac3e8 Merge remote-tracking branch 'origin/dev' b443ffb3d3867cdd25dcea497ec1b983c460c1d8 Merge remote-tracking branch 'origin/master' into dev 3887fbd3932b58ab5746cedb5020366c727dda4a…
v0.2.0v0.2.0 · 10 Aug 2025Changelog ce11218f8127520e8cd7f4e52ee9496a051cc970 Merge remote-tracking branch 'origin/dev' 6621e7d7c2c6a4eaa296cd84a0e96ad85d9e85b6 chore(config): migrate config .github/renovate.json5 (#2) e684798a222bf0d9b477d9ef2ea5dc5fc91109f7…

README

kube-audit-mcp

English | 简体中文

kube-audit-mcp is a Model Context Protocol (MCP) server that gives AI agents, assistants, and chatbots the ability to query Kubernetes Audit Logs.

kube-audit-mcp

Table of Contents

Installation

  1. First, download and install the latest release from the releases page.
    • You can also install via docker:

      docker pull quay.io/mozillazg/kube-audit-mcp:latest
      
  2. Then, configure the provider of Kubernetes Audit Logs. See Configurations for details.

MCP Clients

Theoretically, any MCP client should work with kube-audit-mcp.

Standard config works in most of the clients:

{
  "mcpServers": {
    "kube-audit": {
      "type": "stdio",
      "command": "kube-audit-mcp",
      "args": [
        "mcp"
      ]
    }
  }
}

You can also run kube-audit-mcp via docker, use the following config:

{
  "mcpServers": {
    "kube-audit": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/etc/kube-audit-mcp/config.yaml:/etc/kube-audit-mcp/config.yaml:ro",
        "quay.io/mozillazg/kube-audit-mcp:latest",
        "mcp",
        "--config",
        "/etc/kube-audit-mcp/config.yaml"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "needed_if_you_use_alibaba_sls_provider",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "needed_if_you_use_alibaba_sls_provider",
        "AWS_ACCESS_KEY_ID": "needed_if_you_use_aws_cloudwatch_logs_provider",
        "AWS_SECRET_ACCESS_KEY": "needed_if_you_use_aws_cloudwatch_logs_provider",
        "GOOGLE_APPLICATION_CREDENTIALS": "needed_if_you_use_gcp_cloud_logging_provider"
      }
    }
  }
}

Claude Code

Use the Claude Code CLI to add the kube-audit-mcp:

claude mcp add kube-audit kube-audit-mcp mcp

Claude Desktop

Follow the MCP install guide, use the standard config above.

Gemini CLI

Follow the MCP install guide, use the standard config above.

VS Code

Follow the MCP install guide, use the standard config above. You can also install the kube-audit-mcp MCP server using the VS Code CLI:

# For VS Code
code --add-mcp '''{"name":"kube-audit","command":"kube-audit-mcp","args":["mcp"]}'''

After installation, the kube-audit-mcp MCP server will be available for use with your GitHub Copilot agent in VS Code.

kubectl-ai

servers:
  # Local MCP server (stdio-based)
  - name: kube-audit
    command: kube-audit-mcp
    args:
      - mcp

Transport Options

STDIO Transport (Default)

The default transport mode uses standard input/output for communication. This is the standard MCP transport used by most clients like Claude Desktop.

# Run with default stdio transport
kube-audit-mcp mcp

# Or explicitly specify stdio
kube-audit-mcp mcp --transport stdio

Configurations

kube-audit-mcp requires a configuration file to specify the provider of Kubernetes Audit Logs. The configuration file is typically located at ~/.config/kube-audit-mcp/config.yaml or specified via the --config flag.

Sample Config

You can get a sample config via the following command:

kube-audit-mcp sample-config
default_cluster: prod              # The default cluster to use
clusters:                          # List of clusters
  - name: prod                     # Name of the cluster
    provider:                      # Provider configuration, see below for details
      name: aws-cloudwatch-logs    # Use CloudWatch Logs as the provider
      aws_cloudwatch_logs:
        log_group_name: /aws/eks/test/cluster  # Replace with your CloudWatch Logs log group name
  - name: dev                     # Name of the cluster
    provider:
      name: alibaba-sls            # Use Alibaba Cloud Log Service as the provider
      alibaba_sls:
        endpoint: cn-hangzhou.log.aliyuncs.com  # Replace with your Log Service endpoint
        project: k8s-log-cxxx                   # Replace with your Log Service project
        logstore: audit-cxxx                    # Replace with your Log Service logstore
  - name: test
    provider:
      name: gcp-cloud-logging      # Use Google Cloud Logging as the provider
      gcp_cloud_logging:
        project_id: test-233xxx # Replace with your Project ID
        cluster_name: test-cluster  # Replace with your GKE cluster name (optional)

Or save the sample configuration to the default config file location:

kube-audit-mcp sample-config --save

Provider

Alibaba Cloud Log Service

Prerequisites:

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "log:GetLogStoreLogs"
      ],
      "Resource": "*"
    }
  ]
}

Config:

name: alibaba-sls
alibaba_sls:
  endpoint: cn-hangzhou.log.aliyuncs.com  # Replace with your Log Service endpoint
  logstore: ${log_store}                  # Replace with your Log Service logstore
  project: ${project_name}                # Replace with your Log Service project

AWS CloudWatch Logs

Prerequisites:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:StartQuery",
        "logs:GetQueryResults"
      ],
      "Resource": "*"
    }
  ]
}

Config:

name: aws-cloudwatch-logs
aws_cloudwatch_logs:
  log_group_name: /aws/eks/${cluster_name}/cluster # Replace with your CloudWatch Logs log group name

Google Cloud Logging

Prerequisites:

Config:

name: gcp-cloud-logging
gcp_cloud_logging:
  project_id: ${project_id}         # Replace with your Project ID
  cluster_name: ${cluster_name}     # Replace with your GKE cluster name (optional)

Available Tools

This MCP server exposes the following tools to the AI agent:

query_audit_log

Queries the Kubernetes audit logs from the configured provider. This is the primary tool for investigating activity in your clusters.

Parameters:

  • cluster_name (string, optional): The name of the cluster to query. You can see available clusters with the list_clusters tool. Defaults to the configured default_cluster.
  • start_time (string, optional): The start time for the query. Can be in ISO 8601 format (2024-01-01T10:00:00) or relative time (7d, 1h, 30m). Defaults to 7d.
  • end_time (string, optional): The end time for the query. If omitted, defaults to the current time.
  • limit (number, optional): The maximum number of log entries to return. Defaults to 10, with a maximum of 20.
  • namespace (string, optional): Filter logs by a specific namespace. Supports suffix wildcards (e.g., kube-*).
  • resource_types (array of strings, optional): Filter by one or more Kubernetes resource types (e.g., pods, deployments). Supports short names (e.g., po, deploy). Use list_common_resource_types to discover available types.
  • resource_name (string, optional): Filter by a specific resource name. Supports suffix wildcards.
  • verbs (array of strings, optional): Filter by one or more action verbs (e.g., create, delete, update).
  • user (string, optional): Filter by the user who performed the action. Supports suffix wildcards.

list_clusters

Lists all clusters that are configured in the config.yaml file. This is useful for discovering which clusters you can target for queries.

Parameters: None

list_common_resource_types

Returns a list of common Kubernetes resource types, grouped by category (e.g., "Core Resources", "Apps Resources"). This helps in finding the correct value for the resource_types parameter in the query_audit_log tool.

Parameters: None

README mirrored from the source repository 4 days ago. The original is authoritative.

Questions

About Kube Audit MCP

How do I install Kube Audit MCP?

Run npx kube-audit-mcp, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Kube Audit MCP safe to use with an AI agent?

Its trust score is 61 out of 100 (good). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Kube Audit MCP still maintained?

The last commit was 6 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.