Description
Stdio MCP subprocesses spawned by OpenWiki receive a tightly allowlisted environment (buildChildEnv in src/connectors/mcp-client.ts). The list includes USERPROFILE / HOMEPATH / HOMEDRIVE but not APPDATA or LOCALAPPDATA.
Many Windows MCP servers and Node tools expect those variables to resolve config, cache, and native dependency paths under the user profile. Without them, local MCP connectors can fail to start or misbehave only on Windows even though PATH and home vars are present.
Expected Behavior
buildChildEnv forwards APPDATA and LOCALAPPDATA when set in the parent process (same treatment as USERPROFILE), without forwarding OpenWiki provider credentials.
Actual Behavior
Those two variables are dropped from the child environment.
Proposed fix
Add APPDATA and LOCALAPPDATA to CHILD_ENV_ALLOWLIST and cover them in test/mcp-client.test.ts.
Description
Stdio MCP subprocesses spawned by OpenWiki receive a tightly allowlisted environment (
buildChildEnvinsrc/connectors/mcp-client.ts). The list includesUSERPROFILE/HOMEPATH/HOMEDRIVEbut notAPPDATAorLOCALAPPDATA.Many Windows MCP servers and Node tools expect those variables to resolve config, cache, and native dependency paths under the user profile. Without them, local MCP connectors can fail to start or misbehave only on Windows even though PATH and home vars are present.
Expected Behavior
buildChildEnvforwardsAPPDATAandLOCALAPPDATAwhen set in the parent process (same treatment asUSERPROFILE), without forwarding OpenWiki provider credentials.Actual Behavior
Those two variables are dropped from the child environment.
Proposed fix
Add
APPDATAandLOCALAPPDATAtoCHILD_ENV_ALLOWLISTand cover them intest/mcp-client.test.ts.