Documentation
¶
Overview ¶
Package registryserver exposes the agentregistry over MCP so Claude + other MCP clients can list and fetch resources as typed tools.
Every tool reads through the v1alpha1 generic Store. Structured outputs are v1alpha1 envelopes (apiVersion/kind/metadata/spec/status).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer( stores map[string]*v1alpha1store.Store, authorizers map[string]Authorizer, listFilters map[string]ListFilter, ) *mcp.Server
NewServer constructs an MCP server that exposes discovery tools backed by v1alpha1 Stores. Tools are namespace-aware; when a tool input omits the namespace, the server searches across all namespaces for backward compatibility with pre-namespaced clients.
Tool names are preserved across builds (`list_servers` not `list_mcpservers`) so saved Claude MCP configs keep working.
Types ¶
type Authorizer ¶ added in v0.4.0
type Authorizer = func(ctx context.Context, in resource.AuthorizeInput) error
Authorizer gates a read operation for a kind against the caller's session (carried on the context). ListFilter returns an ExtraWhere predicate + args that scope a list to what the caller may see. Both mirror the per-kind hooks the REST resource handlers consult (resource.Config.Authorize / resource.Config.ListFilter), so the bridge enforces the same RBAC. A nil hook for a kind means no restriction.
type ListFilter ¶ added in v0.4.0
type ListFilter = func(ctx context.Context, in resource.AuthorizeInput) (extraWhere string, extraArgs []any, err error)
ListFilter is the per-kind list-scoping hook; see Authorizer.