Crd MCP Server
Testing & Qualitycrd-mcp-serverCrd MCP Server is an Agent Skill for testing & quality published in the GoogleCloudPlatform/k8s-config-connector repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Provides instructions and a tool for analyzing Custom Resource Definition (CRD) changes, including checking for KRM API structural equivalence and backward compatibility.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/HEAD/.gemini/skills/crd-mcp-server/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/crd-mcp-server, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
CRD Analyzer
Overview
The crd-mcp-server is a binary tool under dev/tools/crd-mcp-server/ designed to check and validate Custom Resource Definition (CRD) schema changes in the Config Connector repository. It has two main subcommands:
equivalent: Checks whether a CRD change is equivalent to its previous git-committed version (no fields added or removed under spec, no type or CEL validation changes, etc.).compatible: Checks whether a CRD change is backward compatible with its previous git-committed version (no fields removed or renamed, no incompatible type changes, allowed additions).
This tool is used in presubmits (e.g., dev/ci/presubmits/crd-equivalence-check) to ensure that KRM schemas remain compatible or equivalent during migration from legacy to direct reconcilers.
How to Run
Before running, ensure you run from the repository root. You can build and run the tool directly using go run:
Checking for Equivalence (e.g., during promotion or refactoring)
To check if a changed CRD is equivalent to its version on master:
go run ./dev/tools/crd-mcp-server equivalent --file config/crds/resources/services/v1beta1/service_kind.yaml --ref master
Checking for Backward Compatibility
To check if a changed CRD is backward-compatible with master:
go run ./dev/tools/crd-mcp-server compatible --file config/crds/resources/services/v1beta1/service_kind.yaml --ref master