Shell Command MCP Server
Servidor MCP de comandos de Shell
Este es un servidor MCP (Protocolo de Contexto de Modelo) que permite ejecutar comandos de shell dentro de un contenedor Docker. Proporciona un espacio de trabajo seguro y aislado para ejecutar comandos sin dar acceso al demonio de Docker del host.
Características
Ejecute scripts de shell a través de una interfaz MCP simple
ejecución sincrónica
ejecución asincrónica con 4 modos diferentes
completar: notificar cuando se completa el comando
línea: notificar en cada línea de salida
fragmento: notificar en cada fragmento de salida
Carácter: notificar sobre cada carácter de salida.
Herramientas de Kubernetes incluidas: kubectl, helm, kustomize, hemfile
Entorno de contenedor Docker aislado con usuario no root
Se implementó la asignación de ID de usuario/ID de grupo entre el host y el contenedor. Esto permite que el contenedor se ejecute con el mismo usuario que el host, lo que garantiza que los archivos creados por el contenedor tengan la misma propiedad y los mismos permisos que los creados por el host.
Monta un directorio de host en el directorio /home/mcp del contenedor para persistencia. Se convierte en el directorio de inicio en el que trabaja la IA.
Si el directorio del host está vacío, los archivos iniciales se copiarán desde la copia de seguridad en el contenedor.
Related MCP server: K8s MCP Server
Filosofía del diseño
Este servidor MCP proporciona a la IA un espacio de trabajo similar al de un humano. La autorización no está limitada por las funciones de MCP, sino por el aislamiento del contenedor y las restricciones de autorización externa.
Proporciona herramientas más generales, como la ejecución de scripts de shell, para que puedan utilizarse sin conocimientos especializados sobre el uso de herramientas.
La implementación del servidor se mantiene lo más simple posible para facilitar la auditoría del código.
Empezando
Prerrequisitos
Estibador
Uso con Claude para escritorio
Agregue la siguiente configuración a su archivo de configuración de Claude for Desktop.
Sistema operativo Mac:
"shell-command": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--mount",
"type=bind,src=/Users/user-name/MCPHome,dst=/home/mcp",
"ghcr.io/kaznak/shell-command-mcp:latest"
]
}Reemplace /Users/user-name/ClaudeWorks con el directorio que desea que esté disponible para el contenedor.
Ventanas:
"shell-command": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--mount",
"type=bind,src=\\\\wsl.localhost\\Ubuntu\\home\\user-name\\MCPHome,dst=/home/mcp",
"ghcr.io/kaznak/shell-command-mcp:latest"
]
}Proporcionar algunas indicaciones
Para operar los archivos en el directorio montado.
Herramientas MCP disponibles
Consideraciones de seguridad
El servidor MCP se ejecuta como un usuario no root dentro del contenedor
El contenedor no tiene acceso al demonio Docker del host
El espacio de trabajo del usuario se monta desde el host para persistencia
Licencia
Instituto Tecnológico de Massachusetts (MIT)
Available Tools
2 toolsexecute-bash-script-asyncA
This tool executes shell scripts asynchronously in bash. Executing each command creates a new bash process. Synchronous execution requires to wait the scripts completed. Asynchronous execution makes it possible to execute multiple scripts in parallel. You can reduce waiting time by planning in advance which shell scripts need to be executed and executing them in parallel. Avoid using execute-bash-script-sync tool unless you really need to, and use this execute-bash-script-async tool whenever possible.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The bash script to execute | |
| options | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that 'Executing each command creates a new bash process' and describes the asynchronous nature, but lacks details about error handling, security implications, resource consumption, or what the tool returns. It mentions 'Synchronous execution requires to wait the scripts completed' which helps contrast behaviors, but more operational transparency would be beneficial for a tool executing arbitrary shell scripts.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized at 6 sentences. It's front-loaded with the core purpose, then explains the asynchronous nature and benefits, and ends with usage guidance. Some sentences could be more concise (e.g., 'Synchronous execution requires to wait the scripts completed' could be simplified), but overall it's well-structured with minimal redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of executing arbitrary shell scripts with no annotations and no output schema, the description is incomplete. It explains the asynchronous nature and provides usage guidance, but lacks critical information about security considerations, error handling, return values, or execution environment. For a tool that could have significant side effects, more comprehensive context is needed despite the good usage guidelines.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50% (only 'command' has a description in the schema, while 'options' and its nested properties lack schema descriptions). The tool description provides no parameter information beyond what's implied by the tool's purpose. The description doesn't mention any parameters, their meanings, or how they affect execution, so it doesn't compensate for the schema coverage gap. With 2 parameters and low schema coverage, this represents a significant documentation gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'executes shell scripts asynchronously in bash', providing a specific verb ('executes') and resource ('shell scripts'). It distinguishes from the sibling tool 'execute-bash-script-sync' by mentioning it in the last sentence, though the differentiation is more about usage preference than functional distinction. The purpose is clear but could be more specific about what 'asynchronously' means operationally.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool versus alternatives. It states 'Avoid using execute-bash-script-sync tool unless you really need to, and use this execute-bash-script-async tool whenever possible.' It also explains the benefit of asynchronous execution for parallel processing and reducing waiting time, giving clear context for when this approach is advantageous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute-bash-script-syncA
This tool executes shell scripts synchronously in bash. Executing each command creates a new bash process. Synchronous execution requires to wait the scripts completed. Asynchronous execution makes it possible to execute multiple scripts in parallel. You can reduce waiting time by planning in advance which shell scripts need to be executed and executing them in parallel. Avoid using this execute-bash-script-sync tool unless you really need to, and use the execute-bash-script-async tool whenever possible.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The bash script to execute | |
| options | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses key behavioral traits: 'Executing each command creates a new bash process' and 'Synchronous execution requires to wait the scripts completed.' However, it lacks details about error handling, output format, security implications, or system resource usage. For a potentially dangerous tool like bash script execution with no annotations, this is a moderate disclosure level.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is 6 sentences with some redundancy ('synchronous execution' mentioned twice) and could be more front-loaded. The first sentence states the purpose clearly, but subsequent sentences mix behavioral details with usage guidelines in a somewhat disorganized way. It's not excessively verbose but could be more efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a potentially dangerous tool (bash script execution) with no annotations and no output schema, the description provides moderate context. It covers the synchronous nature and sibling comparison well, but lacks critical details like what happens on script failure, what output is returned, security warnings, or performance implications. For a tool with this complexity and risk profile, the description should do more.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50% (2 parameters total, with 'command' well-described but 'options' object lacking overall description). The description adds no parameter semantics beyond what's in the schema - it doesn't explain what 'command' should contain or how 'options' affect execution. With moderate schema coverage, the description doesn't compensate enough, resulting in a baseline 3 score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'executes shell scripts synchronously in bash' with specific verb+resource. It distinguishes from the sibling tool by mentioning 'synchronous execution requires to wait the scripts completed' and contrasting with 'asynchronous execution makes it possible to execute multiple scripts in parallel.' However, it doesn't explicitly name the sibling tool in the purpose statement, keeping it at 4 rather than 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool vs alternatives: 'Avoid using this execute-bash-script-sync tool unless you really need to, and use the execute-bash-script-async tool whenever possible.' It also explains the trade-off: synchronous execution requires waiting, while asynchronous allows parallel execution to reduce waiting time. This is comprehensive guidance with clear alternatives.
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.
2 tool updates
- First observed
execute-bash-script-async - First observed
execute-bash-script-sync
TDQS
The two tools are perfectly distinct: one for asynchronous execution and one for synchronous execution. Their names and descriptions clearly differentiate their purposes, with no overlap or ambiguity in functionality.
Both tools follow a consistent verb_noun pattern with kebab-case (execute-bash-script-async and execute-bash-script-sync). The naming is predictable and uniform across the set.
With only 2 tools, the server feels thin for a shell command domain. While it covers basic execution modes, it lacks tools for other common operations like file manipulation, process monitoring, or environment inspection, making the scope incomplete.
The toolset is severely incomplete for a shell command server. It only provides script execution in two modes, missing essential operations like listing files, checking system status, managing processes, or handling input/output redirection, which are core to shell interactions.
Maintenance
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
Paid remote MCP for LLM security scans, jailbreak checks, analytics, checkout, and readiness.
Claude Code / MCP skills for the dev pipeline: discover, spec, design, build, ship, operate.
Deploy full-stack apps (Postgres, Redis, S3, workers, backups) from Claude or curl. 59 MCP tools.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceFacilitates isolated code execution within Docker containers, enabling secure multi-language script execution and integration with language models like Claude via the Model Context Protocol.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to run Kubernetes CLI tools (kubectl, istioctl, helm, argocd) in a secure, containerized environment via the Model Context Protocol.213MIT
- AlicenseNot gradedqualityDmaintenanceA Docker-based MCP server that enables Claude to run Kubernetes CLI tools (kubectl, istioctl, helm, argocd) in a secure containerized environment for managing and troubleshooting clusters.MIT
- AlicenseNot gradedqualityCmaintenanceEnables executing shell commands on the host system via an MCP tool, with JWT/OAuth authentication and audit logging for secure remote access.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/kaznak/shell-command-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server