Skip to content

Commit c1de0d0

Browse files
authored
fix(tray): stop the permanent red badge, and shrink it to a corner dot (#1075)
* fix(tray): stop the permanent red badge, and shrink it to a corner dot The v0.61.0 tray badge (#1055) sat red indefinitely on an install whose only error-severity diagnostics belonged to quarantined servers, and it was drawn as a full-size glyph beside the icon rather than a badge on it. Tray badge — quarantined servers no longer tint it worstDiagnosticSeverity and diagnosticCount excluded OAuth login-required servers but not quarantined ones. mcpproxy still attempts a connection to a quarantined server so the scanner can export its tool definitions, and the failed attempt leaves an error-severity diagnostic behind — while the same payload reports health.level "healthy" / admin_state "quarantined". The menu header drew a calm yellow dot from serversNeedingAttention under a red menu-bar dot from worstDiagnosticSeverity, and the user could not clear it without approving or disabling the server. Both properties now share one ServerStatus.isBadgeExempt predicate so they cannot drift apart, and any future intentional non-connected state has one place to be added. Tray badge — drawn as a corner dot, not a glyph beside the icon The severity badge was a full-size "●" plus a leading space in the button's attributed title, which widened the status item by about a character and read as a second icon. It is now a 6pt dot in the icon's bottom-right corner, as a subview: the status-item image must stay isTemplate to track the light/dark menu bar and to invert while the menu is open, and template rendering forces every pixel monochrome, so a coloured dot composited into the image comes back black. The view is hit-test transparent and ignored by accessibility, since the button already publishes the whole state as its label. ⏹ (core stopped) and ⚠ (core error) keep their full-size glyphs: those mean "nothing is working", which is worth the width and would be lost if collapsed into the same dot. Diagnostics — two of mcpproxy's own messages no longer say "file a bug" `command "npx" has no args` (emitted by our own pre-spawn validation in connection_stdio.go) and the legacy-SSE `4xx for initialize POST` both fell through to MCPX_UNKNOWN_UNCLASSIFIED, whose catalog entry offers a "Report a bug" button. They now classify as MCPX_CONFIG_INVALID_COMMAND and MCPX_HTTP_LEGACY_SSE, with catalog entries and docs pages. The legacy-SSE rule is matched before the generic HTTP status-text fallback, which would otherwise claim it as a bare 403/404 and send the user hunting for a credential problem that does not exist. Logging — one ListTools failure was three ERROR lines core.Client, managed.Client and Manager.discoverTools each logged the same failed list operation at ERROR. On an install with several stdio servers the periodic sweep hit this roughly once a minute per server, indefinitely. The two inner layers drop to Debug; the manager keeps the line at Warn, since it deliberately skips markSwept so the next sweep retries — a failure the code already plans to retry is not an error. Tests - Swift: quarantine/OAuth badge exemption from live /api/v1/servers payload shapes, including that a genuinely broken server still tints red and that the spoken count agrees with the badge. - Swift: corner-dot geometry and colour asserted by rendering the view offscreen and reading pixels back — the status item cannot be screenshotted without a Screen Recording grant, and "it looked right once" is not a regression test. - Go: both new codes classify from the verbatim v0.61.0 error strings, ordinary HTTP statuses are unaffected, and both codes are registered. - Go: one ListTools failure is reported by exactly one layer, not at ERROR, and is still reported at all. * fix(tray): anchor the badge dot to the icon, not the button Cross-model review (opencode, gpt-5.6-sol) caught a real defect in the corner-dot badge: it was a 6x6 subview positioned from `button.bounds` at update time and pinned with `[.minXMargin, .maxYMargin]`. That anchors to the BUTTON's bottom-right, but the dot belongs to the CENTRED 18pt icon, and it broke in two independent ways. * Rate mismatch. When the status button shrinks by N, a right-pinned subview moves left by N while the centred icon's right edge moves left by only N/2 — the badge slides off the glyph it is badging. * Stale bounds. NSStatusItem is variableLength and resizes asynchronously, so the `button.bounds` read immediately after clearing `attributedTitle` (which updateStatusIcon does, in the same pass) is still the old, wider value. The dot is then laid out against an icon centre that no longer exists. The overlay now fills the button, autoresizes with `[.width, .height]`, and computes the dot inside `draw(_:)` from its own live bounds. Any resize simply repaints in the right place, which removes both failure modes rather than patching either. `hitTest` already returned nil, which is what keeps the now-full-size overlay from swallowing every click. Note `needsDisplayOnBoundsChange` is a CALayer property and does not exist on NSView — the review suggested it and it does not compile. `setFrameSize` is overridden instead. Tests The drawing tests now RENDER the view and scan the bitmap for the pixels it actually painted, converting device pixels to points, rather than sampling one computed point. The earlier version guessed the bitmap's y-flip, read a transparent pixel, and would have reported "the view drew nothing" as a colour failure. Scanning asserts position, colour and restraint together and survives a geometry retune. Added: - the dot tracks the icon across button widths (the regression above) - a resize re-renders it in its new place - only the corner dot is painted, never a wash over the whole icon * fix(tray): the status button is FLIPPED — pin it, test it, document it Multi-agent verification found what both I and the cross-model review missed, by compiling against real AppKit rather than reasoning about it: NSView().isFlipped = false NSButton().isFlipped = true NSStatusBarButton.isFlipped = true The first commit in this PR (9c740c0) therefore shipped the badge in the icon's TOP-right corner, not the bottom-right its comment and commit message both claimed. `y = 2` in a flipped button is 2pt from the TOP, and `.maxYMargin` pins to the TOP. Rendered inside a real 36x22 status button the dot landed at bitmap rows 4-15 of 44 (top-first). The second commit (5e773a9) already corrected it — but incidentally, because TrayBadgeDotView is a plain NSView and computes the dot in its own unflipped space. Nothing recorded that the design depends on that, and no test could tell the two apart: every badge test rendered the view standalone, where the flip never enters the picture. * `isFlipped` is now overridden to `false` explicitly. It is load-bearing, not incidental — overriding it to true silently moves the badge back to the top-right. * TrayBadgeDotView's and badgeDotFrame's comments described the OLD bug wrongly (they said the mask pinned bottom-right). Corrected, with the flipped-coordinate trap written down as the reason the design is shaped the way it is. * New TrayBadgeInStatusButtonTests renders the overlay inside a REAL NSStatusBarButton and asserts the dot is in the visual lower-right. Mutation-tested: flipping the overlay fails it with "badge is in the TOP half — the flipped-coordinate bug is back (rows 4...15 of 44)", matching the shipped bug's measured position exactly. Also from the sweep: * The legacy-SSE string is mcp-go's exported `transport.ErrLegacySSEServer`, NOT one of ours as the classifier comment, the test file and the PR body all claimed. Corrected, `errors.Is` added as the primary check (the substring fallback stays, since the upstream layer stringifies the error and breaks the errors.Is chain), and TestLegacySSESentinelStillMatches pins the vendored wording — otherwise a routine mcp-go bump silently regresses MCPX_HTTP_LEGACY_SSE to MCPX_HTTP_404 with the suite green. * `serversWithDiagnostic` was left on the narrower OAuth-only predicate when isBadgeExempt was introduced, breaking the "these filter identically" invariant at birth. Nothing consumes it today, which is precisely why the drift would have surfaced late. Aligned, and pinned by a test. * `isQuarantineReview`'s comment claimed `quarantined` and `admin_state` were two independent signals. They are not — health/calculator.go derives the second from the first. The check is kept as belt-and-braces; the claim is corrected. * Added the composition case nothing covered: servers are quarantined on add, so a newly added npx-with-no-args server is quarantined AND broken. It asks for review rather than raising a red badge — deliberate, now pinned, along with the case that it DOES alarm once released. * test(tray): skip the status-button render test when there is no window server TrayBadgeInStatusButtonTests creates a real NSStatusBar item, which is the whole point — the flipped-coordinate bug is invisible to a standalone render. But `swift test` runs on a macos-latest runner whose window-server state is not guaranteed, and there `item.button` is nil. XCTUnwrap turned that into a FAILURE, so a green local run could have gone red in CI for a reason the test cannot assert there. Throws XCTSkip instead. The assertions are about AppKit geometry inside a real button; with no button there is nothing to assert, and that is a skip, not a defect.
1 parent 0ace8e1 commit c1de0d0

21 files changed

Lines changed: 1356 additions & 41 deletions
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
id: MCPX_CONFIG_INVALID_COMMAND
3+
title: MCPX_CONFIG_INVALID_COMMAND
4+
sidebar_label: INVALID_COMMAND
5+
description: A stdio server's command and args cannot spawn anything — typically a package runner with no package to run.
6+
---
7+
8+
# `MCPX_CONFIG_INVALID_COMMAND`
9+
10+
**Severity:** error
11+
**Domain:** Config
12+
13+
## What happened
14+
15+
The server's `command` / `args` pair cannot start an MCP server. The common case
16+
is a package runner named with nothing to run:
17+
18+
```jsonc
19+
{
20+
"name": "demo-filesystem",
21+
"protocol": "stdio",
22+
"command": "npx" // ← no "args", so there is no package to execute
23+
}
24+
```
25+
26+
`npx`, `uvx`, `pipx` and `bunx` all take the package to run as their first
27+
argument. Without it they either print usage and exit or drop into an
28+
interactive prompt, and neither speaks MCP — so the connection fails on every
29+
attempt and the server stays permanently unhealthy.
30+
31+
mcpproxy detects this *before* spawning the process, which is why the failure is
32+
instant rather than a timeout.
33+
34+
## How to fix
35+
36+
### Add the package to `args`
37+
38+
```jsonc
39+
{
40+
"name": "demo-filesystem",
41+
"protocol": "stdio",
42+
"command": "npx",
43+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/serve"]
44+
}
45+
```
46+
47+
`-y` (npm) skips the install prompt, which would otherwise hang the handshake.
48+
The `uvx` equivalent needs no flag:
49+
50+
```jsonc
51+
{ "command": "uvx", "args": ["mcp-server-time"] }
52+
```
53+
54+
### Inspect what is currently configured
55+
56+
```bash
57+
mcpproxy upstream get <server> -o json
58+
```
59+
60+
### Remove the entry if it is a leftover
61+
62+
An entry that was added for a demo or a test and never completed is worth
63+
deleting rather than fixing — it keeps the tray badge red for a server nobody
64+
uses:
65+
66+
```bash
67+
mcpproxy upstream remove <server>
68+
```
69+
70+
### Apply the change
71+
72+
The config file is hot-reloaded, so saving `~/.mcpproxy/mcp_config.json` is
73+
enough. To force a retry immediately:
74+
75+
```bash
76+
mcpproxy upstream restart <server>
77+
```
78+
79+
## Related
80+
81+
- [`MCPX_STDIO_SPAWN_ENOENT`](MCPX_STDIO_SPAWN_ENOENT.md) — the command itself was not found
82+
- [`MCPX_CONFIG_PARSE_ERROR`](MCPX_CONFIG_PARSE_ERROR.md) — the config file is not valid JSON
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
id: MCPX_HTTP_LEGACY_SSE
3+
title: MCPX_HTTP_LEGACY_SSE
4+
sidebar_label: LEGACY_SSE
5+
description: The endpoint rejected the streamable-HTTP initialize POST with a 4xx — the signature of a server that only speaks the older SSE transport.
6+
---
7+
8+
# `MCPX_HTTP_LEGACY_SSE`
9+
10+
**Severity:** error
11+
**Domain:** HTTP
12+
13+
## What happened
14+
15+
mcpproxy opened the connection with a streamable-HTTP `initialize` POST and the
16+
endpoint answered with a 4xx. That combination is the signature of a server
17+
implementing only the **older SSE transport**, which expects a `GET` to open an
18+
event stream and a separate POST endpoint for messages — so it rejects the
19+
streamable-HTTP handshake outright.
20+
21+
This is a **transport mismatch, not an authentication or routing failure**. It
22+
is reported separately from `MCPX_HTTP_403` / `MCPX_HTTP_404` precisely because
23+
those send you looking for a credential or URL problem that does not exist.
24+
25+
## How to fix
26+
27+
### Set the transport explicitly
28+
29+
```jsonc
30+
{
31+
"name": "my-server",
32+
"protocol": "sse", // was "http" or "streamable-http"
33+
"url": "https://example.com/sse"
34+
}
35+
```
36+
37+
### Check the URL path
38+
39+
Legacy SSE servers usually publish the stream on a distinct path. If the
40+
endpoint documents `/sse` and the config points at `/mcp` (or the bare origin),
41+
correct the URL as well as the protocol.
42+
43+
### Let mcpproxy pick
44+
45+
Omitting `protocol`, or setting it to `auto`, makes mcpproxy negotiate — useful
46+
when the server supports both and you do not want to pin a choice:
47+
48+
```jsonc
49+
{ "name": "my-server", "protocol": "auto", "url": "https://example.com/mcp" }
50+
```
51+
52+
### Confirm the change
53+
54+
```bash
55+
mcpproxy upstream restart <server>
56+
mcpproxy upstream logs <server> --follow
57+
```
58+
59+
## Related
60+
61+
- [`MCPX_HTTP_404`](MCPX_HTTP_404.md) — the endpoint genuinely does not exist
62+
- [`MCPX_HTTP_403`](MCPX_HTTP_403.md) — the endpoint exists but refuses the caller
63+
- [`MCPX_HTTP_CONN_REFUSED`](MCPX_HTTP_CONN_REFUSED.md) — nothing is listening at all

‎docs/errors/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Run `mcpproxy doctor list-codes` for the machine-readable list.
6363
- [`MCPX_HTTP_404`](MCPX_HTTP_404.md) — Not Found
6464
- [`MCPX_HTTP_5XX`](MCPX_HTTP_5XX.md) — Server error
6565
- [`MCPX_HTTP_CONN_REFUSED`](MCPX_HTTP_CONN_REFUSED.md) — Connection refused
66+
- [`MCPX_HTTP_LEGACY_SSE`](MCPX_HTTP_LEGACY_SSE.md) — endpoint only speaks the legacy SSE transport
6667

6768
## Docker
6869

@@ -77,6 +78,7 @@ Run `mcpproxy doctor list-codes` for the machine-readable list.
7778
- [`MCPX_CONFIG_DEPRECATED_FIELD`](MCPX_CONFIG_DEPRECATED_FIELD.md) — deprecated field used
7879
- [`MCPX_CONFIG_PARSE_ERROR`](MCPX_CONFIG_PARSE_ERROR.md) — invalid JSON
7980
- [`MCPX_CONFIG_MISSING_SECRET`](MCPX_CONFIG_MISSING_SECRET.md) — secret reference unresolved
81+
- [`MCPX_CONFIG_INVALID_COMMAND`](MCPX_CONFIG_INVALID_COMMAND.md) — command has nothing to run (e.g. `npx` with no package)
8082

8183
## Quarantine
8284

‎internal/diagnostics/classifier.go‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"os/exec"
88
"strings"
99
"syscall"
10+
11+
"github.com/mark3labs/mcp-go/client/transport"
1012
)
1113

1214
// Classify maps a raw error to a stable Code. It prefers typed-error inspection
@@ -157,6 +159,13 @@ func classifyConfig(err error, _ ClassifierHints) Code {
157159
strings.Contains(msg, "secret reference") && (strings.Contains(msg, "not found") || strings.Contains(msg, "unresolved")),
158160
strings.Contains(msg, "unresolved secret"):
159161
return ConfigMissingSecret
162+
// A package-runner command with nothing to run. This is mcpproxy's OWN
163+
// pre-spawn validation message (internal/upstream/core/connection_stdio.go),
164+
// so leaving it unclassified put a "Please file a bug report" CTA on a
165+
// config typo the user can fix in one line.
166+
case strings.Contains(msg, "has no args"),
167+
strings.Contains(msg, "no args") && strings.Contains(msg, "required"):
168+
return ConfigInvalidCommand
160169
}
161170
return ""
162171
}
@@ -346,6 +355,24 @@ func classifyHTTP(err error, hints ClassifierHints) Code {
346355
return HTTPTimeout
347356
}
348357

