Skip to main content

ToolSet CRD

The ToolSet CRD (charts/stoa-platform/crds/toolsets.gostoa.dev.yaml) connects an external or internal upstream MCP server (sse or streamable-http) and registers its discovered tools in stoa-gateway.

OpenAPI-to-Tool Generation vs ToolSet

ToolSet federates a live upstream MCP server. To generate individual Tool CRDs statically from an OpenAPI specification, use stoactl bridge <openapi.yaml>.

Resource Metadata​

FieldValue
CRD Nametoolsets.gostoa.dev
API Versiongostoa.dev/v1alpha1
KindToolSet
Short Namets
ScopeNamespaced
Watcherstoa-gateway (CrdWatcher)

Complete Example​

apiVersion: gostoa.dev/v1alpha1
kind: ToolSet
metadata:
name: crm-mcp-upstream
namespace: tenant-acme
spec:
upstream:
url: https://crm-mcp.internal.example.com/mcp
transport: streamable-http
timeoutSeconds: 30
auth:
type: bearer
secretRef: crm-mcp-token # K8s Secret name in `tenant-acme` (reads key `token`)
tools:
- search_contacts
- get_account
prefix: "crm_"

(Registered tool names follow {prefix}{namespace}_{snake_case(tool_name)}: with prefix: "crm_" in tenant-acme, CrdWatcher registers crm_tenant-acme_search_contacts and crm_tenant-acme_get_account.)

Spec Fields (openAPIV3Schema)​

Required Fields​

FieldTypeEnforced Values / ConstraintsDescription
upstreamobjectRequired (upstream.url required)Connection settings for the upstream MCP server
upstream.urlstringRequiredUpstream MCP server endpoint URL

Optional Fields​

FieldTypeDefaultEnforced Values / ConstraintsDescription
upstream.transportstringsseEnum: sse, streamable-httpMCP transport protocol used to reach upstream.url
upstream.timeoutSecondsinteger30 (runtime)IntegerConnection and request timeout in seconds (unwrap_or(30) in CrdWatcher)
upstream.auth.typestring—Enum: bearer, headerDeclared in CRD schema; runtime UpstreamMcpClient currently sends Authorization: Bearer <token> whenever a Secret token is loaded
upstream.auth.secretRefstring—StringName of the Kubernetes Secret in the same namespace (CrdWatcher reads key token by default)
upstream.auth.headerNamestring—StringDeclared in CRD schema for type: header, not read by UpstreamMcpClient on main
toolsstring[][]Array of stringsAllowlist of upstream tool names to expose (empty array [] exposes all discovered tools)
prefixstring""StringPrefix prepended before {namespace}_{snake_case(tool_name)} (e.g., crm_tenant-acme_search_contacts)

Status Subresource (status)​

The CRD defines .status fields (connected, toolCount, discoveredTools, lastSync, error) and printer columns (Upstream, Tools, Connected). On main, CrdWatcher registers federated tools in memory without patching .status back to the Kubernetes API server:

FieldTypeDescription
connectedbooleanSchema field for upstream connectivity (not patched by CrdWatcher on main)
toolCountintegerSchema field for registered tool count (not patched by CrdWatcher on main)
discoveredToolsstring[]Schema field for registered tool names
lastSyncstringSchema field for last discovery sync timestamp
errorstringSchema field for upstream connection or discovery error

Cookies and privacy

With your permission, we use cookies to measure visits and understand navigation to improve the site.

Learn more

Google Analytics measures visits and useful clicks. Microsoft Clarity provides masked interaction replays. No advertising use. Your choice is saved for six months. You can change or withdraw it at any time using the “Cookies” button.

Read the audience measurement details