fix(selfhost): opt in stdio MCP via environment - #1515
Open
ramarivera wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an explicit environment-variable opt-in for enabling stdio-based MCP transport in the self-hosted Executor configuration, keeping the default behavior disabled and documenting the operator-facing switch.
Changes:
- Gate
dangerouslyAllowStdioMCPinapps/host-selfhost/executor.config.tsbehindprocess.env.EXECUTOR_ALLOW_STDIO_MCP === "true". - Document the opt-in (and its security implications) in
apps/host-selfhost/.env.example. - Add regression tests covering absent/false/uppercase vs exact-
truebehavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/host-selfhost/src/executor-config.test.ts | Adds focused tests asserting the opt-in is exact-string true only. |
| apps/host-selfhost/executor.config.ts | Switches stdio MCP enablement from hardcoded false to an env-gated value. |
| apps/host-selfhost/.env.example | Documents the new EXECUTOR_ALLOW_STDIO_MCP opt-in and warning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+42
to
+44
| mcpHttpPlugin({ | ||
| dangerouslyAllowStdioMCP: process.env.EXECUTOR_ALLOW_STDIO_MCP === "true", | ||
| }), |
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.
Closes #1514.
What changed
dangerouslyAllowStdioMCP: falseself-host setting with an exact-trueEXECUTOR_ALLOW_STDIO_MCPgatefalse, or any other value.env.exampleThis does not change cloud behavior or the self-host default. Operators must explicitly set
EXECUTOR_ALLOW_STDIO_MCP=true, which permits configured MCP commands to execute on the host.Verification
bun run --filter @executor-js/host-selfhost test -- src/executor-config.test.ts— 3 passedbun run --filter @executor-js/host-selfhost typecheck— passed🤖 This content was generated with AI assistance using GPT-5.6 Sol and GPT-5.6 Luna.