npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@davidfei/ssh-mcp

v1.0.0

Published

MCP server for executing remote SSH commands with password and private key authentication

Downloads

6

Readme

SSH MCP Server

A Model Context Protocol (MCP) server that enables Claude Code to execute commands on remote servers via SSH. Supports both password and private key authentication.

Features

  • Execute remote commands via SSH
  • Password authentication
  • Private key authentication (with optional passphrase)
  • Configurable timeouts
  • Structured output with stdout, stderr, and exit codes

Installation

npm install -g @davidfei/ssh-mcp

Usage with Claude Code

After installation, configure the MCP server in your Claude Code settings:

{
  "mcpServers": {
    "ssh": {
      "command": "ssh-mcp"
    }
  }
}

Restart Claude Code to load the server.

Authentication Methods

Claude Code can use the ssh_exec tool with the following authentication methods:

Password Authentication

Ask Claude Code to execute a command like:

Connect to example.com as user with password authentication and run: ls -la

Private Key Authentication (file path)

Ask Claude Code to:

Connect to example.com using SSH key at ~/.ssh/id_rsa and run: df -h

Private Key with Passphrase

Ask Claude Code to:

Connect to example.com using encrypted SSH key at ~/.ssh/id_rsa with passphrase and run: uname -a

Tool Reference

ssh_exec

Execute a command on a remote server via SSH.

Parameters:

  • connection (object, required):

    • host (string, required): SSH server hostname or IP address
    • port (number, optional): SSH server port (default: 22)
    • username (string, required): SSH username
    • password (string, optional): SSH password for password authentication
    • privateKey (string, optional): SSH private key content for key-based authentication
    • privateKeyPath (string, optional): Path to SSH private key file
    • passphrase (string, optional): Passphrase for encrypted private key
  • command (string, required): Command to execute on the remote server

  • timeout (number, optional): Command timeout in milliseconds (default: 30000)

Response:

{
  "success": true,
  "stdout": "command output",
  "stderr": "",
  "exitCode": 0
}

Example Commands

Ask Claude Code to:

  • "Check disk usage on production server at 192.168.1.100"
  • "Run the backup script on remote-server.com"
  • "Check system information on my-server"
  • "List running Docker containers on the deployment server"

Security Considerations

  • Store credentials securely (use environment variables or secure vaults)
  • Use private key authentication when possible
  • Limit SSH user permissions on remote servers
  • Use firewall rules to restrict SSH access
  • Consider using SSH certificates for enhanced security
  • Avoid hardcoding credentials in configuration files

Troubleshooting

Connection timeout

Increase the timeout parameter or check network connectivity:

{
  "timeout": 60000
}

Authentication failed

  • Verify username and password/key are correct
  • Check SSH server allows the authentication method
  • Ensure private key has correct permissions (600)
  • Verify the private key format is supported

Command not found

Ensure the command exists on the remote server and is in the PATH.

Requirements

  • Node.js >= 18.0.0
  • SSH access to remote servers
  • Claude Code installation

Development

For local development and contributing, see DEVELOPMENT.md.

License

MIT

Support

For issues and questions, please open an issue on the GitHub repository.