The MCP SSH Agent provides a standardized interface for AI assistants like Claude to manage SSH connections. It discovers hosts from your SSH configuration files and executes commands using native SSH tools for maximum reliability and security.
The easiest installation method is through Claude Desktop:
.dxt
file from the GitHub releases page.dxt
file to install it in Claude DesktopYou can run the MCP SSH Agent directly with npx:
npx @aiondadotcom/mcp-ssh
To configure Claude Desktop manually:
On macOS:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows:
Edit %APPDATA%/Claude/claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"mcp-ssh": {
"command": "npx",
"args": ["@aiondadotcom/mcp-ssh"]
}
}
}
After adding this configuration, restart Claude Desktop.
Install the package globally with npm:
npm install -g @aiondadotcom/mcp-ssh
ssh
/scp
commands for reliabilityscp
The MCP SSH Agent provides these tools:
Once configured, you can ask Claude to help with SSH operations like:
Claude will use the MCP SSH tools to perform these operations.
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]"
Important: When prompted for a passphrase, leave it empty (press Enter). The MCP SSH Agent cannot handle password-protected keys.
# Using ssh-copy-id (easiest)
ssh-copy-id user@hostname
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
chmod 644 ~/.ssh/config
chmod 644 ~/.ssh/known_hosts
# Test connection
ssh -i ~/.ssh/id_ed25519 user@hostname
The MCP SSH Agent fully supports complex SSH configurations including:
Here's an example ~/.ssh/config
file:
# Include directives must be at the beginning due to SSH bug
Include ~/.ssh/config.d/*
Include ~/.ssh/work-servers
# Global settings
ServerAliveInterval 55
# Production server with jump host
Host prod
Hostname 203.0.113.10
Port 22022
User deploy
IdentityFile ~/.ssh/id_prod_rsa
# Web server with specific configuration
Host web1.example.com
Hostname 198.51.100.15
Port 22022
User root
IdentityFile ~/.ssh/id_ed25519
ssh
and scp
are installed and in your PATH~/.ssh/config
or ~/.ssh/known_hosts
# Enable debug mode
MCP_SILENT=false npx @aiondadotcom/mcp-ssh
ssh
and scp
commands available)~/.ssh/config
and ~/.ssh/known_hosts
)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