MCP_OVER_ssh - emsi/MyManus GitHub Wiki
To run MCP servers over ssh you need to change the configuration from something like this
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/home/agent"
]
},
to something like this:
"filesystem": {
"command": "ssh",
"args": [
"target_user@target_host.address",
"'npx -y @modelcontextprotocol/server-filesystem .'"
]
},
or if you have a local node installation something like:
"filesystem": {
"command": "ssh",
"args": [
"target_user@target_host.address",
"'PATH=/home/emsi/.nvm/versions/node/v23.10.0/bin/:$PATH npx -y @modelcontextprotocol/server-filesystem .'"
]
},
Of course adjusting the values for your particular case.
And make sure the ssh is set up with authorization keys without password so the command succeed without asking for password. Just make sure all the mcp servers do work in the remote location beforehand. The browser is safe to run locally though.