Skip to content

Web/launcher: --header is accepted but only warns — apply it or remove it #1483

Description

@cliffhall

Carved out from the "did not solve" list of #1452 (port of CLI/TUI/launcher to v2).

Problem

The web runner (clients/web/server/run-web.ts) accepts --header "Name: Value" for HTTP/SSE transports but only prints a warning:

Warning: --header is accepted but initial HTTP headers are configured via server settings in the web UI (post-#1358).

The flag is a silent no-op — users passing headers on the command line get no effect on the seeded connection. (Related, but distinct layer: #1294, #879, #1081 cover custom-header handling in the web UI itself.)

Proposed solution

Preferred: plumb --header values into the initial server's serverSettings.headers sent to the web UI, so the seeded connection actually uses them. Alternative: if initial-header support is intentionally out of scope, remove the flag so it fails with a clear error rather than warning and ignoring.

Acceptance criteria

  • mcp-inspector --web --server-url <url> --header "Authorization: Bearer x" applies the header to the initial connection shown in the UI or the flag is removed and errors clearly.
  • No silent no-op path remains.
  • Test coverage for the chosen behavior (header plumbing or rejection).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions