Shell Command MCP Server
Execute pre-configured and secure shell commands via a Go-based MCP server.
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 executeshell(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-shell
Add 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:
- Only allow commands you trust - a restrictive allowlist is recommended
- Avoid allowing commands that could modify system settings or access sensitive data
- The server runs with the permissions of the user running Claude Desktop
- 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.
Verwandte Server
Alpha Vantage MCP Server
SponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Context
Local-first documentation for AI agents. Indexes docs from any git repo into SQLite for offline, instant, private access to up-to-date library documentation.
ChemMCP
A collection of 19 professional tools for chemical molecular processing based on the Model Context Protocol (MCP).
AWS CDK MCP Server
Offers guidance and tools for AWS CDK, covering best practices, security compliance with CDK Nag, infrastructure validation, and pattern discovery.
Markdown Sidecar MCP Server
Serve and access markdown documentation for locally installed NPM, Go, or PyPi packages.
RunwayML + Luma AI
Interact with the RunwayML and Luma AI APIs for video and image generation tasks.
Jetbrains Debugger MCP Plugin
Allows AI assistants to remotely drive the JetBrains debugger via MCP, including breakpoints, stepping, and variable inspection.
openapi-to-mcp
Expose API endpoints as strongly typed tools from an OpenAPI specification. Supports OpenAPI 2.0/3.0 in JSON or YAML format, from local or remote files.
Kubernetes MCP Server
Inspect and debug Kubernetes clusters with read-only access to resources, CRDs, and pod logs.
Botoi MCP Server
150+ developer utility APIs via MCP. Hashing, encoding, DNS lookup, IP geolocation, QR codes, JWT tools, URL shortening, email validation, screenshot capture, and more.
Bernstein
Multi-agent orchestration MCP server. Start parallel agent runs, manage task queues, track costs, and verify quality gates across 20+ CLI coding agents.