Fail fast when required MCP servers are omitted#52854
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR TriageCategory: bug | Risk: medium | Score: 64/100
Recommended action:
|
PR Triage
Fixes silent MCP server omission causing downstream tool-discovery failures. CI unstable — verify before merge. Automated triage — see [PR Triage Report] for full context.
|
There was a problem hiding this comment.
Pull request overview
Adds startup validation to fail fast when required MCP servers are omitted from gateway output.
Changes:
- Detects omitted required servers and missing environment variables.
- Preserves optional-server behavior.
- Adds focused validation and formatting tests.
Show a summary per file
| File | Description |
|---|---|
actions/setup/js/start_mcp_gateway.cjs |
Adds omission detection, diagnostics, and startup failure handling. |
actions/setup/js/start_mcp_gateway.test.cjs |
Tests required/optional detection and error formatting. |
Review details
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
| for (const match of matches) { | ||
| const varName = match[1]; | ||
| const envValue = env[varName]; | ||
| if (envValue == null || envValue.trim() === "") { | ||
| missing.add(varName); |
Missing MCP secrets could cause Sentry/Grafana servers to disappear from the gateway output, leaving workflows to fail later after the agent discovered unavailable tools. This makes required MCP omission an explicit startup failure.
Startup validation
mcpServerswith gateway output before agent config conversion.required: falsebest-effort server behavior.Coverage
Example failure shape: