Skip to main content
Glama

shell-mcp

Ejecución de comandos de shell en el servidor MCP

VersiónLicencia

Una implementación de servidor MCP que proporciona capacidades de ejecución de comandos de shell seguro para LLM.

Características

  • Ejecución segura : solo comandos y argumentos incluidos en la lista blanca

  • Control de recursos : monitoreo del uso de memoria y CPU

  • Control de tiempo de espera : finalización automática de comandos de larga duración

  • Límites de tamaño : Restricciones de tamaño de salida por seguridad

  • Integración con MCP : funciona con Claude y otros LLM compatibles con MCP

Related MCP server: terminal-mcp

Instalación

npm install @kevinwatt/shell-mcp

Configuración con Dive Desktop

  1. Haga clic en "+ Agregar servidor MCP" en Dive Desktop

  2. Copie y pegue esta configuración:

{
  "mcpServers": {
    "shell": {
      "command": "npx",
      "args": [
        "-y",
        "@kevinwatt/shell-mcp"
      ]
    }
  }
}

Documentación de herramientas

  • shell_ls, shell_pwd, shell_df, etc.

    • Ejecutar comandos de shell incluidos en la lista blanca

    • Entradas:

      • command (cadena, obligatorio): Comando a ejecutar

      • args (matriz, opcional): argumentos del comando

      • timeout (número, opcional): tiempo de espera de ejecución en ms

Ejemplos de uso

Pídale a su LLM que:

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

Inicio manual

Si es necesario, inicie el servidor manualmente:

npx @kevinwatt/shell-mcp

Requisitos

  • Node.js 18+

  • Servicio LLM compatible con MCP

Desarrollo

# Install dependencies
npm install

# Watch mode
npm run watch

# Run tests
npm test

# Lint
npm run lint

Licencia

MIT © Dewei Yen

Palabras clave

  • mcp

  • caparazón

  • dominio

  • claudio

  • LLM

  • automatización

Comandos disponibles

Los siguientes comandos de shell están disponibles:

Dominio

Descripción

Argumentos permitidos

es

Listar el contenido del directorio

-l, -a, -h, -R, --ayuda, *

gato

Concatenar y mostrar el contenido del archivo

-n, -b, --ayuda, *

contraseña

Mostrar el directorio de trabajo actual

Ninguno

df

Mostrar el uso del disco

-h, -T, --ayuda

eco

Mostrar texto

Cualquier texto

PD

Mostrar el estado del proceso

-e, -f, -u, --ayuda

gratis

Mostrar el uso de la memoria

-h, -m, -g, --ayuda

tiempo de actividad

Mostrar el tiempo de actividad del sistema

Ninguno

fecha

Mostrar fecha y hora del sistema

+%Y-%m-%d, +%H:%M:%S, --ayuda

grep

Buscar patrones de texto en archivos

-i, -v, -n, -r, -l, --color, *

o

Mostrar quién está conectado y qué está haciendo

-h, -s, --no-header, --help

quién es

Consultar información de registro de dominio WHOIS

-H, *

encontrar

Buscar archivos en una jerarquía de directorios

-nombre, -tipo, -tamaño, -mtime, *

netstat

Información de conexión de red

-a, -n, -t, -u, -l, -p, --ayuda

lspci

Lista de dispositivos PCI

-v, -k, -mm, -nn, --ayuda

lsusb

Lista de dispositivos USB

-v, -t, -d, -s, --ayuda

excavar

Utilidad de búsqueda de DNS

+corto, +rastreo, +dnssec, @*, *

nslookup

Consultar registros DNS

-tipo=*, -consulta=*, *

IP

Mostrar dispositivos e interfaces de red

dirección, enlace, ruta, vecino, -br, *

dónde es

Localizar archivos binarios, fuente y manuales

-b, -m, -s, *

Available Tools

20 tools
shell_catC

Concatenate and display file contents

Inputs: args.

shell_dateC

Show system date and time

Inputs: args.

shell_dfC

Show disk usage

Inputs: args.

shell_digC

DNS lookup utility

Inputs: args.

shell_echoC

Display text

Inputs: args.

shell_findC

Search for files in a directory hierarchy

Inputs: args.

shell_freeC

Show memory usage

Inputs: args.

shell_grepC

Search text patterns in files

Inputs: args.

shell_ipC

Show / manipulate routing, network devices, interfaces and tunnels

Inputs: args.

shell_lsC

List directory contents

Inputs: args.

shell_lspciC

List PCI devices

Inputs: args.

shell_lsusbC

List USB devices

Inputs: args.

shell_netstatC

Network connection information

Inputs: args.

shell_nslookupC

Query DNS records

Inputs: args.

shell_psC

Show process status

Inputs: args.

shell_pwdA

Show current working directory

Inputs: args.

shell_uptimeB

Show system uptime

Inputs: args.

shell_wC

Show who is logged on and what they are doing

Inputs: args.

shell_whereisB

Locate the binary, source, and manual page files for a command

Inputs: args.

shell_whoisC

Query WHOIS domain registration information

Inputs: args.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 20 tools

    Disambiguation5/5

    Each tool corresponds to a distinct, well-known Unix/Linux command with a clear, non-overlapping purpose. For example, shell_cat is for file display, shell_df for disk usage, and shell_ps for process status, making it easy for an agent to select the right tool without confusion.

    Naming Consistency5/5

    All tool names follow a consistent 'shell_' prefix followed by the exact command name (e.g., shell_cat, shell_date, shell_df). This uniform pattern enhances readability and predictability across the entire set.

    Tool Count4/5

    With 20 tools, the server covers a broad range of system utilities, which is reasonable for a shell command interface. It might be slightly heavy, but each tool is a standard command, so the count aligns well with the server's purpose of providing comprehensive shell access.

    Completeness5/5

    The tool set offers extensive coverage of common Unix/Linux commands for file operations, system monitoring, network tasks, and process management. There are no obvious gaps for a shell utility server, as it includes essential tools like ls, grep, ps, and networking commands, ensuring agents can handle typical tasks without dead ends.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      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.
      1
      202
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A secure and pluggable MCP server to run terminal commands on your local machine or cloud server — remotely, safely, and with LLMs or agentic clients.
      -
    • A
      license
      B
      quality
      C
      maintenance
      A secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.
      13
      158 npm
      6
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A secure, production-grade MCP server that provides filesystem operations, AST math evaluation, and system diagnostics for LLM agents.
      MIT