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

mcp-ssh-server-tool

v2.0.1

Published

MCP Server for SSH connections and remote command execution

Readme

SSH MCP Server

一个用于 SSH 连接和远程命令执行的 MCP (Model Context Protocol) 服务器。

功能

  • 🔐 密码认证 - 使用用户名和密码连接到 SSH 服务器
  • 🔑 公钥认证 - 使用私钥文件连接到 SSH 服务器
  • 💻 远程命令执行 - 在连接的服务器上执行命令并获取输出
  • 📊 会话管理 - 管理多个 SSH 连接会话

安装

npx -y mcp-ssh-server-tool

MCP 工具

ssh_connect

建立 SSH 连接

参数:

  • host: 服务器地址 (必需)
  • port: 端口号 (默认: 22)
  • username: 用户名 (必需)
  • auth_type: 认证方式 - "password" | "public_key" (必需)
  • password: 密码 (auth_type 为 password 时必需)
  • private_key_path: 私钥路径 (auth_type 为 public_key 时必需)
  • passphrase: 私钥密码 (可选)
  • timeout: 连接超时 (默认: 10秒)

ssh_exec

在 SSH 会话中执行命令

参数:

  • session_id: SSH 会话 ID (必需)
  • command: 要执行的命令 (必需)

返回:

  • stdout: 标准输出
  • stderr: 标准错误
  • exitCode: 退出码

ssh_disconnect

断开 SSH 连接

参数:

  • session_id: SSH 会话 ID (必需)

ssh_list_sessions

列出所有活动的 SSH 会话

使用示例

1. 密码认证连接

{
  "host": "192.168.1.100",
  "port": 22,
  "username": "admin",
  "auth_type": "password",
  "password": "your_password"
}

2. 公钥认证连接

{
  "host": "192.168.1.100",
  "port": 22,
  "username": "admin",
  "auth_type": "public_key",
  "private_key_path": "/home/user/.ssh/id_rsa"
}

3. 执行命令

{
  "session_id": "<从 ssh_connect 返回的 session_id>",
  "command": "ls -la /home"
}

4. 断开连接

{
  "session_id": "<session_id>"
}

依赖

  • Node.js >= 18.0.0
  • ssh2 >= 1.15.0
  • uuid >= 9.0.0

License

MIT