Skip to content

[DOCS] Operator Orchestrator MCP servers with names and headers in spec.mcp.servers #1145

Closed

Description

@edenreich

Summary

The Orchestrator's spec.mcp.servers gives its pod MCP servers by URL, each with a name and the headers it authenticates by. Source: inference-gateway/operator#321, implemented in inference-gateway/operator#324. Document it once that PR is merged and released.

What changed for users:

  • spec.mcp.servers is a list of servers with a name, a url and optional headers, the shape a Gateway's spec.mcp.servers takes. Names must be unique within the list, the API server refuses a duplicate. Plain URL strings are no longer accepted.
  • The operator writes the pod's ~/.infer/mcp.yaml whenever spec.mcp.enabled is true and a server is listed, with or without serviceDiscovery. Before, only discovery wrote it.
  • Header values are written exactly as given, so a ${VAR} stays a reference the infer CLI in the pod expands from its environment. Fill the variable from a Secret through spec.env. Never put a secret value in a header.
  • The pod needs an infer image of v0.248.0 or newer, which reads url and headers.
  • The pod rolls when the rendered mcp.yaml changes, on both the Deployment and the Sandbox runtime. Upgrading rolls the pod of every Orchestrator that already renders mcp.yaml once.

Example to add:

apiVersion: core.inference-gateway.com/v1alpha1
kind: Orchestrator
metadata:
  name: orchestrator
  namespace: orchestrator
spec:
  image: ghcr.io/inference-gateway/cli:latest
  env:
    - name: MCP_EXAMPLE_API_KEY
      valueFrom:
        secretKeyRef:
          name: mcp-example-credentials
          key: MCP_EXAMPLE_API_KEY
  mcp:
    enabled: true
    servers:
      - name: example
        url: https://mcp.example.com/mcp
        headers:
          x-api-key: ${MCP_EXAMPLE_API_KEY}

Affected pages

  • operator.md, Orchestrator spec table: the mcp.servers[] row becomes name, url and headers entries written as given, like the Gateway's row. The mcp.serviceDiscovery row says the pod's mcp.yaml is written whenever MCP is enabled and a server is listed, not only with discovery.
  • operator.md, Orchestrator: a short section with the example above, the ${VAR} rule, the Secret through spec.env, and the infer v0.248.0 requirement.
  • operator.md, upgrade notes or the release section: plain URL strings in spec.mcp.servers are refused, and the one-time pod roll.

Acceptance Criteria

  • operator.md documents the Orchestrator's spec.mcp.servers entries with their fields and the unique names.
  • It states that header values are written as given, and shows the variable coming from a Secret through spec.env.
  • It states that mcp.yaml is rendered without discovery once a server is listed.
  • It notes that plain URL strings are refused and the one-time pod roll on upgrade.
  • The example uses a placeholder server, not a real third-party one.

Activity

  1. added
    documentation
    on Nov 8, 2026
  2. added theissue type on Nov 8, 2026
  3. edenreich commented on Nov 8, 2026

    @edenreich
    ContributorAuthor

    @claude can you document this? use /ponytail:ponytail check for all the relevant code first before documenting.

  4. inference-gateway-maintainer commented on Nov 8, 2026

    @inference-gateway-maintainer
    Contributor

    Claude finished @edenreich's task in 2m 38s —— View job • docs/issue-1145-20261108-2052 • [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1145-20261108-2052?quick_pull=1&title=Issue%20%231145%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231145%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)


    Documented spec.mcp.hostedServers

    • Check the operator code for the actual API and render behavior
    • Read operator.md Orchestrator sections
    • Write the docs
    • Validate (lint:md, format:check, build - all pass)
    • Commit and open the PR

    PR: #1147

    What I read first

    The upstream change is still an open PR (inference-gateway/operator#324, branch feat/orchestrator-hosted-mcp-servers), so nothing is on operator's main yet. I read its diff directly - api/v1alpha1/orchestrator_types.go (OrchestratorHostedMCPServer: name with MinLength=1, url with MinLength=1, optional headers, the list declared +listType=map +listMapKey=name which is where the duplicate-name rejection comes from) and internal/controller/orchestrator_controller.go (rendersMCPs = Enabled && (discovery || len(servers)>0 || len(hostedServers)>0), buildMCPsYAML ordering static then hosted in spec order then discovered sorted by name, and mcpYAMLServer carrying url + headers beside scheme/host/port/path). Every claim in the docs traces to one of those.

    Changes in operator.md

    • Orchestrator spec table: a mcp.hostedServers[] row, and the mcp.servers[] / mcp.serviceDiscovery rows reworded so mcp.yaml is written whenever MCP is enabled and a static or hosted server is listed, not only with discovery.
    • A new #### Hosted MCP servers section with the placeholder example, the ${VAR} rule, the Secret through spec.env, the infer v0.248.0 requirement for url/headers, and the name namespacing the server's tools.
    • The one-time pod roll on upgrade is in that same section rather than its own heading - operator.md has no upgrade-notes or release section to hang it off, and inventing one for a single sentence seemed worse than keeping it next to the behavior it follows from.

    What I skipped

    I did not add a second example or document the static-vs-hosted choice as its own subsection - the spec table rows cover it. I also did not touch cli.md, since the CLI side of url/headers is the operator's output format, not a user-facing CLI feature.

    Risk: the upstream PR is unmerged, so if its API changes before it lands (field names, the unique-name validation, the v0.248.0 floor) this page drifts. Worth re-checking the merged diff before merging #1147.
    | Branch

  5. moved this from Todo to In progress in 2026on Nov 8, 2026
  6. moved this from In progress to QA in 2026on Nov 8, 2026
  7. changed the title [-][DOCS] Operator Orchestrator hosted MCP servers with spec.mcp.hostedServers[/-] [+][DOCS] Operator Orchestrator MCP servers with names and headers in spec.mcp.servers[/+] on Nov 8, 2026
  8. moved this from QA to Done in 2026on Nov 8, 2026
  9. inference-gateway-releaser commented on Nov 10, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.9.25 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationreleased

    Type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions