Skip to content

fix(ui): validate MCP server transport url and support oci packages#406

Open
lleon-at-navteca wants to merge 1 commit intoagentregistry-dev:mainfrom
Navteca:feature/ui-add-server-transport-validation
Open

fix(ui): validate MCP server transport url and support oci packages#406
lleon-at-navteca wants to merge 1 commit intoagentregistry-dev:mainfrom
Navteca:feature/ui-add-server-transport-validation

Conversation

@lleon-at-navteca
Copy link

Description

Motivation:

The Add Server UI allowed creating invalid payloads for MCP servers using streamable-http or sse transports, which caused backend validation errors on publish. It also defaulted package registryType to npm, which does not match the containerized MCP server flow.

Resolves #405

What changed:

  • Added package transport URL support in the Add Server dialog.
  • Added client-side validation:
    • package transport URL is required for streamable-http and sse.
    • remote URL is required for streamable-http and sse.
  • Changed default package registryType from npm to oci.
  • Added oci option to the package registry type selector.
  • Switched $schema default to the canonical schema URL.
  • Replaced free-text remote type input with a constrained selector (stdio, sse, streamable-http).
  • Added UI tests for:
    • oci default behavior.
    • submit blocked when package streamable-http URL is missing.
    • payload includes transport.url for streamable-http.
    • submit blocked when remote sse URL is missing.

Change Type

/kind fix

Changelog

fix(ui): validate transport URLs for streamable-http/sse and default MCP package registry type to oci in Add Server dialog

Additional Notes

  • The backend already enforces transport URL requirements; this PR aligns frontend behavior with existing server validation.
  • Tests added in ui/components/tests/add-server-dialog.test.tsx.
  • Local test run passed for the new test file.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI is allowing creating invalid payloads for MCP servers using streamable-http or sse transports

1 participant