claude-command-runner
Swift-based MCP server that bridges Claude Desktop with terminal applications, enabling seamless command execution with intelligent output retrieval. Features auto-capture, SQLite history, and Warp Terminal integration
claude mcp add --transport stdio m-pineapple-claude-command-runner docker run -i claude-command-runner-image \ --env CLAUDE_COMMAND_RUNNER_PORT="9876 (default) - optional: override server port" \ --env CLAUDE_COMMAND_RUNNER_CONFIG="path to config file if needed"
How to use
Claude Command Runner exposes a suite of tools that let Claude Desktop execute terminal commands, manage workflows, and stream results directly within conversations. It supports a growing set of capabilities including command execution with manual output retrieval, real-time streaming for long-running tasks, template-based command patterns, and environment intelligence to surface context like git state, Node versions, and Docker status. Users can chain commands into pipelines with conditional logic, save reusable templates, and run them with live output or parsed JSON results to build automation workflows from chat.
To use it, connect Claude Desktop to the MCP server instance (via the port and binary path configured in your environment). Once connected, use the available tools such as execute_command for simple commands, execute_pipeline to string together multiple steps with on_fail behaviors, and execute_with_streaming for long-running tasks. You can also save templates for common patterns, run saved templates with variable substitution, and inspect command output in structured JSON when using tools like execute_and_parse or get_command_output. The environment intelligence features provide context about your terminal state, and workspace profiles help you switch project contexts quickly by restoring directory state and environment variables.
How to install
Prerequisites:
- A running MCP server (as described in the repository README)
- Docker installed (if using the Docker-based runner described in this document) or an alternative runtime compatible with your environment
- Access to Claude Desktop for configuring MCP integrations
Step-by-step installation:
-
Install Docker (if not already installed)
- macOS: https://docs.docker.com/desktop/mac/
- Windows: https://docs.docker.com/desktop/windows/
- Linux: follow your distro’s Docker installation guide
-
Run the Claude Command Runner container
# Pull and run the container (example image name used in this guide)
docker pull claude-command-runner-image:latest
docker run -d --name claude-command-runner -p 9876:9876 claude-command-runner-image:latest
- Configure Claude Desktop to connect to the MCP server
- Open Claude Desktop settings and add a new MCP server entry with the following (adjust port if you changed it):
{
"claude-command-runner": {
"command": "/path/to/claude-command-runner/.build/release/claude-command-runner",
"args": ["--port", "9876"],
"env": {}
}
}
-
If you are not using Docker, install or run the binary directly following the repository's build steps and point Claude Desktop to the executable path in the MCP settings.
-
Grant necessary permissions as described in the README (macOS Accessibility, etc.) and restart Claude Desktop.
Additional notes
Notes and tips:
- The MCP server exposes a growing set of tools (30 as of v5.0), including core execution, clipboard access, notifications, environment intelligence, and workspace management. Check the official Tools table in the README to discover available commands.
- When using pipelines and streaming, you can tune behavior with on_fail for each step and update_interval in streaming configurations.
- Templates are stored under the user’s home directory (e.g., ~/.claude-command-runner/templates.json) and persist across sessions.
- If you rebuild or update the binary, you may need to reconfigure macOS Accessibility permissions due to binary identity changes.
- Ensure your environment variables and paths are correctly set in the MCP config to avoid runtime errors.
- For remote or multi-terminal setups, consider using SSH-related capabilities to operate on remote hosts securely.
Related MCP Servers
swift -gui
MCP server that can execute commands such as keyboard input and mouse movement on macOS
evernote
Evernote MCP server - allows LLMs that support MCP (like Claude Desktop) to query your notes in Evernote
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
fast -telegram
Telegram MCP Server and HTTP-MTProto bridge | Multi-user auth, intelligent search, file sending, web setup | Docker & PyPI ready
davinci -professional
An enterprise-grade MCP server that exposes the full functionality of DaVinci Resolve and DaVinci Resolve Studio (through version 20) to either Claude Desktop or Cursor MCP clients. Fully configured and tested as a Claude Desktop Extension making installation as easy as clicking a button. Supports both Windows and Macintosh.
appstore-connect
A Model Context Protocol (MCP) server for Apple's App Store Connect API