macOS Shell MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@macOS Shell MCP ServerCheck disk usage with df -h"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
macOS Shell MCP Server
An MCP server for shell command execution on macOS with session management, background processes, caching, and semantic search.
Installation
git clone https://github.com/quanticsoul4772/macos-shell.git
cd macos-shell
npm install
npm run buildRelated MCP server: TerminusAI
Configuration
Claude Code
Add to ~/.claude.json under mcpServers:
{
"macos-shell": {
"type": "stdio",
"command": "node",
"args": ["/path/to/macos-shell/build/server.js"],
"env": {
"VOYAGE_API_KEY": "your-voyage-api-key"
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"macos-shell": {
"command": "node",
"args": ["/path/to/macos-shell/build/server.js"],
"env": {
"VOYAGE_API_KEY": "your-voyage-api-key"
}
}
}
}The VOYAGE_API_KEY enables semantic search features. Without it, set "EMBEDDINGS_ENABLED": "false" instead.
Tools (41)
Command execution (3)
run_command-- execute a shell commandrun_script-- execute a multi-line shell scriptbatch_execute_enhanced-- execute commands with conditional logic and retries
Sessions (3)
create_shell_session-- create a named session with isolated environmentlist_shell_sessions-- list active sessionsclose_session-- close a session and free resources
Navigation and environment (5)
cd-- change working directorypwd-- get current working directoryset_env-- set environment variablesget_env-- get environment variableshistory-- view command history
Background processes (8)
run_background-- start a background processlist_processes-- list processes with resource usageget_process_output-- retrieve output with searchstream_process_output-- stream output as it arriveskill_process-- terminate a processcleanup_orphans-- manage processes from previous sessionskill_all_matching-- kill processes matching a patternsave_process_output-- save output to a file
System (3)
get_system_health-- system health metricspreflight_check-- validate conditions before operationssystem_profile-- gather system information
SSH (8)
ssh_interactive_start-- start an SSH sessionssh_interactive_send-- send input to SSH sessionssh_interactive_control-- send control charactersssh_interactive_output-- get output with searchssh_interactive_wait-- wait for new outputssh_interactive_resize-- resize terminalssh_interactive_close-- close SSH sessionssh_interactive_list-- list active SSH sessions
Cache management (5)
cache_stats-- cache statisticscache_clear_command-- clear specific command from cachecache_clear_pattern-- clear commands matching a patterncache_mark_never-- mark a command to never cachecache_explain-- explain cache decision for a command
Semantic search (6)
Requires VOYAGE_API_KEY. See docs/SEMANTIC_SEARCH.md for details.
semantic_command_search-- search command history by intentsearch_documentation-- search command docs semanticallyrecommend_commands-- get suggestions based on intenterror_solution_lookup-- find solutions for error messagesanalyze_output-- extract patterns from command outputsemantic_search_stats-- search system statistics
Environment variables
Variable | Description |
| Voyage AI API key for semantic search |
| Set to |
| Set to |
| Set to |
| Path to write log output |
Limitations
macOS only (uses
/bin/zsh)30-second default command timeout (configurable up to 10 minutes)
Commands run with the permissions of the user running the MCP client
Output buffer limited to 300 lines per background process
Sudo commands require passwordless sudo or will hang
Further documentation
Development
See CLAUDE.md for build commands, architecture, testing, and contribution details.
License
ISC
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables AI assistants to securely execute shell commands on local machines through an SSH interface with session management, command execution, and sudo support.Last updated1
- AlicenseBqualityDmaintenanceExecute terminal commands locally or remotely via SSH with session persistence and environment variable support. Manage terminal sessions that maintain state for up to 20 minutes, enabling efficient command execution workflows. Connect using stdio or SSE for flexible integration with AI models and aLast updated11MIT
- Alicense-qualityDmaintenanceEnables LLMs to create and manage persistent, interactive shell sessions with full terminal emulation and PTY support. It allows for sequential command execution and supports interactive programs like vim or htop through specialized streaming and snapshot output modes.Last updated4MIT
- Alicense-qualityDmaintenanceEnables AI services like Claude and Cursor to remotely control a Mac by executing shell commands, managing files, and running AppleScript for UI automation. Access is secured through OAuth 2.0 authentication and encrypted tunnels to protect remote interactions.Last updated2MIT
Related MCP Connectors
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
Operate your Linux servers from your LLM. Every action runs through an auditable allowlist.
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/quanticsoul4772/macos-shell'
If you have feedback or need assistance with the MCP directory API, please join our Discord server