Skip to content

Claude Desktop records manifest mcp_config.env but doesn't pass it to the spawned server process #297

Description

@TaherHaghverdi

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

  1. 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).

  1. 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.

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions