Skip to content

fix(selfhost): opt in stdio MCP via environment - #1515

Open
ramarivera wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
ramarivera:fix/selfhost-stdio-env
Open

fix(selfhost): opt in stdio MCP via environment#1515
ramarivera wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
ramarivera:fix/selfhost-stdio-env

Conversation

@ramarivera

Copy link
Copy Markdown

Closes #1514.

What changed

  • replace the hard-coded dangerouslyAllowStdioMCP: false self-host setting with an exact-true EXECUTOR_ALLOW_STDIO_MCP gate
  • keep stdio MCP disabled when the variable is absent, false, or any other value
  • document the trusted-deployment-only opt-in in .env.example
  • add focused regression coverage for absent, false/uppercase, and exact-true values

This 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 passed
  • bun 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.

Copilot AI review requested due to automatic review settings August 1, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dangerouslyAllowStdioMCP in apps/host-selfhost/executor.config.ts behind process.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-true behavior.

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",
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow self-hosted stdio MCP transport via explicit environment opt-in

2 participants