Skip to main content
Glama

Shell-MCP

by kevinwatt

shell-mcp

Shell命令执行MCP服务器

为 LLM 提供安全 shell 命令执行功能的 MCP 服务器实现。

特征

  • 安全执行:仅限白名单命令和参数
  • 资源控制:内存和 CPU 使用率监控
  • 超时控制:自动终止长时间运行的命令
  • 尺寸限制:出于安全考虑的输出尺寸限制
  • MCP 集成:与 Claude 和其他兼容 MCP 的 LLM 兼容

安装

npm install @kevinwatt/shell-mcp

使用Dive Desktop进行配置

  1. 在 Dive Desktop 中点击“+ 添加 MCP 服务器”
  2. 复制并粘贴此配置:
{ "mcpServers": { "shell": { "command": "npx", "args": [ "-y", "@kevinwatt/shell-mcp" ] } } }

工具文档

  • shell_ls、shell_pwd、shell_df 等。
    • 执行白名单中的shell命令
    • 输入:
      • command (字符串,必需):要执行的命令
      • args (数组,可选):命令参数
      • timeout (数字,可选):执行超时(以毫秒为单位)

使用示例

要求你的法学硕士:

"Show current directory using shell_pwd" "List files using shell_ls with -l argument" "Check disk usage using shell_df with -h argument"

手动启动

如果需要,请手动启动服务器:

npx @kevinwatt/shell-mcp

要求

  • Node.js 18+
  • MCP 兼容的 LLM 服务

发展

# Install dependencies npm install # Watch mode npm run watch # Run tests npm test # Lint npm run lint

执照

麻省理工学院 © Dewei Yen

关键词

  • 甲基氯丙烯
  • 命令
  • 克劳德
  • 法学硕士
  • 自动化

可用命令

可用的 shell 命令如下:

命令描述允许的参数
ls列出目录内容-l、-a、-h、-R、--help、*
连接并显示文件内容-n、-b、--帮助、*
密码显示当前工作目录没有任何
自由度显示磁盘使用情况-h、-T、--帮助
回声显示文本任何文本
附言显示进程状态-e、-f、-u、--帮助
自由的显示内存使用情况-h、-m、-g、--帮助
正常运行时间显示系统正常运行时间没有任何
日期显示系统日期和时间+%Y-%m-%d, +%H:%M:%S, --帮助
grep在文件中搜索文本模式-i、-v、-n、-r、-l、--颜色、*
西显示谁登录以及他们正在做什么-h、-s、--无标题、--帮助
whois查询WHOIS域名注册信息-H,*
寻找在目录层次结构中搜索文件-名称、-类型、-大小、-修改时间、*
网络状态网络连接信息-a、-n、-t、-u、-l、-p、--帮助
lspci列出 PCI 设备-v、-k、-mm、-nn、--帮助
lsusb列出 USB 设备-v、-t、-d、-s、--帮助
DNS 查找实用程序+短,+跟踪,+ dnssec,@ **
nslookup查询 DNS 记录-type=*,-query=**
ip显示网络设备和接口地址、链接、路由、邻居、-br、*
其中找到二进制文件、源文件和手册文件-b、-m、-s、*

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

一个安全的 MCP 服务器,用于执行具有资源和超时控制的白名单 shell 命令,旨在与 Claude 和其他与 MCP 兼容的 LLM 集成。

  1. 特征
    1. 安装
      1. 使用Dive Desktop进行配置
        1. 工具文档
          1. 使用示例
            1. 手动启动
              1. 要求
                1. 发展
                  1. 执照
                    1. 关键词
                      1. 可用命令

                        Related MCP Servers

                        • A
                          security
                          A
                          license
                          A
                          quality
                          A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
                          Last updated -
                          1
                          74
                          Python
                          MIT License
                          • Apple
                        • A
                          security
                          A
                          license
                          A
                          quality
                          An MCP server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface for LLMs.
                          Last updated -
                          10
                          23
                          Python
                          MIT License
                          • Apple
                        • -
                          security
                          F
                          license
                          -
                          quality
                          An MCP server that allows secure execution of macOS terminal commands through Claude or Roo Code with built-in security whitelisting and approval mechanisms.
                          Last updated -
                          1
                          JavaScript
                          • Apple
                        • -
                          security
                          A
                          license
                          -
                          quality
                          An MCP server that enables secure execution of shell commands across Windows, macOS, and Linux with built-in whitelisting and approval mechanisms for enhanced security.
                          Last updated -
                          13
                          JavaScript
                          MIT License
                          • Linux
                          • Apple

                        View all related MCP servers

                        MCP directory API

                        We provide all the information about MCP servers via our MCP API.

                        curl -X GET 'https://glama.ai/api/mcp/v1/servers/kevinwatt/shell-mcp'

                        If you have feedback or need assistance with the MCP directory API, please join our Discord server