Mac Shell MCP Server
by cfdude
An MCP server for executing macOS terminal commands with ZSH shell. It provides a secure way to execute shell commands with built-in whitelisting and approval mechanisms.
Last updated: N/A
What is Mac Shell MCP Server?
The Mac Shell MCP Server is a Model Context Protocol server designed to execute macOS terminal commands securely. It uses a ZSH shell and incorporates command whitelisting and approval workflows to prevent unauthorized or dangerous commands from being executed.
How to use Mac Shell MCP Server?
The server can be installed by cloning the repository, installing dependencies, and building the project. It can be started using npm start
or node build/index.js
. Configuration examples are provided for Roo Code and Claude Desktop, both using local installation and NPX methods. The server exposes MCP tools like execute_command
, get_whitelist
, and commands for managing the whitelist.
Key features of Mac Shell MCP Server
Execute macOS terminal commands through MCP
Command whitelisting with security levels (Safe, Requires Approval, Forbidden)
Pre-configured whitelist with common safe commands
Approval workflow for potentially dangerous commands
Comprehensive command management tools
Use cases of Mac Shell MCP Server
Securely execute shell commands from applications like Roo Code and Claude Desktop
Automate macOS tasks with command whitelisting and approval
Control which commands can be executed on a macOS system
Extend the whitelist to include custom commands and scripts
FAQ from Mac Shell MCP Server
What is the purpose of the security levels?
What is the purpose of the security levels?
Security levels categorize commands into Safe (no approval needed), Requires Approval (explicit approval needed), and Forbidden (never executed) to control command execution.
How do I add a command to the whitelist?
How do I add a command to the whitelist?
Use the add_to_whitelist
tool, providing the command, security level, and a description.
What is the recommended way to configure the server with Roo Code and Claude Desktop?
What is the recommended way to configure the server with Roo Code and Claude Desktop?
Using NPX is recommended for a more convenient setup that doesn't require keeping a terminal window open.
How does the server prevent shell injection?
How does the server prevent shell injection?
The server uses Node.js's execFile
instead of exec
to prevent shell injection vulnerabilities.
Where can I find more information about the license?
Where can I find more information about the license?
The server is licensed under the MIT License. Details can be found in the LICENSE file in the project repository.