MCP SSH Agent is a server that integrates with Claude Desktop and other MCP-compatible clients, allowing AI assistants to manage SSH connections and execute remote commands. It discovers SSH hosts from your configuration files and executes commands using native SSH tools for maximum reliability and security.
mcp-ssh-*.dxt
file from GitHub releases.dxt
file to install it in Claude Desktopnpx @aiondadotcom/mcp-ssh
To use this MCP server with Claude Desktop using manual configuration:
On macOS: Add to ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: Add to %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-ssh": {
"command": "npx",
"args": ["@aiondadotcom/mcp-ssh"]
}
}
}
After adding this configuration, restart Claude Desktop.
npm install -g @aiondadotcom/mcp-ssh
ssh
/scp
commands instead of JavaScript SSH librariesscp
The agent provides these MCP tools:
ssh
and scp
commands available)~/.ssh/config
and ~/.ssh/known_hosts
)Once configured, you can ask Claude to help with SSH operations like:
For the MCP SSH Agent to work properly, you need to set up SSH key authentication:
# Generate Ed25519 key (recommended)
ssh-keygen -t ed25519 -C "[email protected]"
# Or generate RSA key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Important: When prompted for a passphrase, leave it empty (press Enter). The MCP SSH Agent cannot handle password-protected keys as it runs non-interactively.
# Using ssh-copy-id (easiest)
ssh-copy-id user@hostname
# Manual copy
cat ~/.ssh/id_ed25519.pub | ssh user@hostname "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
On your local machine:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 644 ~/.ssh/config
chmod 644 ~/.ssh/known_hosts
On the remote server:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ssh
and scp
are installed and in your PATH~/.ssh/config
or ~/.ssh/known_hosts
Run with debug output to see detailed operation logs:
# Enable debug mode
MCP_SILENT=false npx @aiondadotcom/mcp-ssh
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-ssh" '{"command":"npx","args":["@aiondadotcom/mcp-ssh"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-ssh": {
"command": "npx",
"args": [
"@aiondadotcom/mcp-ssh"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-ssh": {
"command": "npx",
"args": [
"@aiondadotcom/mcp-ssh"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect