Mac Shell MCP Server

An MCP (Model Context Protocol) server for executing macOS terminal commands with ZSH shell. This server provides a secure way to execute shell

Local serverstdioPython

What is the Mac Shell MCP Server?

An MCP (Model Context Protocol) server for executing macOS terminal commands with ZSH shell. This server provides a secure way to execute shell commands with

What the server does

  • Execute macOS terminal commands through MCP
  • Command whitelisting with security levels:
  • Safe — Commands that can be executed without approval
  • Requires Approval — Commands that need explicit approval before execution
  • Forbidden — Commands that are explicitly blocked
  • Pre-configured whitelist with common safe commands

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
pwdPrint working directory
echoPrint text to standard output
catConcatenate and print files
grepSearch for patterns in files
findFind files in a directory hierarchy
headOutput the first part of files
tailOutput the last part of files
mkdirCreate directories
touchChange file timestamps or create empty files
chmodChange file mode bits
chownChange file owner and group
sudoExecute a command as another user
execute_command
get_whitelist

How to install the Mac Shell MCP Server

{
  "mcpServers": {
    "mac-shell": {
      "command": "npx",
      "args": ["-y", "Add"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • “Use Mac Shell to pwd.”
  • “Use Mac Shell to echo.”
  • “Use Mac Shell to cat.”

Frequently asked questions

Safe commands include ls, pwd, echo, cat, grep, find, cd, head, tail, and wc. These execute without approval.