[stdout-intercepted] prefix leaks into normal sf CLI stdout from mcp-provider-aura-experts and mcp-provider-lwc-experts bundles
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, node.js
Research direction
Start with the bundled index.bundle.js files in mcp-provider-aura-experts and mcp-provider-lwc-experts and trace where the process.stdout.write wrapper is installed during module evaluation. Reproduce with sf plugins --core, then verify that normal CLI stdout is unchanged while the interceptor remains active for the MCP server's stdio transport.
Written by the indexing model from the issue text.
Description
Summary
After installing @salesforce/mcp , every line written to stdout by the sf CLI (for any command, not just the MCP server) is prefixed with [stdout-intercepted] . The interceptor is unconditionally installed at module load time inside the bundled mcp-provider-aura-experts and mcp-provider-lwc-experts packages, so it activates during oclif's plugin discovery for all sf invocations — even when the MCP server is not being started.
Environment
- OS: Windows 11 (PowerShell 5.1, also reproduced in
cmd.exeandpowershell -NoProfile; not VS Code-related) - Salesforce CLI:
@salesforce/cli2.128.5 - Node: bundled with sf installer (
C:\Program Files\sf\client\bin\node.exe) - Plugin:
@salesforce/mcp0.30.7 (user-installed)- Bundled:
@salesforce/mcp-provider-aura-experts0.3.7 - Bundled:
@salesforce/mcp-provider-lwc-experts0.7.0
- Bundled:
- Install location:
C:\Users\<me>\AppData\Local\sf\node_modules\@salesforce\mcp - VS Code: 1.117.0 with Salesforce Extension Pack (Salesforce CLI Integration)
Steps to reproduce
- Install the plugin:
sf plugins install @salesforce/mcp - Run any non-MCP
sfcommand, e.g.:sf plugins --core
Actual output (truncated)
AccessibilityVisionExpert: no reviewers loaded for maturity level >= GA
SLDSExpert: no reviewers loaded for maturity level >= GA
UtamExpert: no reviewers loaded for maturity level >= GA
[stdout-intercepted] @oclif/plugin-autocomplete 3.2.45 (core)
[stdout-intercepted] @oclif/plugin-commands 4.1.45 (core)
[stdout-intercepted] @oclif/plugin-help 6.2.43 (core)
...
[stdout-intercepted] @salesforce/mcp 0.30.7
[stdout-intercepted] agent 1.32.20 (core)
[stdout-intercepted] apex 3.9.20 (core)
...
Note: the *Expert: no reviewers loaded… warnings go to stderr and are not prefixed; everything written to stdout is.
Expected output
No [stdout-intercepted] prefix on stdout for normal CLI commands. The interceptor should only be active when the MCP server is actually running over stdio transport.
Root cause (verified locally)
The string stdout-intercepted appears in two bundled provider files shipped inside the plugin:
…\AppData\Local\sf\node_modules\@salesforce\mcp\node_modules\@salesforce\mcp-provider-aura-experts\index.bundle.js…\AppData\Local\sf\node_modules\@salesforce\mcp\node_modules\@salesforce\mcp-provider-lwc-experts\index.bundle.js
Verified with:
Select-String -Path "$env:LOCALAPPDATA\sf\node_modules\@salesforce\mcp\node_modules\@salesforce\mcp-provider-*-experts\index.bundle.js" -Pattern "stdout-intercepted" -SimpleMatch
Both files match. The string does not exist anywhere else in the sf install (C:\Program Files\sf\client), in %LOCALAPPDATA%\sf\node_modules outside these two bundles, in global npm, in VS Code, or in any user PowerShell profile ($PROFILE does not exist). No NODE_OPTIONS or oclif/sf env vars are set.
These bundles appear to install a process.stdout.write wrapper at module-evaluation time. Because oclif loads every plugin's manifest/module at CLI startup, the wrapper is installed for every sf invocation — not only when the MCP server is started.
Impact
- All stdout from
sfis corrupted, breaking JSON consumers, scripts that pipesf … --json, downstream tools, and CI logs. - VS Code Salesforce Extension Pack commands that shell out to
sfand parse its JSON/stdout are broken, including:- SFDX: Retrieve Source from Org / Retrieve This Source from Org
- SFDX: Deploy Source to Org / Deploy This Source to Org
- Org Browser (fails to load metadata listings)
- Workaround today is
sf plugins uninstall @salesforce/mcp, which removes MCP functionality entirely.
- Dominant language
- No language data
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from forcedotcom/mcp
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
forcedotcom/mcp#44 ·
-
investigating
Difficulty 4/5 3-5 days Newbie friendliness 35/100
forcedotcom/mcp#43 · 1 comment ·
-
investigating
Difficulty 4/5 3-5 days Newbie friendliness 38/100
forcedotcom/mcp#42 · 1 comment ·
-
investigating
Difficulty 3/5 1-2 days Newbie friendliness 35/100
forcedotcom/mcp#35 · 2 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
forcedotcom/mcp#10 · 4 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Request]: Snow ShotOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ScoopInstaller/Extras#18870 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
foundation/inky#334 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA/nvmesh-utils#9 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day