Skip to content

binding-mcp-openapi: add kind: proxy variant with operator-declared exit #2237

Description

@jfallows

Summary

mcp_openapi currently only supports kind: client: the generated mcp_http0 route's exit is always sourced from the JVM-wide zilla.binding.mcp.openapi.http.client.exit Configuration property (default sys:http_client), never overridable per binding instance. Add a kind: proxy variant that instead lets the operator declare exit directly on the binding, so the generated composite can terminate at an operator-provided binding instead of the configured default.

Motivation

#2104 added exactly this for binding-mcp-schema-registry's own kind: proxy, and in the course of that work (#2231) McpOpenapiCompositeGenerator/McpOpenapiBindingConfig were changed so that McpOpenapiCompositeGenerator now prefers a binding-level exit (read off mcp_openapi0's own routes) over the httpClientExit Configuration default when stamping mcp_http0's routes. That was necessary because mcp_openapi0 is generated in-memory by schema-registry's composite generator, not authored by an end user — but the same data channel means the underlying mechanism already works for mcp_openapi itself, it's just not exposed at the schema level (kind is still restricted to ["client"], and exit isn't a validated/required option for any kind).

A follow-up fix (already merged into #2231) closed the immediate gap by adding "exit": false to mcp_openapi's kind: client schema branch, since an authored exit: would otherwise have silently taken effect. This issue is about the other half: formally supporting kind: proxy so users get this directly, without needing to go through mcp_schema_registry (or another generator) as an intermediary.

Design

  • kind: proxy requires exit (top-level or per-route, mirroring binding-tcp's kind: server pattern) instead of leaving it disallowed.
  • kind: client keeps disallowing exit, as already patched.
  • options.specs.<label>.server is untouched by this — it stays available for both kinds. Traced through McpOpenapiCompositeGenerator: options.specs.*.server (or the OpenAPI document's own servers: entry as fallback) only shapes the :scheme/:authority/base :path headers baked into each route's HttpBeginEx (withConfig() → resolveServerOverride/resolveServerFromSpec); exit only controls which binding receives that stream (injectRoutes()). The two are orthogonal — unlike binding-mcp-schema-registry, where options.server was the only server config for a single bundled spec and became genuinely vestigial once exit took over, mcp_openapi can have multiple specs with meaningful per-spec server values (shaping headers) all routed through the same kind: proxy exit. So no change to options.specs.*.server validation is needed.
  • Mechanically, no generator changes are needed — McpOpenapiBindingConfig.exit and McpOpenapiCompositeGenerator's preference for it already exist (from binding-mcp-schema-registry: add kind: proxy variant with operator-declared exit #2231). This is purely a schema patch change (specs/binding-mcp-openapi.spec/.../mcp_openapi.schema.patch.json): widen kind to ["client", "proxy"], move exit: false into a client-only branch, add a proxy branch requiring exit.

Notes

Activity

  1. added theissue type on Jul 31, 2026
  2. self-assigned this
    on Jul 31, 2026
  3. added a commit that references this issue on Jul 31, 2026
    7c30447
  4. added a commit that references this issue on Aug 4, 2026
    cb0baed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions