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.
Server Terkait
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Remote MCP Server Authless Test
An example of deploying a remote MCP server on Cloudflare Workers without authentication.
Remote MCP Server on Cloudflare
A remote MCP server deployable on Cloudflare Workers with OAuth login support and local development capabilities.
BuiltWith
Query the BuiltWith API to discover the technology stacks of websites. Requires a BuiltWith API key.
Postman MCP Generator
Provides JavaScript tools for making API requests, generated by the Postman MCP Generator.
Code Context Provider MCP
Provides code context and analysis for AI assistants using WebAssembly Tree-sitter parsers.
MCP Chaos Rig
A local MCP server that breaks on demand. Test your client against auth failures, disappearing tools, flaky responses, and token expiry, all from a web UI.
YAPI MCP PRO
An MCP server for the YApi interface management platform, enabling direct operation and full lifecycle management within AI editors.
Remote MCP Server on Cloudflare
An example of a remote MCP server deployable on Cloudflare Workers, without authentication.
Kodus OSV
Open source vulnerability lookup via osv_query/osv_query_batch tools.
Google Apps Script MCP Server
Manage Google Apps Script projects, including creation, editing, deployment, and execution. Requires Google Cloud credentials for authentication.