-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Description
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
- Add this to Windows troubleshooting documentation
- 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
Labels
No labels