
Crossplane
io.github.ravibagri5由 GitHub 账号 ravibagri5 发布v0.1.5更新于 Oct 24, 2026
Read-only access to a Crossplane control plane: resources, claims, packages, compositions.
概览
一个本地 MCP 服务器,让 AI 助手以只读方式检查 Crossplane 控制平面、诊断故障资源,并可选地通过平台 API 进行预配。
- 可以做什么
- 查看托管资源、复合资源与声明,包括数量、状态、事件和组合树,并诊断资源为何未就绪或发生漂移。查看已安装的 Provider、函数与配置及其版本和错误。探索平台 API:XRD 及其字段结构、Composition、校验与离线试运行渲染。检查控制平面配置,如 EnvironmentConfig、运行时配置和托管资源定义。执行诊断:集群列表、整体健康、异常与卡在删除中的资源、Usage 及删除影响。启用写入后,可通过平台 API 创建数据库和工作负载,或应用 Crossplane 清单。
- 适用场景
- 适用于使用 Crossplane 控制平面、希望助手解释故障、沿声明追踪到底层基础设施、发现漂移或评估删除影响时。以检查为主;仅在开发用控制平面上启用写入。
- 运行要求
- 需要本地二进制、容器镜像或 Go 1.26 以上源码安装,并能访问已安装 Crossplane v1 或 v2 的 Kubernetes 集群。凭据来自 kubeconfig 上下文、云身份 exec 插件或服务账户;通过 --kubeconfig、--context、--clusters 等参数选择目标。桌面客户端可能需要设置 PATH 和 HOME 供 exec 插件使用。离线渲染还需 crossplane CLI 和容器运行时。
安装
在 SourceWeft 中
- 打开 控制台中的 Crossplane,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
crossplane-mcp-server
[CI] [Release] [CodeQL] [GitHub release] [golangci-lint] [Go version] [Crossplane] [Downloads] [License]
A Model Context Protocol server that lets AI assistants understand a Crossplane control plane.
Ask your assistant "how many managed resources do I have and is anything broken?" and it will answer from your actual control plane, with the reason for every failure, instead of guessing.
The server is read-only by default: the tools that create and update are
not registered at all unless you start it with --read-only=false, so a client
cannot see them, let alone call them. Nothing deletes in either mode. Turn
writes on and the same assistant can provision from your platform APIs:
Nothing there names a Kubernetes kind. The tool found the platform API this control plane offers, read the schema its XRD declares and filled it in. See examples/demo for a control plane you can try it on without a cloud account.
Contents
- Why not a generic Kubernetes MCP server?
- Quick start
- Installation
- Client configuration
- Tools
- Read-only and write modes
- Prompts
- Calling a tool directly
- Configuration
- Multiple control planes
- Running in a cluster
- Required RBAC
- Contributing
- Security
- License
Why not a generic Kubernetes MCP server?
A general purpose Kubernetes MCP server can already reach every object on a
Crossplane control plane: Crossplane resources are Kubernetes resources, and a
generic resources_list with an apiVersion and a kind will happily return
your XRDs. Access was never the problem.
The problem is that it does not know what any of it means, and it will happily delete it.
That last row matters more here than it does for ordinary Kubernetes work. On a
Crossplane control plane a deleted object is not a pod that a ReplicaSet will
recreate, it is a production database. Point this server at production and it
cannot mutate anything; point it at a development control plane with
--read-only=false and it still cannot delete a resource, and cannot touch a
Secret, a Deployment or an RBAC rule at all.
Underneath, the Crossplane knowledge this server encodes is:
- It discovers resources by Crossplane category (
managed,composite,claim), so it works with every provider without being taught about any of them. - It reads
Ready/Syncedon resources andInstalled/Healthyon packages, and explains the difference to the model. - It walks
resourceRefsto build the composition tree, the same view ascrossplane beta trace. - It knows that drift on a paused or
Observe-only resource is never corrected, which is the difference between a warning and a non-event. - It supports both Crossplane v1 and v2 layouts, including namespaced composite
resources and the
spec.crossplanereference location.
Quick start
Then add it to your MCP client (see Client configuration) and ask it about your control plane.
Installation
Requirements
- Go 1.26 or newer, if you install from source or with
go install. The pre-built binaries and the container image have no such requirement. - Access to a Kubernetes cluster with Crossplane installed. Any version of Crossplane v1 or v2 works.
- Optional: the crossplane CLI and a
container runtime, used only by
crossplane_composition_render. Rendering executes the composition function pipeline, which cannot be done through the Kubernetes API. Every other tool needs nothing beyond API access, andcrossplane_composition_validatecovers most of the same ground without a container runtime.
Go install
Container image
Binaries
Pre-built binaries for Linux, macOS and Windows are attached to every release. These are the easiest option if you do not have a recent Go toolchain.
From source
Registries
This server is listed in:
- Official MCP Registry
as
io.github.ravibagri5/crossplane-mcp-server, which is where MCP clients look it up. - Smithery, which also offers one-click installation into a client.
- pkg.go.dev for the Go package documentation.
Client configuration
Claude Desktop, Claude Code, Cursor, Windsurf
PATH and HOME matter whenever a kubeconfig context authenticates through an
exec plugin such as kubelogin or aws. Desktop applications launch servers
with a near-empty environment, so without them the plugin is either not found
or cannot read its token cache.
Goose
In ~/.config/goose/config.yaml:
Add --read-only=false to args to let goose provision as well as inspect.
examples/demo walks through that end to end on a throwaway
cluster.
VS Code
Add to .vscode/mcp.json in your workspace:
Container based clients
Tools
Run crossplane-mcp-server tools to print this list from your build.
resources
Managed resources, composite resources and claims.
packages
compositions
config
How the control plane itself is configured.
diagnostics
provisioning
Withheld unless the server runs with --read-only=false. See
Read-only and write modes.
Expose a subset with --toolsets:
Read-only and write modes
The server starts read-only. In that mode the write tools are never registered,
so tools/list does not mention them and a call to one comes back as "no tool
named": there is nothing for a model to be talked into.
What stays true even with writes enabled:
- Nothing deletes. Writes create and update, and that is the whole list.
There is no delete tool and no
Deletecall anywhere in the codebase, so the worst outcome of a confused assistant is a resource you did not want, not one you did.crossplane_impactstill tells you what a deletion would destroy, and you run the deletion yourself. - Only Crossplane kinds can be written. The write path checks the resource against Crossplane's categories and API groups and refuses everything else, so the server cannot create a Secret, edit a Deployment or grant itself RBAC no matter what it is asked.
- Provisioning goes through your platform APIs.
crossplane_database_createreads the XRD and sets the fields it declares; it does not invent a managed resource and it does not set fields the API has never heard of. Values with nowhere to go are reported back rather than dropped. - Everything is a server-side apply, under the field manager
crossplane-mcp-server, so a retry updates rather than duplicates andkubectl applykeeps working alongside it. Every object gets the labelapp.kubernetes.io/created-by=crossplane-mcp-server. dryRunis available on every write tool, which asks the API server to validate the manifest without persisting it.- RBAC still decides.
--read-only=falsecannot grant permissions the credentials do not have.deploy/rbac-write.yamlis a starting point that allows create and update on your platform APIs and nothing else — not evendelete.
Prompts
Tools tell a model what it can do. Prompts tell it the order an experienced operator would do things in, so it does not have to rediscover on every conversation that diagnosing a claim starts at the claim and not at the managed resource that looks angriest.
Most clients surface these as slash commands or a prompt picker.
Calling a tool directly
call runs one tool and prints what it returns, without an MCP client in the
way. Use it to check the server can reach your cluster, and to see what a tool
really returns rather than what a model says it returned.
Run crossplane-mcp-server tools --json to see the exact arguments a tool
accepts.
Configuration
Multiple control planes
One server can talk to several control planes. Every tool takes an optional
cluster argument naming one of them, and crossplane_clusters_list tells a
model which are available.
Ask your assistant "is anything failing in production?" and it passes
cluster: "production"; omit the cluster and it uses--context.
Use --clusters. Without it every context in your kubeconfig becomes a
target, which on a machine with a few hundred contexts means an assistant could
reach a production cluster when you meant a sandbox. Naming the handful you
work with is both faster and safer.
Clients are created lazily and cached, so an unreachable cluster does not stop the others from working, and listing clusters costs nothing.
Credentials
Exec plugins are ordinary executables, so a server launched by a desktop
application needs PATH to include them, and HOME so they can find their
own token cache. Most MCP clients start servers with a near-empty environment,
which is the usual reason a cluster works in a terminal but not in the client:
Running in a cluster
Serve the streamable HTTP transport when the server runs inside the control plane it inspects:
The MCP endpoint is /mcp and a liveness endpoint is served at /healthz. The
server uses the pod's service account when no kubeconfig is present. Manifests
are in deploy/.
The HTTP transport has no built-in authentication. Put it behind an authenticating proxy, or keep it on a private network. See SECURITY.md.
Required RBAC
The server only ever reads. A cluster role that covers every tool:
If you would rather not grant a cluster-wide read, deploy/rbac-minimal.yaml
narrows the permissions at the cost of some tools returning warnings.
A server started with --read-only=false needs write verbs as well, and should
only be given them on the platform APIs an assistant is meant to use.
deploy/rbac-write.yaml grants create, update and patch on a named list
of API groups. It grants no delete, because no tool deletes, and leaves out
packages: installing a Provider runs somebody else's code in your cluster.
Contributing
Contributions are very welcome. Start with CONTRIBUTING.md,
which covers the development workflow, how to add a tool, and the sign-off
requirement. Good first issues are labelled
good first issue.
Two things to know before you open a pull request:
- Pull requests target
main, the only long-lived branch. Releases are signed tags onmain. See docs/branching.md. - Questions and half-formed ideas belong in Discussions, not the issue tracker. A maintainer will open the issue once the shape is agreed.
Where the project is going, including write support, auditing and scanning, is in ROADMAP.md.
This project follows the Crossplane Code of Conduct and is governed as described in GOVERNANCE.md.
Security
Please report vulnerabilities privately. See SECURITY.md.
License
Apache License 2.0. See LICENSE.
crossplane-mcp-server is a community project and is not an official
Crossplane or CNCF project. Crossplane is a registered trademark of The Linux
Foundation.
来源:README.md,提交 b519b26
工具
0版本历史
1- v0.1.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
