Skip to content

Remove mcpServer feature flag#139

Merged
mgoldsborough merged 2 commits intomainfrom
remove-mcpserver-flag
Apr 29, 2026
Merged

Remove mcpServer feature flag#139
mgoldsborough merged 2 commits intomainfrom
remove-mcpserver-flag

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

@mgoldsborough mgoldsborough commented Apr 29, 2026

Summary

  • The /mcp endpoint is the only transport the bundled web UI uses to drive the platform (see web/src/mcp-bridge-client.ts:97 and web/src/bridge/bridge.ts). Disabling it via features.mcpServer broke the SPA outright, so the flag had no defensible "off" state — just a footgun for new tenants whose chart default landed as false.
  • Drops the field from FeatureFlags type, DEFAULTS / resolveFeatures, the JSON schema, the gate at src/api/routes/mcp.ts:80-82, the README, and the unit tests that referenced it.
  • Auth is still gated by the existing requireMcpAuth middleware, OAuth WWW-Authenticate discovery, and per-workspace authorization downstream — only the kill-switch goes away.

Backwards compatibility

Stale tenant configs that still set features.mcpServer will trigger the existing "unknown key" warning at runtime startup but otherwise have no effect.

Land order

This must merge first:

  1. This PR — runtime stops gating on the flag.
  2. NimbleBrainInc/infra#6 — chart drops the field from values + ConfigMap template.
  3. NimbleBrainInc/deployments#9 — drops the per-tenant overrides on hq, bayze + fixes CLAUDE.md (ipsdi.yaml does not appear in that diff because the override was applied live as a hot fix and never landed on main).

Reversing the order would leave a window where the runtime still gates but no value is being set, which would 404 every UI request.

Test plan

  • bun test over the touched unit files (features.test.ts, features-identity.test.ts, mcp-oauth.test.ts, audit-events.test.ts, system-tools.test.ts, cli.test.ts) — 105 pass
  • bun run verify:static — passes (one pre-existing unrelated lint warning in url-validator.ts)
  • CI green
  • After merge: redeploy ipsdi/hq/bayze and verify /data/nimblebrain.json no longer contains mcpServer (post-chart-PR) and the web UI continues to load

The /mcp endpoint is the only transport the bundled web UI uses to drive
the platform (see web/src/mcp-bridge-client.ts and web/src/bridge/bridge.ts).
Disabling it via features.mcpServer broke the SPA — it was never a
defensible toggle, just a footgun for new tenants whose chart default
landed as false.

Drop the flag from the type, schema, runtime defaults, the routes/mcp.ts
gate, README, and tests. The /mcp endpoint is now always served; access
is still controlled by the existing auth middleware, OAuth discovery via
WWW-Authenticate, and per-workspace authorization downstream.

Backwards compat: stale tenant configs that still set features.mcpServer
will trigger the existing "unknown key" warning at startup but otherwise
have no effect.
@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Apr 29, 2026
@mgoldsborough mgoldsborough merged commit c4351b2 into main Apr 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant