Documentation
¶
Overview ¶
Package operator turns a consumer's APIBinding into working MCP.
Enabling MCP is not binding an API — MCP is an endpoint, not a resource. What a consumer is actually consenting to is letting the MCP server act as them in their own workspace, because behind the front-proxy their bearer token is consumed by the proxy and the server has nothing to replay. It therefore impersonates them, and kcp checks that right in every workspace it reaches into.
So the binding carries permission claims on ClusterRoles and ClusterRoleBindings, and this operator spends them on exactly one thing: writing the impersonation grant into the workspace that just consented. It then records an MCPEndpoint there, so the consumer can see that it worked and where to point a client.
There is one workspace this operator can never reach: one that has not bound the export. A cluster appears on the endpoint slice because it bound, and the claims only apply where the binding is — so consent and capability are the same fact.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// RestConfig reaches the kcp shard hosting the mcp APIExport.
RestConfig *rest.Config
// Slice is the endpoint slice following the mcp export; the clusters
// on it are the workspaces that enabled MCP.
Slice string
// ServerURL is where an MCP client connects, reported to consumers.
ServerURL string
// ImpersonateUser is the identity the MCP server presents, and so the
// subject the impersonation grant names.
ImpersonateUser string
// Toolsets is reported so a consumer can see what the server exposes.
Toolsets []string
}
Options configures the operator.