Skip to content

Claude Desktop: substitute ${HOME} in user_config defaults #251

@pl4nty

Description

@pl4nty

Describe the bug

In Claude Desktop, ${HOME} is not substituted when it appears inside a user_config default value. When ${user_config.server_path} is resolved, the raw default string (e.g. ${HOME}/AppData/...) is passed through without further variable substitution.

Tried with multiple type values, with required: true, and using \\ instead of / - none resolve the issue.

To Reproduce

  1. Create a manifest using ${HOME} inside a user_config default:
{
  "server": {
    "type": "binary",
    "entry_point": "${user_config.server_path}",
    "mcp_config": {
      "command": "${user_config.server_path}"
    }
  },
  "user_config": {
    "server_path": {
      "type": "file",
      "title": "WinGet MCP Server Executable",
      "description": "Path to WindowsPackageManagerMCPServer.exe. Override only if using a custom build.",
      "default": "${HOME}/AppData/Local/Microsoft/WindowsApps/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/WindowsPackageManagerMCPServer.exe"
    }
  }
}
  1. Install the plugin without overriding the default value.
  2. Observe that the server fails to start - ${HOME} is not expanded in the resolved path.

Expected behavior

${HOME} in a user_config default should be substituted, producing the same resolved path as if used directly:

{
  "server": {
    "type": "binary",
    "entry_point": "${HOME}/AppData/Local/Microsoft/WindowsApps/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/WindowsPackageManagerMCPServer.exe",
    "mcp_config": {
      "command": "${HOME}/AppData/Local/Microsoft/WindowsApps/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe/WindowsPackageManagerMCPServer.exe"
    }
  }
}

(The above works correctly.)

Additional context

Workaround is to hardcode ${HOME} directly in entry_point/mcp_config, but this prevents users from overriding the path (e.g. for debug builds).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions