Skip to content

feat(desktop): skip built-in MCP servers when OPENWORK_DISABLE_BUILTIN_MCP=1#1826

Open
yashranaway wants to merge 1 commit into
different-ai:devfrom
yashranaway:feat/disable-builtin-mcp-servers
Open

feat(desktop): skip built-in MCP servers when OPENWORK_DISABLE_BUILTIN_MCP=1#1826
yashranaway wants to merge 1 commit into
different-ai:devfrom
yashranaway:feat/disable-builtin-mcp-servers

Conversation

@yashranaway
Copy link
Copy Markdown
Contributor

Closes #1806

Summary

  • Add a single env-var gate OPENWORK_DISABLE_BUILTIN_MCP read via the existing envFlagEnabled helper so corporate installs that prohibit local hosting can opt out without changing source.
  • Short-circuit ensureBrowserMcpServers() before it binds the built-in browser MCP and external Chrome MCP ports. seedBrowserMcpConfig() already early-returns on a null result, so workspace-create writes no openwork-browser / chrome entries either.
  • Skip startUiControlServer() at the boot site so the UI-control bridge is not spawned and the matching openwork-ui-control.json discovery file is never written.
  • Log a clear line at each skipped spawn ([browser-mcp] Skipped (OPENWORK_DISABLE_BUILTIN_MCP=1) / [ui-control] Skipped ...) so the reporter can verify in logs as the issue suggests.

Verification

  • node --check apps/desktop/electron/main.mjs passes.
  • grep envFlagEnabled apps/desktop/electron/main.mjs confirms the new flag uses the same truthy-string parser (1 / true / yes / on) as OPENWORK_FORCE_SIGNIN.
  • Reproduction steps from the issue: launch with OPENWORK_DISABLE_BUILTIN_MCP=1 openwork, check Electron logs for both Skipped lines and confirm netstat -an | grep LISTEN | grep 6488 no longer shows the built-in browser MCP ports.

Notes

  • Out of scope: hiding the renderer-side "browser" button when the flag is set. That lives in the React tree (apps/app/src/react-app/) and is a separate surface; this PR is the main-process gate the reporter asked for. Happy to follow up with the button visibility tied to a runtime flag exposed via the desktop bridge if maintainers want.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 May 22, 2026 4:08pm

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 17, 2026

@yashranaway is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

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.

[Feature]: Disable built-in MCP servers

1 participant