The Command Execution MCP (Model Context Protocol) Server is a secure, controlled tool that allows Claude to execute shell commands directly on your local system. This server provides a safe and flexible way to interact with your computer's command line through Claude's interface.
The server implements multiple layers of security:
Dangerous Command Blocking
rm -rf
, sudo
, etc.Execution Constraints
execute-command
Execute shell commands with optional working directory specification.
Parameters:
command
(required): The shell command to executeworkingDirectory
(optional): Specify the directory for command executionExample Usage in Claude:
execute-command with command="ls -la" and workingDirectory="/Users/yourusername/Documents"
simple-hello
A basic demonstration tool that returns a greeting.
Parameters:
name
(optional): Name to greet (defaults to "World")Example Usage in Claude:
simple-hello with name="Claude"
cd /path/to/command-execution-tool
npm install @modelcontextprotocol/sdk
Add the following to your Claude Desktop configuration file:
Location:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Configuration Block:
{
"mcpServers": {
"command-execution": {
"command": "node",
"args": [
"/full/path/to/command-execution-tool.js"
],
"env": {
"NODE_OPTIONS": "--no-deprecation"
}
}
}
}
Important: Replace /full/path/to/command-execution-tool.js
with the actual path to the script.
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
MIT License
For issues or feature requests, please open a GitHub issue.
Seamless access to top MCP servers powering the future of AI integration.