Repository navigation
Connect Your AI App
SSH MCP works with any app or coding agent that supports MCP (Model Context Protocol), the standard way AI apps plug into tools.
ssh-mcp-server connectThis finds every supported app on your computer and connects SSH MCP to it, without asking anything. It keeps passwords you've already saved and is safe to run as often as you like. Then restart your AI app.
To connect only some apps:
ssh-mcp-server connect -app codex,cursor| App | Name for -app
|
Where its settings live |
|---|---|---|
| Claude Desktop | claude-desktop |
claude_desktop_config.json in Claude's settings folder |
| Claude Code | claude-code |
managed with the claude mcp command (user scope) |
| Codex (OpenAI) | codex |
~/.codex/config.toml (or $CODEX_HOME) |
| Gemini CLI | gemini |
~/.gemini/settings.json |
| Cursor | cursor |
~/.cursor/mcp.json |
| Windsurf | windsurf |
~/.codeium/windsurf/mcp_config.json |
| VS Code (Copilot) | vscode |
mcp.json in your VS Code user folder |
Before changing any settings file, SSH MCP saves a copy next to it as .bak. If a file contains comments (some apps allow that), it's left untouched and you're shown what to add by hand.
You need two things, both shown by the setup:
-
Program: where
ssh-mcp-serveris installed, for example- Windows:
C:\Users\you\AppData\Local\Programs\ssh-mcp\ssh-mcp-server.exe - macOS/Linux:
/Users/you/.local/bin/ssh-mcp-serveror/home/you/.local/bin/ssh-mcp-server
- Windows:
- Settings file: see Setup Guide
Use full paths. AI apps don't start programs from your home folder.
{
"mcpServers": {
"ssh": {
"command": "/home/you/.local/bin/ssh-mcp-server",
"args": ["-config", "/home/you/.config/ssh-mcp/servers.json"],
"env": { "SSH_MCP_WEB_PASSWORD": "only if a server uses a password" }
}
}
}claude mcp add --scope user ssh -- /home/you/.local/bin/ssh-mcp-server -config /home/you/.config/ssh-mcp/servers.jsonAdd -e SSH_MCP_WEB_PASSWORD=... before -- if a server uses a password.
In ~/.codex/config.toml:
[mcp_servers.ssh]
command = "/home/you/.local/bin/ssh-mcp-server"
args = ["-config", "/home/you/.config/ssh-mcp/servers.json"]
[mcp_servers.ssh.env]
SSH_MCP_WEB_PASSWORD = "only if a server uses a password"In your user mcp.json (Command Palette > MCP: Open User Configuration):
{
"servers": {
"ssh": {
"type": "stdio",
"command": "/home/you/.local/bin/ssh-mcp-server",
"args": ["-config", "/home/you/.config/ssh-mcp/servers.json"]
}
}
}Add a new MCP server of type stdio (sometimes called command), with the program and arguments above. Check that app's documentation for where its MCP settings are.
Servers that sign in with a key file need nothing extra.
For servers that use a password, the AI app has to hand the password to SSH MCP when it starts it. The setup can save it in the app's own settings file on your computer (an env entry such as SSH_MCP_WEB_PASSWORD). It is never put in servers.json and never shown to the AI. If you'd rather not store it there, set that environment variable yourself before starting the app.
Restart the app and ask: "List my SSH servers." You should see your servers. If not, see Troubleshooting.
The repository includes a ready-made skill (instructions for the AI) in skills/ssh-mcp. It teaches the AI to check before acting, keep commands safe, and ask before changing anything. Copy the folder into your agent's skills folder, for example ~/.claude/skills/ for Claude Code or ~/.codex/skills/ for Codex.
SSH MCP is free and open source (MIT). No analytics, no telemetry. · Download · Report a problem · Found a mistake on this page? Edit it in the wiki/ folder.