mcp-unix-shell
Shell Command MCP Server
Documentation
Shell Command MCP Server
Go server implementing Model Context Protocol (MCP) for executing shell commands.
Features
- Execute shell commands using bash or zsh
- List previous command executions
- Safety features to limit allowed commands
- Configure allowed command set for security
Note: The server will only allow execution of commands specified via the allowedCommands parameter or all commands if configured with "*".
API
Tools
- execute_command
- Execute a shell command
- Input:
- `command` (string): The command to execute
- `shell` (string, optional): The shell to use (bash or zsh, defaults to bash)
- Output:
- Command output with both stdout and stderr
- Exit code
- Execution time
- list_recent_commands
- List recently executed commands
- Input:
- `limit` (integer, optional): Number of commands to return (defaults to 10)
- Output:
- List of recently executed commands with timestamps and status
- list_allowed_commands
- List all commands that the server is allowed to execute
- No input required
- Returns:
- List of allowed commands or "*" if all commands are allowed
Usage with Claude Desktop
Install the server
go install github.com/gamunu/mcp-unix-shellAdd this to your `claude_desktop_config.json`:
{
"mcpServers": {
"shell": {
"command": "mcp-unix-shell",
"args": [
"--allowed-commands=ls,cat,echo,find"
]
}
}
}To allow all commands (use with caution):
{
"mcpServers": {
"shell": {
"command": "mcp-unix-shell",
"args": [
"--allowed-commands=*"
]
}
}
}Security Considerations
When using this MCP server, please consider:
1. Only allow commands you trust - a restrictive allowlist is recommended
2. Avoid allowing commands that could modify system settings or access sensitive data
3. The server runs with the permissions of the user running Claude Desktop
4. Command output is sent back to the LLM, so be mindful of sensitive information
License
This MCP server is licensed under the Apache License 2.0.
Frequently asked questions
What is mcp-unix-shell?
mcp-unix-shell is Shell Command MCP Server
How do I install mcp-unix-shell?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-unix-shell open source?
Yes — it is hosted on GitHub at https://github.com/gamunu/mcp-unix-shell and has 2 stars.
Related MCP tools
eBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
The missing open-source Kubernetes UI with a built-in MCP server for AI agents. See what's broken, why, and what changed. Issues, Topology, event timeline, Helm, GitOps, live service traffic, and cluster audits - all in one Go binary.
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
The Terraform MCP Server provides seamless integration with Terraform ecosystem, enabling advanced automation and interaction capabilities for Infrastructure as Code (IaC) development.
Run MATLAB® using AI applications with the official MATLAB MCP Server from MathWorks®. This MCP server for MATLAB supports a wide range of coding agents like Claude Code® and Visual Studio® Code.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP