shell command mcp
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.
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.
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.
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.
Add the following configuration to your Claude for Desktop configuration file.
MacOS:
"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"
]
}
Replace /Users/user-name/ClaudeWorks
with the directory you want to make available to the container.
Windows:
"shell-command": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--mount",
"type=bind,src=\wsl.localhostUbuntuhomeuser-nameMCPHome,dst=/home/mcp",
"ghcr.io/kaznak/shell-command-mcp:latest"
]
}
To Operate the files in the mounted directory.
MIT
[
{
"description": "# execute-command This tool executes shell command on bash. Each command execution spawn a new bash process. ",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"command": {
"type": "string"
},
"options": {
"additionalProperties": false,
"properties": {
"cwd": {
"type": "string"
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"timeout": {
"exclusiveMinimum": 0,
"type": "integer"
}
},
"type": "object"
}
},
"required": [
"command",
"options"
],
"type": "object"
},
"name": "execute-command"
}
]