358+
// A 4xx on the streamable-HTTP `initialize` POST is the legacy-SSE
359+
// signature, not an auth or routing failure. Matched BEFORE the generic
360+
// status-text fallback below, which would otherwise claim it as a bare
361+
// MCPX_HTTP_404/403 and send the user hunting for a credential problem that
362+
// does not exist.
363+
//
364+
// The typed check first: this error is mcp-go's exported sentinel, NOT one
365+
// of our own strings, so a library bump can reword it at any time. The
366+
// substring fallback stays because the upstream layer commonly stringifies
367+
// the error before it reaches us, which breaks the errors.Is chain.
368+
// TestLegacySSESentinelStillMatches pins the vendored wording so that bump
369+
// fails a test instead of silently regressing this code to MCPX_HTTP_404.
370+
if errors.Is(err, transport.ErrLegacySSEServer) ||
371+
strings.Contains(lmsg, "likely a legacy sse server") ||
372+
(strings.Contains(lmsg, "4xx for initialize") && strings.Contains(lmsg, "post")) {
373+
return HTTPLegacySSE
374+
}
375+
349376
// HTTP status text fallback. The upstream layer wraps non-2xx responses
350377
// as a plain string ("transport error: request failed with status 504: ...").
351378
// The typed statusError path used by DiagnoseHTTPStatus() never fires for
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
package diagnostics
2+
3+
import (
4+
"errors"
5+
"fmt"
6+
"strings"
7+
"testing"
8+
9+
"github.com/mark3labs/mcp-go/client/transport"
10+
)
11+
12+
// Both errors below reached the user as MCPX_UNKNOWN_UNCLASSIFIED, whose catalog
13+
// entry tells them to file a bug report against us — for failures that are
14+
// entirely diagnosable. The strings are copied verbatim from a live v0.61.0
15+
// install.
16+
//
17+
// Only the first is mcpproxy's own wording (internal/upstream/core/
18+
// connection_stdio.go). The second is mcp-go's exported `transport
19+
// .ErrLegacySSEServer` sentinel; see TestLegacySSESentinelStillMatches for why
20+
// that distinction needs its own guard.
21+
func TestOwnErrorMessagesDoNotClassifyAsUnknown(t *testing.T) {
22+
cases := []struct {
23+
name string
24+
err string
25+
hints ClassifierHints
26+
want Code
27+
}{
28+
{
29+
name: "package runner with no package to run",
30+
err: `failed to connect: server "demo-filesystem": command "npx" has no args — the npm package to run (e.g. ["-y", "some-mcp-server"]) is required`,
31+
hints: ClassifierHints{Transport: "stdio"},
32+
want: ConfigInvalidCommand,
33+
},
34+
{
35+
name: "uvx variant of the same validation failure",
36+
err: `server "x": command "uvx" has no args — the Python package to run is required`,
37+
hints: ClassifierHints{Transport: "stdio"},
38+
want: ConfigInvalidCommand,
39+
},
40+
{
41+
name: "streamable-HTTP handshake refused by a legacy SSE server",
42+
err: "failed to connect: MCP initialize failed during no-auth strategy: transport error: server returned 4xx for initialize POST, likely a legacy SSE server",
43+
hints: ClassifierHints{Transport: "http"},
44+
want: HTTPLegacySSE,
45+
},
46+
}
47+
48+
for _, tc := range cases {
49+
t.Run(tc.name, func(t *testing.T) {
50+
got := Classify(errors.New(tc.err), tc.hints)
51+
if got != tc.want {
52+
t.Fatalf("Classify() = %q, want %q", got, tc.want)
53+
}
54+
if got == UnknownUnclassified {
55+
t.Fatal("mcpproxy's own error message must never ask the user to file a bug")
56+
}
57+
})
58+
}
59+
}
60+
61+
// The legacy-SSE match must win over the generic HTTP status-text fallback:
62+
// reading it as a bare 403/404 sends the user hunting for a credential problem
63+
// that does not exist.
64+
func TestLegacySSEBeatsGenericStatusText(t *testing.T) {
65+
err := errors.New("transport error: request failed with status 404: server returned 4xx for initialize POST, likely a legacy SSE server")
66+
if got := Classify(err, ClassifierHints{Transport: "http"}); got != HTTPLegacySSE {
67+
t.Fatalf("Classify() = %q, want %q", got, HTTPLegacySSE)
68+
}
69+
}
70+
71+
// Every code the classifier can return must be registered, or the API emits a
72+
// diagnostic with no user message, no fix steps and no docs URL.
73+
func TestNewCodesAreRegistered(t *testing.T) {
74+
for _, c := range []Code{ConfigInvalidCommand, HTTPLegacySSE} {
75+
entry, ok := Get(c)
76+
if !ok {
77+
t.Fatalf("%s is not registered in the catalog", c)
78+
}
79+
if entry.UserMessage == "" {
80+
t.Errorf("%s has no user message", c)
81+
}
82+
if len(entry.FixSteps) == 0 {
83+
t.Errorf("%s has no fix steps", c)
84+
}
85+
for _, step := range entry.FixSteps {
86+
if step.Type == FixStepLink && step.URL == "" {
87+
t.Errorf("%s has a link fix step with no URL", c)
88+
}
89+
}
90+
}
91+
}
92+
93+
// A genuine 404 with no legacy-SSE marker must still classify as a plain 404 —
94+
// the new rule must not swallow the generic HTTP status path.
95+
func TestOrdinaryHTTPStatusesAreUnaffected(t *testing.T) {
96+
err := errors.New("transport error: request failed with status 404: not found")
97+
if got := Classify(err, ClassifierHints{Transport: "http"}); got != HTTPNotFound {
98+
t.Fatalf("Classify() = %q, want %q", got, HTTPNotFound)
99+
}
100+
}
101+
102+
// The legacy-SSE rule matches a string mcp-go owns, not one of ours. Nothing
103+
// else in this repo produces it:
104+
//
105+
// $ grep -rn "legacy SSE" --include="*.go" internal/ | grep -v _test
106+
// internal/diagnostics/classifier.go:... (the matcher itself)
107+
//
108+
// So a routine mcp-go bump that rewords the sentinel would silently regress
109+
// MCPX_HTTP_LEGACY_SSE back to MCPX_HTTP_404 with the whole suite green — the
110+
// user gets sent hunting for a credential problem again. The typed errors.Is
111+
// path in classifyHTTP survives a reword; the substring fallback (needed
112+
// because the upstream layer stringifies the error) does not. This pins it, so
113+
// the bump fails HERE with a clear reason instead of degrading in the field.
114+
func TestLegacySSESentinelStillMatches(t *testing.T) {
115+
msg := strings.ToLower(transport.ErrLegacySSEServer.Error())
116+
117+
matchesWording := strings.Contains(msg, "likely a legacy sse server") ||
118+
(strings.Contains(msg, "4xx for initialize") && strings.Contains(msg, "post"))
119+
if !matchesWording {
120+
t.Fatalf("mcp-go reworded ErrLegacySSEServer to %q — update the substring fallback "+
121+
"in classifyHTTP to match, or MCPX_HTTP_LEGACY_SSE silently degrades to MCPX_HTTP_404",
122+
transport.ErrLegacySSEServer.Error())
123+
}
124+
125+
// The typed path must work even when nothing about the wording matches.
126+
if got := Classify(fmt.Errorf("connect: %w", transport.ErrLegacySSEServer),
127+
ClassifierHints{Transport: "http"}); got != HTTPLegacySSE {
128+
t.Fatalf("wrapped sentinel classified as %q, want %q", got, HTTPLegacySSE)
129+
}
130+
}

