Repository navigation
Description
As a platform engineer managing remote MCP server backends,
I want a lightweight MCPServerEntry CRD that declares remote MCP endpoints without deploying infrastructure,
so that VirtualMCPServer can discover and route to remote backends via groupRef without unnecessary proxy pods.
Size: L
Dependencies: None
Labels: operator, api, kubernetes
RFC: RFC-0055
Context
VirtualMCPServer currently requires MCPRemoteProxy (which spawns thv-proxyrunner pods) to reach remote MCP servers. This forces OIDC auth on public remotes, creates dual auth boundary confusion, and wastes resources deploying pods just to make HTTP calls.
RFC-0055 introduces MCPServerEntry as a zero-infrastructure catalog entry — pure configuration telling vMCP where a remote server exists and how to authenticate to it. MCPServerEntry is an intermediate step that will eventually be superseded by MCPRemoteEndpoint (RFC-0057, #4254).
This story covers the CRD types, validation-only controller, and MCPGroup integration.
Scope
CRD Types (cmd/thv-operator/api/v1alpha1/mcpserverentry_types.go)
MCPServerEntrySpecwith fields:remoteURL(string, required) — HTTPS enforced by default, annotation override for developmenttransport(enum:streamable-http|sse, required)groupRef(string, required — unlike MCPServer where it's optional)externalAuthConfigRef(*ExternalAuthConfigRef, optional) — reuse existing typeheaderForward(*HeaderForwardConfig, optional) — reuse existing type from MCPRemoteProxycaBundleRef(*CABundleSource, optional) — reuse existingCABundleSourcewithConfigMapKeyRef
MCPServerEntryStatuswith:Phase(Pending/Ready/Failed)Conditions(Ready, GroupRefValid, AuthConfigValid, CABundleValid)ObservedGeneration
- CEL validation rules:
- HTTPS enforcement on
remoteURL(with annotationtoolhive.stacklok.dev/allow-insecure-urloverride) - Transport enum constraint
- Required
groupRef
- HTTPS enforcement on
- Printer columns: Phase, Transport, Remote URL, Group, Age
- Short name:
mse - Categories:
toolhive
Validation Controller (cmd/thv-operator/controllers/mcpserverentry_controller.go)
- Validation-only — no infrastructure created (no Deployment, Service, or Pod)
- No network probing — controller validates configuration references only; runtime health checking belongs in vMCP
- Validates:
- Referenced MCPGroup exists →
GroupRefValidcondition - Referenced MCPExternalAuthConfig exists (when set) →
AuthConfigValidcondition - Referenced CA bundle ConfigMap exists (when set) →
CABundleValidcondition
- Referenced MCPGroup exists →
- Sets
Readycondition based on all validations passing - Follows existing patterns: StatusManager, ObservedGeneration, metav1.Condition
MCPGroup Integration (cmd/thv-operator/controllers/mcpgroup_controller.go)
- Add watch for MCPServerEntry (like existing
findMCPGroupForMCPServer/findMCPGroupForMCPRemoteProxy) - Add
findMCPGroupForMCPServerEntrymapper function - Update
updateGroupMemberStatus()to list MCPServerEntry resources by groupRef - Add
EntriesandEntryCountfields toMCPGroupStatus - Update MCPGroup status condition to include entry validation
Helm & RBAC
- CRD manifest in
deploy/charts/operator-crds/files/crds/ - RBAC rules in
deploy/charts/operator/templates/clusterrole/role.yamlformcpserverentriesresource +listType=mapand+listMapKey=typeon Conditions field
Acceptance Criteria
-
MCPServerEntryCRD types defined with all spec fields - CEL validation enforces HTTPS, transport enum, required groupRef
- Status conditions: Ready, GroupRefValid, AuthConfigValid, CABundleValid
- Validation controller validates all referenced resources exist
- Controller creates no infrastructure (zero pods, services, deployments)
- Controller never probes remote URL (no network calls)
- MCPGroup controller watches MCPServerEntry and tracks in status
-
MCPGroupStatusincludesEntriesandEntryCountfields - Printer columns: Phase, Transport, Remote URL, Group, Age
- Short name
mseand categoriestoolhive - CRD manifest included in
operator-crdsHelm chart - RBAC rules added for
mcpserverentriesresource - Unit tests cover type validation, controller reconciliation, and MCPGroup integration
- Integration tests in
cmd/thv-operator/test-integration/cover reference lifecycle - All tests pass (
task test)
Activity
[-]MCPServerEntry CRD — Types, Validation Controller, and MCPGroup Integration[/-][+]RFC-55: MCPServerEntry CRD — Types, Validation Controller, and MCPGroup Integration[/+]Add MCPServerEntry CRD types and MCPGroup status fields
Add MCPServerEntry validation controller and MCPGroup integration
Add MCPServerEntry CRD types and MCPGroup status fields
Add MCPServerEntry CRD types and MCPGroup status fields (#4662)
Add MCPServerEntry validation controller and MCPGroup integration
Add MCPServerEntry validation controller and MCPGroup integration
Add MCPServerEntry validation controller and MCPGroup integration (#4664
JAORMX commentedon Apr 9, 2026
This has been implemented across two PRs:
All core acceptance criteria are met: CRD types with full spec, validation controller that checks GroupRef/AuthConfig/CABundle references without creating infrastructure or probing URLs, MCPGroup watches and tracks entries, printer columns, RBAC, Helm chart CRD, and unit tests covering controller reconciliation and MCPGroup integration.
A few minor deviations from the original spec worth noting:
mcpentryrather thanmse(deliberate choice during implementation)^https?://rather than HTTPS-only (documented as intentional in the type comments)test-integration/mcp-server-entry/were not created, though the unit tests provide thorough coverage of all controller pathsClosing as completed.