Skip to main content
Glama
deepsuthar496

Remote Command MCP Server

Servidor MCP de comando remoto

Un servidor de Protocolo de Contexto de Modelo (MCP) que permite la ejecución remota de comandos en diferentes sistemas operativos. Este servidor proporciona una interfaz unificada para ejecutar comandos de shell, gestionando automáticamente las diferencias específicas de la plataforma entre Windows y sistemas similares a Unix.

Características

  • Ejecución de comandos multiplataforma

  • Normalización automática de comandos entre Windows y Unix

  • Manejo de errores integrado y transmisión de salida

  • Compatibilidad con especificaciones de directorios de trabajo

  • Selección de shell específica de la plataforma

Related MCP server: MCP Shell Server

Instalación

  1. Clonar el repositorio:

git clone https://github.com/deepsuthar496/Remote-Command-MCP
cd remote-command-server
  1. Instalar dependencias:

npm install
  1. Construir el servidor:

npm run build
  1. Configure el servidor MCP en su archivo de configuración:

Para la extensión Cline de VSCode ( cline_mcp_settings.json ):

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

Uso

El servidor proporciona una única herramienta llamada execute_remote_command que puede ejecutar cualquier comando de shell válido en el host. Esto incluye:

  • Comandos del sistema

  • Comandos del administrador de paquetes (apt, yum, chocolatey, etc.)

  • Herramientas de desarrollo (git, npm, python, etc.)

  • Operaciones con archivos

  • Comandos de red

  • Gestión de servicios

  • Y cualquier otro comando CLI disponible en el sistema

Herramienta: execute_remote_command

Parámetros:

  • command (obligatorio): cualquier comando de shell válido que pueda ejecutarse en el sistema operativo host

  • cwd (opcional): Directorio de trabajo para la ejecución de comandos

Ejemplos

  1. Información del sistema:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "systeminfo"  // Windows
  // or "uname -a"        // Linux
}
</arguments>
</use_mcp_tool>
  1. Gestión de paquetes:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "npm list -g --depth=0"  // List global NPM packages
}
</arguments>
</use_mcp_tool>
  1. Operaciones de red:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "netstat -an"  // Show all network connections
}
</arguments>
</use_mcp_tool>
  1. Operaciones de Git:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "git status",
  "cwd": "/path/to/repo"
}
</arguments>
</use_mcp_tool>
  1. Operaciones de archivo:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "ls -la",  // List files with details
  "cwd": "/path/to/directory"
}
</arguments>
</use_mcp_tool>
  1. Gestión de procesos:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "ps aux"  // List all running processes (Unix)
  // or "tasklist"     // Windows equivalent
}
</arguments>
</use_mcp_tool>
  1. Control de servicio:

<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
  "command": "systemctl status nginx"  // Check service status (Linux)
  // or "sc query nginx"               // Windows equivalent
}
</arguments>
</use_mcp_tool>

Consideraciones de seguridad

Dado que este servidor puede ejecutar cualquier comando del sistema, tenga en cuenta las siguientes prácticas de seguridad:

  1. Control de acceso : limite el acceso al servidor MCP únicamente a usuarios de confianza

  2. Validación de comandos : valide los comandos antes de su ejecución en la lógica de su aplicación

  3. Directorio de trabajo : utilice el parámetro cwd para restringir la ejecución de comandos a directorios específicos

  4. Entorno : Tenga cuidado con los comandos que modifican la configuración del sistema o archivos confidenciales.

  5. Permisos : Ejecute el servidor MCP con los permisos de usuario adecuados

Manejo de comandos multiplataforma

El servidor gestiona automáticamente las diferencias específicas de cada plataforma:

  1. Traducción de comandos:

    • lsdir (convertido automáticamente según la plataforma)

    • Formato adecuado del operador de tubería para cada plataforma

  2. Selección de conchas:

    • Windows: utiliza cmd.exe

    • Unix/Linux: utiliza /bin/sh

Manejo de errores

El servidor proporciona mensajes de error detallados e incluye tanto la salida estándar como la salida estándar en la respuesta. Si un comando falla, recibirá un mensaje de error con detalles sobre el problema.

Ejemplo de respuesta de error:

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

Desarrollo

Estructura del proyecto

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

Edificio

npm run build

Esto compilará el código TypeScript y creará el ejecutable en el directorio build .

Contribuyendo

  1. Bifurcar el repositorio

  2. Crea tu rama de funciones ( git checkout -b feature/amazing-feature )

  3. Confirme sus cambios ( git commit -m 'Add some amazing feature' )

  4. Empujar a la rama ( git push origin feature/amazing-feature )

  5. Abrir una solicitud de extracción

Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

Available Tools

1 tool
execute_remote_commandC

Execute a command on the host machine

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute
cwdNoWorking directory for command execution

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions execution but doesn't describe permissions required, whether commands run asynchronously, timeout behavior, error handling, or output format. For a potentially dangerous remote execution tool, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that executes remote commands with no annotations and no output schema, the description is insufficient. It doesn't address critical aspects like security implications, execution environment, error conditions, or what the tool returns. The combination of high-risk functionality and minimal description creates significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (command and cwd) adequately. The description doesn't add any additional meaning about parameter usage beyond what's in the schema, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('execute') and target ('command on the host machine'), providing a specific verb+resource combination. It doesn't need to differentiate from siblings since none exist, but it could be more specific about what types of commands or hosts are supported.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives or what prerequisites might be needed. The description states what it does but offers no context about appropriate use cases, security considerations, or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool update
    • First observedexecute_remote_command

TDQS

B3/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or confusion between tools. The tool's purpose is singular and clearly defined.

Naming Consistency5/5

Since there is only one tool, it inherently maintains consistency. The naming follows a clear verb_noun pattern (execute_remote_command).

Tool Count2/5

A single tool is too few for a server named 'Remote Command MCP Server', which suggests a broader scope for remote command execution. This minimal set limits functionality and may cause agent failures due to lack of supporting operations.

Completeness1/5

The tool surface is severely incomplete. It only provides command execution with no support for listing available commands, checking command status, handling outputs, or managing remote sessions, which are essential for the domain.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.
    7
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A server that enables remote command execution over SSH through the Model Context Protocol (MCP), supporting both password and private key authentication.
    1
    1
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
    6
    17
    2
    -

Latest Blog Posts

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/deepsuthar496/Remote-Command-MCP'

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