Skip to content

Windows: SSH-based MCP servers require PROGRAMDATA environment variable #2943

@NF1198

Description

@NF1198

Issue

SSH connections fail when MCP servers are launched from Claude Desktop on Windows.

Common Use Case

Running an MCP server on a remote host (Raspberry Pi, home server, NAS, another PC on local network) and connecting to it via SSH from Windows Claude Desktop.

Root Cause

Claude Desktop launches MCP servers with a minimal environment missing PROGRAMDATA, which OpenSSH on Windows requires to locate system SSH configuration files.

Solution

Add PROGRAMDATA to the env configuration:

    {
      "mcpServers": {
        "my-remote-server": {
          "command": "C:\\WINDOWS\\System32\\OpenSSH\\ssh.exe",
          "args": [
            "[email protected]",
            "-o", "StrictHostKeyChecking=accept-new",
            "-i", "C:\\Users\\username\\.ssh\\id_ed25519",
            "/path/to/remote/mcp-server/command"
          ],
          "env": {
            "PROGRAMDATA": "C:\\ProgramData"
          }
        }
      }
    }

Recommendation

  1. Add this to Windows troubleshooting documentation
  2. Consider passing PROGRAMDATA by default for Windows MCP server environments

Environment

  • OS: Windows 11
  • Claude Desktop
  • OpenSSH (Windows built-in)
  • Remote MCP server over SSH on local network

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