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?

If you already use Mac Shell, the mac shell mcp server is the piece that lets your assistant work with it directly. 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 built-in whitelisting and approval mechanisms.

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

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • pwd — Print working directory
  • echo — Print text to standard output
  • cat — Concatenate and print files
  • grep — Search for patterns in files
  • find — Find files in a directory hierarchy
  • head — Output the first part of files
  • tail — Output the last part of files
  • mkdir — Create directories
  • touch — Change file timestamps or create empty files
  • chmod — Change file mode bits
  • chown — Change file owner and group
  • sudo — Execute a command as another user

Installation

Installation goes through your MCP client rather than a global install: point it at Add on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Where it fits

Among the file and storage access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Mac Shell's toolset — pwd, echo, cat and 11 more — is a fair guide to whether it matches your workflow. It is maintained by cfdude; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Mac Shell.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

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_commandThe execute_command tool exposed by this server.
get_whitelistThe get_whitelist tool exposed by this server.

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.