‎internal/diagnostics/codes.go‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ const (
4848
HTTPServerErr Code = "MCPX_HTTP_5XX"
4949
HTTPConnRefuse Code = "MCPX_HTTP_CONN_REFUSED"
5050
HTTPTimeout Code = "MCPX_HTTP_TIMEOUT"
51+
// HTTPLegacySSE: the endpoint rejected the streamable-HTTP `initialize`
52+
// POST with a 4xx. That is the signature of a server that only speaks the
53+
// older SSE transport, so the fix is a transport change in config — not a
54+
// credential or reachability problem, which is why it must not fall through
55+
// to a generic MCPX_HTTP_4xx or to MCPX_UNKNOWN_UNCLASSIFIED.
56+
HTTPLegacySSE Code = "MCPX_HTTP_LEGACY_SSE"
5157
)
5258

5359
// DOCKER domain — Docker isolation subsystem failures.
@@ -74,6 +80,12 @@ const (
7480
ConfigDeprecatedField Code = "MCPX_CONFIG_DEPRECATED_FIELD"
7581
ConfigParseError Code = "MCPX_CONFIG_PARSE_ERROR"
7682
ConfigMissingSecret Code = "MCPX_CONFIG_MISSING_SECRET"
83+
// ConfigInvalidCommand: the server's stdio `command`/`args` pair cannot
84+
// spawn anything useful — e.g. a package-runner (`npx`, `uvx`) with no
85+
// package to run. mcpproxy detects this itself before spawning, so the
86+
// message is ours and the user can fix it in mcp_config.json; surfacing it
87+
// as UNKNOWN told them to file a bug against us instead.
88+
ConfigInvalidCommand Code = "MCPX_CONFIG_INVALID_COMMAND"
7789
)
7890

7991
// QUARANTINE domain — security quarantine failures.

0 commit comments

Comments
 (0)