The Shell Command MCP Server allows executing shell commands within a secure and isolated Docker container environment.
Run shell scripts synchronously or asynchronously with multiple notification modes (complete, line, chunk, character)
Includes Kubernetes tools like kubectl, helm, kustomize, and hemfile
Provides security through non-root user execution and host-container userid/groupid mapping
Persists data by mounting a host directory to
/home/mcp
in the containerCustomize execution with options for working directory, environment variables, and timeout settings
Initial files are copied to the mounted directory if it's empty
Runs commands within an isolated Docker container environment without giving access to the host Docker daemon.
Provides the Helm package manager for Kubernetes, enabling installation and management of Kubernetes applications.
Includes Kubernetes tools (kubectl, k9s) for managing Kubernetes clusters and resources.
Allows executing shell commands within a Docker container, providing a secure and isolated environment for running commands.
OBSOLETE
I recommend using Claude Code by running claude mcp serve
instead of this MCP server.
I have created ai-agent-workspace as a container to run Claude Code.
Please use it as needed.
Shell Command MCP Server
This is an MCP (Model Context Protocol) server that allows executing shell commands within a Docker container. It provides a secure and isolated workspace for running commands without giving access to the host Docker daemon.
Features
- Run shell scripts through a simple MCP interface
- synchronous execution
- asynchronous execution with 4 different modes
- complete: notify when the command is completed
- line: notify on each line of output
- chunk: notify on each chunk of output
- character: notify on each character of output
- Kubernetes tools included: kubectl, helm, kustomize, hemfile
- Isolated Docker container environment with non-root user
- host-container userid/groupid mapping implemented. this allows the container to run as the same user as the host, ensuring that files created by the container have the same ownership and permissions as those created by the host.
- mount a host directory to the container /home/mcp directory for persistence. it become the home directory the AI works in.
- if the host directory is empty, the initial files will be copied form the backup in the container.
Design Philosophy
This MCP server provides AI with a workspace similar to that of a human. Authorization is limited not by MCP functions, but by container isolation and external authorization restrictions.
It provides more general tools such as shell script execution, so that they can be used without specialized knowledge of tool use.
The server implementation is kept as simple as possible to facilitate code auditing.
Getting Started
Prerequisites
- Docker
Usage with Claude for Desktop
Add the following configuration to your Claude for Desktop configuration file.
MacOS:
Replace /Users/user-name/ClaudeWorks
with the directory you want to make available to the container.
Windows:
Feed some prompts
To Operate the files in the mounted directory.
Available MCP Tools
Security Considerations
- The MCP server runs as a non-root user within the container
- The container does not have access to the host Docker daemon
- User workspace is mounted from the host for persistence
License
MIT
local-only server
The server can only run on the client's local machine because it depends on local resources.
Allows executing shell commands within a secure Docker container through Claude's MCP interface, providing Kubernetes tools and isolated environment without host Docker daemon access.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA secure MCP server for executing whitelisted shell commands with resource and timeout controls, designed for integration with Claude and other MCP-compatible LLMs.Last updated -203624MIT License
- AsecurityFlicenseAqualityAllows Claude and other AI assistants to interact with Docker through the MCP protocol, enabling container and image management including listing, running, stopping, and pulling Docker resources.Last updated -6534
- AsecurityFlicenseAqualityAn MCP server that provides secure access to Kali Linux cybersecurity tools through Claude's interface, enabling users to run Kali Linux commands directly from Claude Desktop.Last updated -18
- -securityFlicense-qualityAn MCP server that enables Claude to execute bash commands on the host machine with configurable working directories and timeouts.Last updated -