You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
authserver: support a single shared authorization-server / callback host across multiple workloads (per-host IdP redirect registration doesn't scale in change-controlled orgs) #5807
Each ToolHive workload that runs the embedded auth server (vMCP or MCPRemoteProxy with MCPOIDCConfig) acts as its own OAuth issuer on its own hostname. That means every workload needs its own redirect/callback URI registered at the upstream IdP.
In enterprises where the IdP is change-controlled (our case: Okta, managed by a separate security team, no wildcard redirect URIs allowed), this makes the cost of adding an MCP server O(n) security-team requests — one per hostname, each taking days. In practice this — not gateway capability — is the bottleneck that caps how many per-user OAuth-backed MCP servers we can operate. We currently run the interim "one subdomain per OAuth backend" pattern (pending #5383), so every new backend pays this tax.
Proposal
A deployment-level option for a single shared authorization-server host (e.g. auth.mcp.example.com) serving all workloads in a namespace/group, with per-workload routing on the callback path (e.g. /callback/<workload>) or via state. Workloads would advertise the shared issuer in their protected-resource metadata; RFC 8707 resource indicators already distinguish the target resource. The result: one IdP redirect-URI registration, ever, regardless of how many MCP workloads exist.
Orthogonal and complementary. #5383 (linked-account model / unified per-user endpoint) removes the need for per-backend hostnames; this issue removes the per-hostname IdP registration cost. Even with #5383 shipped, orgs running several vMCPs/groups would still benefit; without #5383, this is the difference between "adding backend N is a Helm values entry" and "adding backend N is a change ticket."
What we'd accept / alternatives considered
A shared MCPAuthServer-style CRD that multiple MCPOIDCConfigs reference, or
a config knob on the operator making all embedded AS instances share one external issuer host behind one Service/HTTPRoute, or
documented support for fronting the per-workload AS endpoints behind one host + path-routing (if the AS state/JWKS handling already tolerates this, docs may be all that's needed).
We run ToolHive in production-shaped sandbox (operator v0.35.0, GKE) and are happy to contribute the implementation if maintainers agree on a direction — same offer as on #5383.
Thanks for the detailed writeup, and for cross-linking #5383, that context helps a lot.
I think the relationship between the two issues is closer than "orthogonal and complementary." Look at how #5383's standalone workaround is described: for a backend whose upstream only accepts a user-owned OAuth token and doesn't support token exchange (RFC 8693) from the corporate IdP, the only supported pattern today is to peel it off into its own standalone MCPRemoteProxy with its own embedded AS federating to that one upstream. That's exactly the pattern that produces the O(n) hostname/IdP-registration cost described here. The "one subdomain per OAuth backend" workaround you mention isn't an unrelated coincidence, it's the workaround #5383 documents, and it's the direct cause of this issue.
You've actually already made this case yourself. In your reply to jerm-dro on #5383, you confirmed the library-level mechanism (UpstreamFilter, SingleLeg) exists but isn't reachable from the CRD/operator surface, and asked whether a declarative per-backend UpstreamFilter/SingleLeg trigger is planned. If that ships, several OAuth-only backends fronted by one vmcp collapse to one embedded AS, one issuer, one redirect URI, and this issue's O(n) hostname problem disappears for that case without any host-sharing infrastructure at all.
Given you're the one holding both threads, would it make sense to close this one and keep the discussion on #5383? The shared-host idea might still be worth a smaller follow-up later, for teams running genuinely separate vmcp deployments (different groups, clusters, or tenants), but that's a narrower case than what your writeup here describes. Consolidating the two threads seems more useful than tracking the same underlying question in two places.
Fair point — I've come around to your framing. The O(n) registration cost is downstream of #5383's standalone-proxy workaround, and if a declarative per-backend UpstreamFilter/SingleLeg trigger ships, the consolidated-vMCP case collapses to one issuer and one redirect URI, which is most of what this issue asked for.
The load-bearing question is the one from my earlier comment on feat(vmcp): composing per-user federated-IdP backends behind vmcp — linked-account model or per-backend IncomingAuth overrides #5383: is a supported declarative UpstreamFilter/SingleLeg surface planned, or would a design proposal + PR be welcome? The offer to contribute stands — we run the operator in a production-shaped environment and can bring the per-user GitHub chaining setup as a test case. If maintainers can sketch the preferred CRD shape (or say "propose one"), we'll pick it up.
Closing this in favor of #5383 once you confirm the consolidation makes sense on your side.
@onepabz agreed the two are tightly related, and thanks for the offer to contribute.
Good news on the part this issue is really about. We intend to upstream the standalone, centralized auth server into OSS. Concretely that means shipping the auth server as its own deployable component that you run and wire up yourself, so a group of workloads can share one issuer host and one IdP redirect-URI registration instead of paying the per-hostname cost. That directly addresses the O(n) problem you described. We need those changes for our own architecture anyway, so upstreaming them is the natural path.
Let's keep this issue open as the tracking issue for that work. Your offer to contribute is welcome here. Before you build, let's align on the shape (the shared MCPAuthServer-style CRD vs. the operator config knob you sketched) so it lands in a direction we can maintain long term.
One boundary to be clear about. The per-user, per-backend connector enablement in #5383 (the declarative UpstreamFilter/SingleLeg surface) is an Enterprise capability via Connector Gateway and stays there, so that part won't converge into OSS core. I've replied on #5383 with the detail.
Activity
aponcedeleonch commentedon Jul 15, 2026
Thanks for the detailed writeup, and for cross-linking #5383, that context helps a lot.
I think the relationship between the two issues is closer than "orthogonal and complementary." Look at how #5383's standalone workaround is described: for a backend whose upstream only accepts a user-owned OAuth token and doesn't support token exchange (RFC 8693) from the corporate IdP, the only supported pattern today is to peel it off into its own standalone
MCPRemoteProxywith its own embedded AS federating to that one upstream. That's exactly the pattern that produces the O(n) hostname/IdP-registration cost described here. The "one subdomain per OAuth backend" workaround you mention isn't an unrelated coincidence, it's the workaround #5383 documents, and it's the direct cause of this issue.You've actually already made this case yourself. In your reply to jerm-dro on #5383, you confirmed the library-level mechanism (
UpstreamFilter,SingleLeg) exists but isn't reachable from the CRD/operator surface, and asked whether a declarative per-backendUpstreamFilter/SingleLegtrigger is planned. If that ships, several OAuth-only backends fronted by one vmcp collapse to one embedded AS, one issuer, one redirect URI, and this issue's O(n) hostname problem disappears for that case without any host-sharing infrastructure at all.Given you're the one holding both threads, would it make sense to close this one and keep the discussion on #5383? The shared-host idea might still be worth a smaller follow-up later, for teams running genuinely separate vmcp deployments (different groups, clusters, or tenants), but that's a narrower case than what your writeup here describes. Consolidating the two threads seems more useful than tracking the same underlying question in two places.
onepabz commentedon Jul 15, 2026
Fair point — I've come around to your framing. The O(n) registration cost is downstream of #5383's standalone-proxy workaround, and if a declarative per-backend
UpstreamFilter/SingleLegtrigger ships, the consolidated-vMCP case collapses to one issuer and one redirect URI, which is most of what this issue asked for.Two things before I close it:
UpstreamFilter/SingleLegsurface planned, or would a design proposal + PR be welcome? The offer to contribute stands — we run the operator in a production-shaped environment and can bring the per-user GitHub chaining setup as a test case. If maintainers can sketch the preferred CRD shape (or say "propose one"), we'll pick it up.Closing this in favor of #5383 once you confirm the consolidation makes sense on your side.
aponcedeleonch commentedon Jul 17, 2026
@onepabz agreed the two are tightly related, and thanks for the offer to contribute.
Good news on the part this issue is really about. We intend to upstream the standalone, centralized auth server into OSS. Concretely that means shipping the auth server as its own deployable component that you run and wire up yourself, so a group of workloads can share one issuer host and one IdP redirect-URI registration instead of paying the per-hostname cost. That directly addresses the O(n) problem you described. We need those changes for our own architecture anyway, so upstreaming them is the natural path.
Let's keep this issue open as the tracking issue for that work. Your offer to contribute is welcome here. Before you build, let's align on the shape (the shared MCPAuthServer-style CRD vs. the operator config knob you sketched) so it lands in a direction we can maintain long term.
One boundary to be clear about. The per-user, per-backend connector enablement in #5383 (the declarative UpstreamFilter/SingleLeg surface) is an Enterprise capability via Connector Gateway and stays there, so that part won't converge into OSS core. I've replied on #5383 with the detail.