Summary
Env vars declared in an MCPB manifest's server.mcp_config.env get recorded by Claude Desktop at install time (they show up in extensions-installations.json and in the extension's settings UI) but never make it into the spawned server process's environment.
Environment
Claude Desktop 1.26832.0, macOS 26.5.2, manifest_version: "0.3", server.type: "binary". Haven't tested the other server types.
Repro
- Package an extension with:
"server": {
"type": "binary",
"entry_point": "server/launcher",
"mcp_config": {
"command": "${__dirname}/server/launcher",
"args": ["--flag"],
"env": { "MY_TEST_ENV": "1" }
}
}
where the launcher/server branches on MY_TEST_ENV (ours registers an extra tool when it's set).
-
Install the .mcpb. Check that the value was recorded: it's visible in the installed extension's config, and extensions-installations.json has it under manifest.server.mcp_config.env.
-
Open a chat so the server spawns.
Expected
MY_TEST_ENV=1 is present in the spawned process environment.
Actual
It's absent. Checked two ways: the env-gated tool never shows up in tools/list when Desktop spawns the server, and running the exact same launcher with the same args by hand, with the var set, works immediately. So the value is recorded (it round-trips into extensions-installations.json) but doesn't reach the spawn.
Impact
mcp_config.env is the documented way to parameterize a packaged server, so anything depending on it silently misbehaves. No error is surfaced anywhere.
Workaround: we switched the launcher to read a marker file instead of env.
Summary
Env vars declared in an MCPB manifest's
server.mcp_config.envget recorded by Claude Desktop at install time (they show up inextensions-installations.jsonand in the extension's settings UI) but never make it into the spawned server process's environment.Environment
Claude Desktop 1.26832.0, macOS 26.5.2,
manifest_version: "0.3",server.type: "binary". Haven't tested the other server types.Repro
where the launcher/server branches on
MY_TEST_ENV(ours registers an extra tool when it's set).Install the .mcpb. Check that the value was recorded: it's visible in the installed extension's config, and
extensions-installations.jsonhas it undermanifest.server.mcp_config.env.Open a chat so the server spawns.
Expected
MY_TEST_ENV=1is present in the spawned process environment.Actual
It's absent. Checked two ways: the env-gated tool never shows up in
tools/listwhen Desktop spawns the server, and running the exact same launcher with the same args by hand, with the var set, works immediately. So the value is recorded (it round-trips intoextensions-installations.json) but doesn't reach the spawn.Impact
mcp_config.envis the documented way to parameterize a packaged server, so anything depending on it silently misbehaves. No error is surfaced anywhere.Workaround: we switched the launcher to read a marker file instead of env.