Skip to content

Document vMCP embedded authorization server and upstream token injection #642

@jhrozek

Description

@jhrozek

Summary

Document the new vMCP embedded authorization server and upstream token injection features introduced by the following RFCs:

  • RFC-0052: Multi-upstream IDP support in the embedded auth server
  • RFC-0053: Embedded auth server in vMCP
  • RFC-0054: upstream_inject outgoing auth strategy

What needs documenting

Three interlocking capabilities that enable vMCP to authenticate users through multiple upstream identity providers and inject their tokens into backend requests:

  1. Embedded authorization server on VirtualMCPServerauthServerConfig inline field that runs an OAuth authorization server within the vMCP process, supporting multiple upstream providers with sequential authorization chaining and DCR.

  2. upstream_inject outgoing auth strategy — New MCPExternalAuthConfig type (upstreamInject) that injects stored upstream provider tokens into outgoing backend requests.

  3. subjectProviderName on token exchange — New field on tokenExchange configs that selects which upstream provider's token to use as the subject token for RFC 8693 exchange, enabling hybrid deployments where some backends use direct injection and others use exchanged tokens.

Documentation plan

New content

  • docs/toolhive/guides-vmcp/authentication.mdx — Extend with:
    • "Upstream token injection" section (MCPExternalAuthConfig with upstreamInject type)
    • "Token exchange with upstream tokens" section (subjectProviderName)
    • "Embedded authorization server" section (how it works, differences from MCPServer, config, incoming auth wiring, session storage, complete example)

Updates to existing content

  • docs/toolhive/concepts/vmcp.mdx — Mention embedded auth server capability under "Authentication boundary separation"; fix "four key benefits" → "five"
  • docs/toolhive/concepts/backend-auth.mdx — Update "single upstream provider" claim to clarify it's MCPServer-only; remove outdated "chained authentication not yet supported" admonition; add cross-reference to vMCP guide
  • docs/toolhive/guides-k8s/auth-k8s.mdx — Add cross-reference to vMCP embedded auth server in related information

Out of scope

  • CRD reference (reference/crd-spec.md) — auto-generated, will update when CRDs are regenerated
  • Partials refactoring to deduplicate shared content between K8s and vMCP auth guides (separate task)

Implementation status

Documentation should land after all PRs are merged.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions