@W-22065947: Allow for disabling the MCP server globally#309
Open
anyoung-tableau wants to merge 7 commits intomainfrom
Open
@W-22065947: Allow for disabling the MCP server globally#309anyoung-tableau wants to merge 7 commits intomainfrom
anyoung-tableau wants to merge 7 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a “break glass” environment-variable switch to globally disable MCP tool execution while keeping the server process up, intended for mitigating live-site incidents with a clearer client-facing failure mode.
Changes:
- Introduces
BREAK_GLASS_DISABLE_GLOBALLYconfig/env plumbing and a newServiceUnavailableError(503). - Short-circuits tool callbacks in
Server.registerTools()when the flag is enabled. - Updates tests and documentation to cover/describe the new global-disable behavior.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| types/process-env.d.ts | Adds the new env var to the typed process env surface. |
| src/config.ts | Parses BREAK_GLASS_DISABLE_GLOBALLY into config.breakGlassDisableGlobally. |
| src/config.test.ts | Adds default/true parsing tests for the new config flag. |
| src/errors/mcpToolError.ts | Adds ServiceUnavailableError (type service-unavailable, 503). |
| src/server.ts | Rejects tool calls when breakGlassDisableGlobally is enabled. |
| src/server.test.ts | Switches tests to vi.stubEnv + adds break-glass rejection test. |
| src/tools/listDatasources/listDatasources.ts | Exposes params schema via exportedForTesting for use in server test. |
| src/index.ts | Emits a stderr warning when break-glass is enabled at startup. |
| docs/docs/enterprise/tableau-server.md | Documents how to temporarily disable service via the new env var. |
| docs/docs/configuration/mcp-config/env-vars.md | Adds documentation section for BREAK_GLASS_DISABLE_GLOBALLY. |
| package.json / package-lock.json | Bumps version to 1.18.6. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stephendeoca
approved these changes
Apr 23, 2026
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.
These changes add a BREAK_GLASS_DISABLE_GLOBALLY env var that allows for disabling then MCP server globally. When
trueall tool call results will immediately return an error.The motivation here is in the event there is some significant livesite issue that warrants bringing the whole server down, we can do so while still handling requests and returning a somewhat helpful error message to clients.