mcpserver

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package mcpserver reconciles MCPServer objects. MCPServer is a built-in, core-hosted "provider": the CRD is distributed to tenant workspaces via the core.faros.sh APIExport/APIBinding, and this reconciler — running in-process in the hub against the core.faros.sh multicluster manager — provisions each server's long-lived identity (ServiceAccount + token Secret + RBAC) and publishes its endpoint URL + token reference on status. The aggregate MCP serving itself lives in pkg/hub/mcpaggregate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupWithManager

func SetupWithManager(mgr mcmanager.Manager, kcpConfig *rest.Config, hubExternalURL string, enumerate ProviderEnumerator) error

SetupWithManager registers the MCPServer controller with the core.faros.sh multicluster manager. kcpConfig is the hub's admin config, used to build a direct per-tenant client for identity provisioning (the token controller populates legacy token Secrets written through a direct client, which the APIExport virtual-workspace client does not guarantee). enumerate lists the Ready MCP-exposing providers each server discovers its tools from.

Types

type ProviderEnumerator

type ProviderEnumerator func(ctx context.Context) []mcpaggregate.ProviderTarget

ProviderEnumerator returns the tenant's Ready, MCP-exposing providers. Wired from the hub's provider registry — the same enumerator the aggregate endpoint federates with.

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler provisions each MCPServer's identity and publishes its status.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (ctrl.Result, error)

Reconcile provisions the server's identity and writes status. Provisioned objects are owned by the MCPServer, so they are garbage-collected when it is deleted. Until kcp's token controller populates the token Secret, the server stays Provisioning and the reconcile requeues.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL