Token导航 LogoToken导航TokenDH.com
Remote Command MCP logo
开发工具stdio官方级别未说明来源级核验

Remote Command MCP

MCP Server

一个支持跨平台远程命令执行的服务器,提供统一的接口执行Shell命令,自动处理Windows和Unix系统之间的平台差异。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
开发工具JavaScript系统管理远程控制

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

deepsuthar496

提供方

deepsuthar496

最后核验

2026/5/17 20:37

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

远程命令MCP服务器

一种模型上下文协议(MCP)服务器,支持跨不同操作系统执行远程命令。该服务器提供了一个统一的界面来执行shell命令,自动处理Windows和类Unix系统之间特定于平台的差异。

特性

  • 跨平台命令执行
  • Windows和Unix之间的自动命令规范化
  • 内置错误处理和输出流
  • 工作目录规范支持
  • 平台特定外壳选择

安装

  1. 克隆存储库:
git clone https://github.com/deepsuthar496/Remote-Command-MCP
cd remote-command-server
  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build
  1. 在设置文件中配置MCP服务器:

适用于克劳德桌面(claude_desktop_config.json):

{
  "mcpServers": {
    "remote-command": {
      "command": "node",
      "args": ["path/to/remote-command-server/build/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

用于VSCode临床扩展(cline_mcp_settings.json):

{
  "mcpServers": {
    "remote-command": {
      "command": "node",
      "args": ["path/to/remote-command-server/build/index.js"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

用法

服务器提供了一个名为 execute_remote_command 可以在主机上执行任何有效的shell命令。这包括:

  • 系统命令
  • 包管理器命令(apt、yum、chocolatey等)
  • 开发工具(git、npm、python等)
  • 文件 操作
  • 网络命令
  • 服务管理
  • 以及系统上可用的任何其他CLI命令

工具:execute_remote_command

参数:

  • command (必填):可以在主机操作系统上执行的任何有效shell命令
  • cwd (可选):命令执行的工作目录

例子

  1. 系统信息:

remote-command
execute_remote_command

{
  "command": "systeminfo"  // Windows
  // or "uname -a"        // Linux
}
  1. 包管理:

remote-command
execute_remote_command

{
  "command": "npm list -g --depth=0"  // List global NPM packages
}
  1. 网络操作:

remote-command
execute_remote_command

{
  "command": "netstat -an"  // Show all network connections
}
  1. Git操作:

remote-command
execute_remote_command

{
  "command": "git status",
  "cwd": "/path/to/repo"
}
  1. 文件操作:

remote-command
execute_remote_command

{
  "command": "ls -la",  // List files with details
  "cwd": "/path/to/directory"
}
  1. 流程管理:

remote-command
execute_remote_command

{
  "command": "ps aux"  // List all running processes (Unix)
  // or "tasklist"     // Windows equivalent
}
  1. 服务控制:

remote-command
execute_remote_command

{
  "command": "systemctl status nginx"  // Check service status (Linux)
  // or "sc query nginx"               // Windows equivalent
}

安全考虑

由于此服务器可以执行任何系统命令,请考虑以下安全措施:

  1. 访问控制:仅允许受信任的用户访问MCP服务器
  2. 命令验证:在应用程序逻辑中执行命令之前验证命令
  3. 工作目录:使用 cwd 用于将命令执行限制在特定目录的参数
  4. 环境:请谨慎使用修改系统设置或敏感文件的命令
  5. 权限:以适当的用户权限运行MCP服务器

跨平台指挥处理

服务器会自动处理平台特定的差异:

  1. 命令翻译:

- lsdir (根据平台自动转换) - 为每个平台设置适当的管道操作员格式

  1. 外壳选择:

- Windows:用途 cmd.exe - Unix/Linux:使用 /bin/sh

错误处理

服务器提供详细的错误消息,并在响应中包含stdout和stderr。如果命令失败,您将收到一条错误消息,其中包含错误的详细信息。

错误响应示例:

{
  "content": [
    {
      "type": "text",
      "text": "Command execution error: Command failed with exit code 1"
    }
  ],
  "isError": true
}

发展

项目结构

remote-command-server/
├── src/
│   └── index.ts    # Main server implementation
├── package.json
├── tsconfig.json
└── README.md

建筑

npm run build

这将编译TypeScript代码并在 build 目录。

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。

目录标签

目录标签

开发工具JavaScript系统管理远程控制跨平台命令执行本地部署自动化

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP