Remove mcpServer feature flag#139
Merged
mgoldsborough merged 2 commits intomainfrom Apr 29, 2026
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/mcpendpoint is the only transport the bundled web UI uses to drive the platform (seeweb/src/mcp-bridge-client.ts:97andweb/src/bridge/bridge.ts). Disabling it viafeatures.mcpServerbroke the SPA outright, so the flag had no defensible "off" state — just a footgun for new tenants whose chart default landed asfalse.FeatureFlagstype,DEFAULTS/resolveFeatures, the JSON schema, the gate atsrc/api/routes/mcp.ts:80-82, the README, and the unit tests that referenced it.requireMcpAuthmiddleware, OAuthWWW-Authenticatediscovery, and per-workspace authorization downstream — only the kill-switch goes away.Backwards compatibility
Stale tenant configs that still set
features.mcpServerwill trigger the existing "unknown key" warning at runtime startup but otherwise have no effect.Land order
This must merge first:
NimbleBrainInc/infra#6— chart drops the field from values + ConfigMap template.NimbleBrainInc/deployments#9— drops the per-tenant overrides onhq,bayze+ fixesCLAUDE.md(ipsdi.yamldoes not appear in that diff because the override was applied live as a hot fix and never landed onmain).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 testover 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 passbun run verify:static— passes (one pre-existing unrelated lint warning inurl-validator.ts)/data/nimblebrain.jsonno longer containsmcpServer(post-chart-PR) and the web UI continues to load