warp-command-runner
This MCP server gives AI hosts terminal automation and macOS/Warp integration for running commands, managing sessions, and inspecting environments.
Execute terminal commands, including auto-retrieval, streaming output, previews, and retrieving previous output.
Run multi-step pipelines with stop/continue/warn failure handling.
Suggest commands and check whether commands are interactive before execution.
Save, list, run, and delete reusable command templates with variables.
View recent command history, statuses, durations, and exit codes; run health checks.
Copy to and read from the macOS clipboard; configure notification preferences.
Inspect environment context, capture environment snapshots, and diff snapshots.
Save, load, list, and delete workspace profiles, optionally generating Warp launch configs.
Open, send commands to, list, close, and clean up terminal sessions/tabs.
Add, remove, and list file-system watchers that trigger commands on changes.
Execute remote SSH commands and manage saved SSH profiles.
Focus Warp panes, emit Warp OSC 777 events, and report shell shim status.
Integrates with Warp Terminal to route commands visibly into the active Warp tab, open Warp tabs via warp:// deeplinks, send commands to Warp sessions, surface status through OSC 777 cli-agent events, and manage workspace profiles as Warp launch configurations.
Warp Command Runner
Give any chat AI a real terminal. You ask in Warp, Claude Desktop, ChatGPT desktop, or any other MCP host. The model types the command into your Warp tab, captures the output, and tells you what happened. Forty tools: command execution, project setups, file watching, SSH, clipboard, environment intelligence. macOS, Swift, open source.
This is for people who don't live in Cursor or Claude Code. If you already chat with Grok, ChatGPT, Claude, or Gemini from a desktop app (especially Warp's agent panel), add this MCP and that chat can read your files and run commands on your machine.
Built for Warp Terminal. The five most powerful tools route commands visibly into your active Warp tab. Register the same binary with as many MCP hosts as you want — the server speaks standard MCP over stdio and does not care which model is calling.
Can any cloud AI use this? Any local MCP host can, over stdio. Phone apps and websites need remote MCP: you run --http and publish HTTPS with a tunnel you own. Guide: docs/REMOTE.md. Matrix: docs/COMPATIBILITY.md.
What's new in v8.0.2
Release 8.0.2 builds with swift-sdk 0.12.1 (no local patch) and ships a committed Package.resolved so a fresh clone resolves the same versions. Remote --http pairing from 8.0.1 still applies: a one-time code shown on the Mac authorizes a new client. Remote-mode users should update and delete ~/.warp-command-runner/oauth-store.json to re-pair. Details: docs/REMOTE.md.
The data folder is ~/.warp-command-runner unless you set WCR_HOME (see Data directory).
Related MCP server: mcp2term
Quick start
You need macOS 13 or later, Swift 6.0+ (Xcode 16+), and a local MCP host such as Warp Agent or Claude Desktop.
git clone --branch v8.0.4 --depth 1 https://github.com/M-Pineapple/warp-command-runner.git
cd warp-command-runner
./build.sh./build.sh resolves packages, applies the required swift-sdk patch, builds the release binary, and wraps it in .build/release/warp-command-runner.app.
Point your host at the binary inside that bundle. For Warp Agent, merge this into ~/.warp/.mcp.json and replace the path with yours:
{
"mcpServers": {
"warp-command-runner": {
"command": "/absolute/path/to/warp-command-runner/.build/release/warp-command-runner.app/Contents/MacOS/warp-command-runner",
"args": []
}
}
}Restart the host. Ask it to run swift --version. That uses execute_pipeline and needs no Accessibility grants.
Data directory
Config, command history, templates, and SSH profiles live in ~/.warp-command-runner. Set WCR_HOME to use a different folder. The value must be an absolute path or start with ~/. Relative values are ignored. macOS ignores a process-level HOME= for FileManager.homeDirectoryForCurrentUser, so WCR_HOME is the supported override. The folder is created with owner-only permissions (0700). ConfigManager uses the same resolution.
{
"mcpServers": {
"warp-command-runner": {
"command": "/absolute/path/to/warp-command-runner/.build/release/warp-command-runner.app/Contents/MacOS/warp-command-runner",
"args": [],
"env": {
"WCR_HOME": "~/wcr-test"
}
}
}
}When WCR_HOME is set to a valid path, the server does not copy ~/.claude-command-runner into that folder.
An unsigned build is enough for the 34 non-keystroke tools. The five Warp-routing tools need a signed .app in /Applications/. Host snippets, signing, and the Sequoia recipe are under Installation. Phone and website hosts need --http plus your own HTTPS tunnel. See docs/REMOTE.md.
What's new in v8.0.0 — remote MCP
Opt-in Streamable HTTP so Grok, ChatGPT, and Claude can call this Mac from a phone or a website. You create the public HTTPS URL (your Cloudflare tunnel, your Tailscale Funnel, or your reverse proxy). This project does not host a relay.
warp-command-runner --httplistens on127.0.0.1only (default port 8741)OAuth 2.1 with PKCE and Dynamic Client Registration
Warp-routing (keystroke) tools stay off for remote callers; use
execute_pipeline--remote-doctorand--install-agentfor a login LaunchAgent
Local stdio is unchanged. Details: docs/REMOTE.md.
What's new in v7.0.0 — rebrand
Formerly Claude Command Runner. Same engine, host-agnostic name:
Product, binary, bundle ID, and config dir renamed to Warp Command Runner (
warp-command-runner,~/.warp-command-runner)Existing
~/.claude-command-runnerdata is copied on first launch (the old folder is left in place)MCP
serverInfoname isWarp Command Runnerso every host lists it that wayConfig snippets for Warp, Claude Desktop, ChatGPT desktop, Cursor, VS Code, and a generic stdio host
Honest compatibility doc: stdio MCP works everywhere a local host exists. Remote MCP is opt-in in v8 (
docs/REMOTE.md).
v6.x history (Warp deeplinks, OSC 777, dual-consumer Warp Agent, 40 tools) is unchanged — see CHANGELOG.md.
Overview
Warp Command Runner is an MCP server. One binary, any MCP client:
Execute terminal commands from a conversation
Chain commands with pipelines and failure modes
Stream output for long builds
Save and reuse command templates with variables
Auto-capture output with intelligent timing
Track command history
Read/write the macOS clipboard
Probe environment context (git, venv, Docker, Node)
Parse command output into structured JSON
Manage workspace profiles (optionally as Warp launch configs)
Open Warp tabs via
warp://deeplinks and send commands to the active tabWatch files and trigger commands on changes
Execute commands on remote hosts via SSH
Surface status into Warp as OSC 777
warp://cli-agenteventsOptional shell shim: preexec / command-finished events over a Unix socket
🧭 Which app should I register this with?
The protocol is MCP. The value depends on whether the host is local and whether Warp is your terminal. Details in docs/COMPATIBILITY.md.
Host | Config | Recommended? |
Warp Agent (Grok, Claude, GPT, Gemini — whatever Warp is set to) |
| Yes — best fit. See docs/WARP_AGENT.md |
Claude Desktop |
| Yes |
ChatGPT desktop (Connectors / Developer Mode) | host MCP settings; snippet in | Yes, if your plan exposes local MCP |
VS Code / Continue / Cline / Windsurf | their MCP settings; see | Optional |
Cursor |
| Optional — Cursor already has a terminal |
Claude Code |
| Niche — it already has Bash |
Browser / phone chats (chatgpt.com, grok.com, claude.ai) | custom connector URL | Optional — needs v8 |
Quick decision tree
You use Warp and chat with Grok / ChatGPT / Claude / Gemini inside Warp? → Register in
~/.warp/.mcp.json. That's the whole product.You use Claude Desktop (or ChatGPT desktop) and want commands visible in Warp? → Register there too. Same binary.
You use Cursor or Claude Code and want everything in one pane? → You probably don't need this.
You only use a website or phone chatbot? → Stdio cannot reach that tab. Enable remote MCP (
docs/REMOTE.md) or use a desktop MCP host.
Five of the 40 tools (execute_command, execute_with_auto_retrieve, execute_with_streaming, run_template, send_to_session) are the Warp-routing ones. The rest are ordinary server-side utilities (clipboard, SSH, snapshots, …) that work from any host.
🎯 Key Features
Command Pipelines
Chain multiple commands with intelligent failure handling:
{
"steps": [
{"name": "Build", "command": "swift build", "on_fail": "stop"},
{"name": "Test", "command": "swift test", "on_fail": "continue"},
{"name": "Package", "command": "swift build -c release", "on_fail": "stop"}
]
}Failure modes:
stop– Halt pipeline on failurecontinue– Log error and proceed to next stepwarn– Show warning and continue
Output Streaming
Real-time output for long-running commands:
{
"command": "swift build -c release",
"update_interval": 3,
"max_duration": 180
}Perfect for:
Long compilation processes
Test suites
Any command that previously "hung" waiting for output
Command Templates
Save reusable patterns with variable substitution:
// Save a template
{
"name": "swift-release",
"template": "cd {{project}} && swift build -c release",
"category": "Swift Development",
"description": "Build Swift project in release mode"
}
// Run with variables
{
"name": "swift-release",
"variables": {"project": "~/GitHub/MyApp"}
}Templates are stored in ~/.warp-command-runner/templates.json and persist across sessions.
Smart Auto-Retrieve
The execute_with_auto_retrieve command intelligently detects command types and adjusts wait times:
Quick commands (echo, pwd): 2-6 seconds
Moderate commands (git, npm): up to 20 seconds
Build commands (swift build, make): up to 77 seconds
Test commands: up to 40 seconds
📊 Why Warp Terminal?
Warp Terminal is the primary integration target. Other terminals work for the basics — Warp uniquely unlocks deeplinks, OSC 777, the native agent panel, and launch configs:
Feature | Warp | Terminal.app | iTerm2 |
| ✅ | ❌ | ❌ |
Native MCP agent panel — chat with Grok, ChatGPT, Claude, Gemini in the terminal | ✅ ( | ❌ | ❌ |
OSC 777 cli-agent event channel for status surfacing | ✅ | ❌ | ❌ |
Workspace profile → recognized launch config | ✅ ( | ❌ | ❌ |
AppleScript-driven new tab + keystroke send | ✅ | ✅ | ✅ |
Modern UI/UX | ✅ | ⚠️ | ⚠️ |
Output capture (/tmp/<id>.json polling) and the tools that don't touch the terminal (clipboard, SSH, file watch, env snapshots, etc.) work identically across all terminals.
Download Warp from warp.dev. It is free, and the Warp-specific surfaces above need it.
Installation
Prerequisites
macOS 13.0 or later
Swift 6.0+ (Xcode 16+)
At least one local MCP host (Warp Agent, Claude Desktop, ChatGPT desktop, VS Code, …) — not a browser chat tab
A supported terminal (Warp strongly recommended)
Quick Install
Clone and build:
git clone https://github.com/M-Pineapple/warp-command-runner.git
cd warp-command-runner
# For the 5 keystroke-routing tools (execute_command, etc.) to work, the build
# must be SIGNED with your code-signing identity. build.sh auto-detects a single
# Apple Development / Developer ID identity; to be explicit (or if you have
# several), export it first — find yours with:
# security find-identity -v -p codesigning
export WCR_CODESIGN_IDENTITY="<your-cert-sha1>" # optional if auto-detect finds one; persist in ~/.zshrc
./build.shOnly need the 34 non-keystroke tools (incl.
execute_pipeline)? An unsigned build is fine — skip theexport.
./build.sh writes two things: the app bundle .build/release/warp-command-runner.app (use this) and the bare binary .build/release/warp-command-runner. It does not install anything into /Applications/. To use the /Applications/ paths in the snippets below, copy the bundle there yourself:
cp -R .build/release/warp-command-runner.app "/Applications/Warp Command Runner.app" Or skip the copy and point your host at $(pwd)/.build/release/warp-command-runner.app/Contents/MacOS/warp-command-runner (the 5 keystroke-routing tools need the bundle in /Applications/; see the Sequoia recipe below).
Pick your MCP host(s) — you can register the same binary in several. Point at the binary inside the
.appbundle (macOS Sequoia+ needs the Info.plist for TCC prompts on the 5 keystroke-routing tools):A — Warp Agent (
~/.warp/.mcp.json) — Grok, ChatGPT, Claude, Gemini, whichever Warp is set to:{ "mcpServers": { "warp-command-runner": { "command": "/Applications/Warp Command Runner.app/Contents/MacOS/warp-command-runner", "args": [] } } }See
docs/WARP_AGENT.md.B — Claude Desktop (
~/Library/Application Support/Claude/claude_desktop_config.json) — same JSON shape as Warp Agent.C — Cursor (
~/.cursor/mcp.json) — the/Applications/...path contains spaces, so keep it as one quoted JSON string:{ "mcpServers": { "warp-command-runner": { "command": "/Applications/Warp Command Runner.app/Contents/MacOS/warp-command-runner", "args": [] } } }If Cursor reports
spawn /Applications/Warp ENOENT, it split the path on spaces. Runhelper/install-cursor-wrapper.shand pointcommandat~/.local/bin/warp-command-runnerinstead. Seeconfig/cursor-mcp.json.ChatGPT desktop, VS Code, Continue: copy a snippet from
config/ordocs/COMPATIBILITY.md.After
./build.shyou can also point at$(pwd)/.build/release/warp-command-runner.app/Contents/MacOS/warp-command-runnerbefore copying the bundle to/Applications/.Upgrading from v6.0.0–6.0.2? Edit your existing config file and append
.app/Contents/MacOS/warp-command-runnerto the path. The legacy bare-binary path still works for the 34 non-keystroke tools, butexecute_command/execute_with_auto_retrieve/execute_with_streaming/run_template/send_to_sessionwill silently fail without the bundle path.Grant Accessibility permission (only required for
send_to_sessionkeystroke injection in v6.0; tab/window opening uses deeplinks and does not require it):Open System Settings → Privacy & Security → Accessibility
Click + and navigate to
warp-command-runner/.build/release/Press Cmd+Shift+. to reveal the hidden
.buildfolderSelect the
warp-command-runnerbinary and toggle it on
Important: macOS tracks permissions by binary identity. After every rebuild (
./build.sh), you must remove the old entry and re-add the new binary in Accessibility settings.
Restart your MCP host(s) (Warp, Claude Desktop, ChatGPT desktop, …).
(Optional) Install the shell shim for cleaner block-boundary capture:
helper/install-shim.shSee
helper/shell-shim.zsh/helper/shell-shim.bashfor the implementation. Uninstall withhelper/uninstall-shim.sh.
Linux and containers
The server is built for macOS, but the stdio server also builds and runs on Linux, so registries such as Glama can start it in a container to check it:
docker build -t warp-command-runner .
docker run -i --rm warp-command-runnerOn Linux it lists the same 40 tools. The ten that drive Warp or other macOS apps (execute_command, execute_with_auto_retrieve, execute_with_streaming, run_template, send_to_session, open_terminal_tab, focus_warp_session, copy_to_clipboard, read_from_clipboard, add_file_watch) return a "needs macOS" error. execute_pipeline, execute_and_parse, ssh_execute and the history, template and analysis tools work. Remote mode (--http, --install-agent) is macOS only.
Upgrading from a previous version
If you already have a signed install working (TCC permissions granted), upgrading is:
cd warp-command-runner
git pull
# Rebuild with the SAME signing identity you used originally. Without it, build.sh
# falls back to an ad-hoc-signed bundle, macOS sees a new identity, and your
# keystroke (TCC) grants stop applying → error 1002 on execute_command.
# (build.sh auto-detects a single identity; export to be explicit.)
export WCR_CODESIGN_IDENTITY="<your-cert-sha1>" # persist in ~/.zshrc so you don't forget
./build.sh
# Confirm it signed with your cert (NOT adhoc) BEFORE replacing your good bundle:
codesign -dvv .build/release/warp-command-runner.app 2>&1 | grep -E "Authority=Apple|Signature=adhoc"
# Replace the deployed bundle (rm first — cp -R onto an existing .app nests it):
rm -rf "/Applications/Warp Command Runner.app"
cp -R .build/release/warp-command-runner.app "/Applications/Warp Command Runner.app"Then restart your MCP host. If you upgraded from v6 and kept the same signing certificate, existing TCC grants on com.m-pineapple.claude-command-runner do not transfer to com.m-pineapple.warp-command-runner — re-grant Accessibility / Input Monitoring / Full Disk Access / Automation for the new bundle once. After that, same-cert rebuilds keep the grants.
If you use remote --http mode, delete ~/.warp-command-runner/oauth-store.json after installing 8.0.1 and connect again so the new pairing code is required.
🛡️ macOS Sequoia full setup recipe (the 7 ordered steps)
If
execute_command/execute_with_auto_retrieve/execute_with_streaming/run_template/send_to_sessionfail withosascript is not allowed to send keystrokes (1002)even though you've toggled every panel in System Settings, follow this in order — skipping any step leaves a silent denial somewhere in the chain. The other 34 tools work without any of this;execute_pipelineis a fully-functional substitute if you want to skip the whole TCC saga entirely.This is the empirically-verified recipe from a real 6-hour debugging session. v6.0.3+ ships the bundle infrastructure that makes this possible; v6.0.4 is this documentation pass.
The denial pattern. macOS Sequoia's TCC and sandbox have layered, non-obvious requirements for CLI binaries that drive osascript → System Events → keystroke. The error message is misleading — the actual block usually isn't keystroke permission; it's an earlier preflight check that silently aborts the chain. The five gates, in the order macOS evaluates them:
Gate | TCC service | What grants it |
1. Bundle promptability | (n/a — policy) | Bundle in |
2. Bundle identity stable | (n/a — codesign) | Signed with a stable cert (cdhash doesn't drift across rebuilds) |
3. Sandbox FDA preflight |
| Full Disk Access grant on the bundle |
4. AppleEvents |
| Automation → System Events ☑ |
5. Keystroke synthesis |
| Input Monitoring + Accessibility |
Step 1 — Have an Apple Development cert (or self-signed Code Signing cert)
If you have a paid Apple Developer account, you already have one (check via security find-identity -v -p codesigning). If not, create a self-signed one:
Keychain Access → menu Certificate Assistant → Create a Certificate…
Name:
warp-command-runner, Identity Type: Self Signed Root, Certificate Type: Code SigningClick Create → Continue through warnings → Done
Export the cert identifier for build.sh to find:
# Get the SHA-1 hash (more reliable than the cert name)
security find-identity -v -p codesigning
# Then in your shell rc (~/.zshrc, ~/.config/fish/config.fish, etc.):
export WCR_CODESIGN_IDENTITY="<the-sha1-hash-from-above>"Step 2 — Build (creates the signed .app bundle)
./build.shbuild.sh invokes scripts/make-app-bundle.sh, which wraps the CLI in .build/release/warp-command-runner.app/ with a proper Info.plist (CFBundleIdentifier com.m-pineapple.warp-command-runner, the three required NSXxxUsageDescription strings, LSUIElement=true). If WCR_CODESIGN_IDENTITY is set, the bundle is signed with that cert as a unit — stable cdhash across rebuilds.
Verify:
codesign --display --verbose=4 .build/release/warp-command-runner.app | grep -E 'Identifier|TeamIdentifier|CDHash'
codesign --verify --deep --strict .build/release/warp-command-runner.app # should succeed silentlyStep 3 — Install the bundle into /Applications/ (CRITICAL)
macOS refuses to prompt for TCC permissions on bundles in .build/release/ or other dev directories. The bundle must live in /Applications/. Copy it:
cp -R .build/release/warp-command-runner.app "/Applications/Warp Command Runner.app"Verify the signature survived the copy:
codesign --verify --deep --strict "/Applications/Warp Command Runner.app"Step 4 — Point your MCP config at the /Applications/ path
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"warp-command-runner": {
"command": "/Applications/Warp Command Runner.app/Contents/MacOS/warp-command-runner",
"args": []
}
}
}Mirror in ~/.warp/.mcp.json if you use the Warp Agent path.
Step 5 — Reset stale TCC entries for the bundle ID
If you've been struggling with TCC denials previously, your TCC.db likely has stale Denied entries from earlier rebuilds with different cdhashes. Wipe them for the bundle:
for svc in AppleEvents ListenEvent PostEvent Accessibility; do
tccutil reset "$svc" com.m-pineapple.warp-command-runner
doneEach line should print "Successfully reset". If you see "no entries", that's also fine — means TCC had nothing recorded yet.
Step 6 — Grant the three TCC permissions (Full Disk Access is the surprise one)
In System Settings → Privacy & Security, add /Applications/Warp Command Runner.app to each of:
Full Disk Access — unexpected but mandatory. macOS sandbox does a preflight check for
kTCCServiceSystemPolicyAllFilesbefore allowing osascript to spawn for keystroke chains. Without FDA on the bundle, the sandbox denies before TCC's AppleEvents check ever fires, and you get the misleading "send keystrokes" error.Input Monitoring — for
kTCCServiceListenEvent/kTCCServicePostEvent(synthetic keystroke generation).Accessibility — for the
keystrokeAppleEvent action itself.
Each grant requires Touch ID / admin password to confirm. Bundle name appears as "Warp Command Runner" in the panels.
Step 7 — Restart Claude Desktop, trigger once, grant the Automation prompt
⌘Q Claude Desktop, reopen. On your first execute_command, macOS may show one more prompt — Automation → "Warp Command Runner wants to control System Events" — click Allow. After that, it's permanent. Future rebuilds don't reset anything (the cert keeps cdhash stable; the bundle keeps the identity stable).
Diagnostic: what does TCC see right now?
If something doesn't work after the recipe, the only reliable way to figure out which gate is failing is the TCC log:
log show --predicate 'process == "tccd"' --last 30s --info --debug \
| grep -E 'AUTHREQ_CTX|AUTHREQ_RESULT|m-pineapple|promptPolicy|Service Policy'Trigger an execute_command first, then immediately run the above. Read it for:
service="kTCCServiceXxx"— which permission category is being checkedpromptPolicy = 0→ macOS refuses to even prompt; usually a location problem (bundle not in/Applications/)promptPolicy = 2+Denied (Service Policy)→ you're missing the permission for the named serviceAttributionChain: responsible={identifier=com.m-pineapple.warp-command-runner, ...}→ good, TCC is identifying us correctly
If you really can't get it working
execute_pipeline is a fully-functional substitute for execute_command:
// instead of execute_command: {"command": "git status"}
// use:
{"steps": [{"command": "git status"}]}Pure subprocess, no AppleScript, no TCC layer, captures output cleanly, works on any macOS version regardless of permissions. The visible side-effect (command appearing in your Warp tab) is the only thing you lose — for most agent workflows that's not what you actually need anyway.
Usage
Available Tools (40)
On --http sessions the five Warp-routing tools are refused unless remote.allowKeystrokeTools is true. Use execute_pipeline. See docs/REMOTE.md.
Core Execution
Tool | Description | Use Case |
| Execute with manual output retrieval | Simple commands |
| Execute with intelligent auto-retrieval | Most common usage ⭐ |
| Chain commands with conditional logic | Build workflows, CI/CD |
| Real-time output streaming | Long builds, test suites |
| Save reusable command pattern | Create shortcuts |
| Execute saved template with variables | Run saved patterns |
| View all saved templates | Manage templates |
| Remove a saved template by name | Manage templates |
| Manually retrieve command output | Debugging |
| Preview without executing | Safety check |
| Suggest commands (pass | Discovery |
| View command history | Analytics |
| System health diagnostics | Troubleshooting |
Clipboard (v5.0)
Tool | Description | Use Case |
| Write text to macOS clipboard | Share output |
| Read current clipboard content | Paste context |
Notifications (v5.0)
Tool | Description | Use Case |
| Toggle macOS notifications | Personalisation |
Environment Intelligence (v5.0)
Tool | Description | Use Case |
| Probe git, venv, Node, Docker state | Context awareness |
| Execute and parse output to structured JSON | Smart output |
| Snapshot your real shell environment (sources your login profile) | Before/after comparison |
| Compare two environment snapshots | Change detection |
Workspace Profiles (v5.0)
Tool | Description | Use Case |
| Save project context as named profile | Project switching |
| Restore a saved project context. Required: | Resume work |
| View all saved profiles | Organisation |
| Remove a workspace profile | Cleanup |
Multi-Terminal Sessions (v5.0)
Tool | Description | Use Case |
| Open a new named terminal tab (Warp: via | Long-running processes |
| Send command to a specific tab (AppleScript keystroke; tab-targeting limited on Warp) | Targeted execution |
| View active terminal sessions | Session overview |
| Close a named session | Cleanup |
| Bulk-remove stale sessions; optionally close their tabs | Hygiene |
Interactive Command Detection (v5.0)
Tool | Description | Use Case |
| Classify a command for TTY/stdin requirements before running it | Avoid hangs from |
File Watching (v5.0)
Tool | Description | Use Case |
| Watch directory and trigger command on changes | Auto-rebuild, auto-test |
| Stop watching a directory. Required: | Cleanup |
| View active watchers | Overview |
SSH Remote Execution (v5.0)
Tool | Description | Use Case |
| Run a command on a remote host via SSH. Required: | Remote ops |
| Save SSH connection profile | Quick connect |
| View saved SSH profiles | Overview |
| Remove an SSH profile | Cleanup |
Warp v6.0 — deeplinks, OSC 777, shell shim
Tool | Description | Use Case |
| Dispatch | Resume work in a specific pane |
| Build a | Status notifications |
| Report optional shell-shim socket state and recent events | Verify shim is wired up |
Example Workflows
Simple Command:
You: "Check my Swift version"
Assistant: [execute_with_auto_retrieve: swift --version]
Assistant: "You're running Swift 6.0.2"Build Pipeline:
You: "Build, test, and package my app"
Assistant: [execute_pipeline with build → test → package steps]
Assistant: "Pipeline complete! Build: ✅ Test: ✅ Package: ✅"Streaming Long Build:
You: "Build this large project"
Assistant: [execute_with_streaming: swift build -c release]
Assistant: "Building... [live updates every 3 seconds]"
Assistant: "Build completed in 45 seconds!"Using Templates:
You: "Save a template for deploying to staging"
Assistant: [save_template: name="deploy-staging", template="cd {{project}} && ./deploy.sh staging"]
You: "Deploy MyApp to staging"
Assistant: [run_template: name="deploy-staging", variables={project: "MyApp"}]Environment Context (v5.0):
You: "What's my current dev environment?"
Assistant: [get_environment_context]
Assistant: "You're on branch feature/auth, Python venv active, Node 20.11, 3 Docker containers running."Workspace Profiles (v5.0):
You: "Save this as my API project profile"
Assistant: [save_workspace_profile: name="api-project", directory="~/Projects/api", ...]
You: "Switch to the API project"
Assistant: [load_workspace_profile: name="api-project"]File Watching (v5.0):
You: "Rebuild whenever a Swift file changes"
Assistant: [add_file_watch: path="./Sources", pattern="*.swift", command="swift build"]
Assistant: "Watching ./Sources for *.swift changes. Will run swift build on each change."SSH Remote Execution (v5.0):
You: "Check disk space on the staging server"
Assistant: [ssh_execute: host="staging.example.com", username="deploy", command="df -h"]
Assistant: "Here's the disk usage on staging..."Configuration
The configuration file is located at ~/.warp-command-runner/config.json:
{
"terminal": {
"preferred": "auto",
"fallbackOrder": ["Warp", "WarpPreview", "iTerm", "Terminal"]
},
"security": {
"blockedCommands": ["rm -rf /", "format"],
"maxCommandLength": 1000
},
"history": {
"enabled": true,
"maxEntries": 10000
},
"notifications": {
"enabled": true,
"soundEnabled": true,
"showOnSuccess": false,
"showOnFailure": true,
"minimumDuration": 10
},
"fileWatching": {
"maxWatchers": 5,
"defaultDebounce": 2.0,
"autoExpireMinutes": 60
},
"ssh": {
"defaultTimeout": 30,
"allowPasswordAuth": false
},
"interactiveDetection": {
"enabled": true,
"customPatterns": []
}
}Templates are stored separately at ~/.warp-command-runner/templates.json.
Workspace profiles are stored at ~/.warp-command-runner/profiles.json.
SSH profiles are stored at ~/.warp-command-runner/ssh_profiles.json.
🤔 Frequently Asked Questions
Q: Can Grok, ChatGPT, or Gemini use this — not just Claude?
A: Yes, if you chat inside a local MCP host. Warp's agent panel is the usual path: set Warp's model to Grok (or GPT, Claude, Gemini) and register this server in ~/.warp/.mcp.json. ChatGPT desktop and Claude Desktop work the same way. Browser tabs on grok.com / chatgpt.com / claude.ai cannot launch a local process. Full matrix: docs/COMPATIBILITY.md.
Q: What's new in v8.0.2?
A: swift-sdk 0.12.1 with a committed Package.resolved, so ./build.sh on a fresh clone no longer needs a local SDK patch. Pairing from 8.0.1 is unchanged.
Q: What's new in v8.0.1?
A: Remote --http mode now requires a one-time pairing code shown on the Mac to authorize a new client. Update, then delete ~/.warp-command-runner/oauth-store.json and connect again. See docs/REMOTE.md.
Q: What's new in v8.0.0?
A: Opt-in remote MCP. warp-command-runner --http serves Streamable HTTP on loopback with OAuth 2.1. You publish HTTPS with your own tunnel. Phone and website connectors can then call this Mac. Keystroke tools stay off remotely. See docs/REMOTE.md.
Q: What's new in v7.0.0?
A: Rebrand from Claude Command Runner to Warp Command Runner. Same 40 tools and stdio MCP protocol; names, bundle ID, and ~/.warp-command-runner paths updated. v6 config is copied on first launch.
Q: Cursor says spawn /Applications/Warp ENOENT?
A: Keep the path as one quoted JSON string: "/Applications/Warp Command Runner.app/Contents/MacOS/warp-command-runner". Do not rename the .app. If Cursor still splits on spaces, run helper/install-cursor-wrapper.sh and point ~/.cursor/mcp.json at ~/.local/bin/warp-command-runner. See config/cursor-mcp.json.
Q: What's new in v6.0.0?
A: Re-pivot to Warp after Warp went open source. Dual-consumer architecture (register the same binary in ~/.warp/.mcp.json to use it from Warp's native agent panel, in addition to Claude Desktop). warp:// deeplinks replace AppleScript menu-clicking for tab/window operations. New OSC 777 emitter (emit_warp_event) surfaces structured events into Warp's UI. New optional shell shim emits clean preexec/command-finished events to the MCP. Workspace profiles can now also emit Warp-native launch configs. ~460 LOC of dead code removed. Tool count goes from a previously-undercounted 36 (the v5 README claimed 30) up to 39. See CHANGELOG.md and docs/WARP_AGENT.md for the full story.
Q: What was new in v5.0.0?
A: Ten new feature categories bringing the tool count from 12 to 36 (the v5 README under-counted as 30; the dispatch table actually registered 36). Highlights: clipboard integration, macOS notifications, environment intelligence, structured output parsing, workspace profiles, multi-terminal sessions, file watchers, SSH remote execution.
Q: When should I use pipelines vs regular commands?
A: Use pipelines when you need:
Multiple sequential commands
Conditional logic (stop on build failure, continue on test failure)
A summary of all steps with timing
CI/CD-style workflows
Q: Why does my command "hang" with execute_with_auto_retrieve?
A: For very long commands, use execute_with_streaming instead. It provides real-time output updates and handles commands that run for minutes. This was the main motivation for adding streaming in v4.0.
Q: How do I use templates with multiple variables?
A: Define variables in your template with {{variable_name}} syntax:
{
"template": "cd {{project}} && git checkout {{branch}} && swift build -c {{config}}"
}Then provide all variables when running:
{
"variables": {"project": "~/MyApp", "branch": "main", "config": "release"}
}Q: Where are my templates stored?
A: In ~/.warp-command-runner/templates.json. They persist across sessions and MCP host restarts.
Q: How long will auto-retrieve wait for my command?
A: It depends on the command type:
Simple commands: 6 seconds
Git/npm commands: 20 seconds
Build commands: 77 seconds
Unknown commands: 30 seconds
For longer commands, use execute_with_streaming instead.
Q: Can I use this with Terminal.app or iTerm2?
A: Yes, basic command execution works with any terminal. Automatic output capture and Warp-specific features (deeplinks, OSC 777, agent panel) need Warp. Download it from warp.dev.
Q: Is it secure to let an AI run commands?
A: Commands are sent directly to your terminal and execute automatically — there is no manual "press Enter" step. Configure blocked commands in ~/.warp-command-runner/config.json. The blocked-commands list catches common mistakes; it is not a security boundary, because a determined caller can rephrase or encode a command. Only attach this MCP to a host you trust. Do not expose it as a public HTTP server.
Q: What happens if a pipeline step fails?
A: Depends on the on_fail setting:
stop– Pipeline halts immediately, remaining steps are skippedcontinue– Error is logged, pipeline continues to next stepwarn– Warning is shown, pipeline continues
Q: Can I nest pipelines or run templates inside pipelines?
A: Not directly. You can create templates that contain multiple commands separated by && or ;, or compose by calling run_template and execute_pipeline from the same conversation.
Q: Where is my command history stored?
A: In an SQLite database at ~/.warp-command-runner/warp_commands.db. It tracks all commands, outputs, exit codes, and execution times.
🛠️ Troubleshooting
macOS Permission Error: "osascript is not allowed to send keystrokes" (Error 1002)
This error affects the 5 AppleScript-keystroke-routed tools (execute_command, execute_with_auto_retrieve, execute_with_streaming, run_template, send_to_session). The other 34 tools — including execute_pipeline — are unaffected.
Don't waste hours toggling System Settings panels. This is a layered problem with macOS Sequoia's TCC + sandbox enforcement, and partial fixes leave silent denials in deeper layers. The canonical fix is the 🛡️ macOS Sequoia full setup recipe above (in the Installation section) — seven ordered steps including: build the .app bundle, install into /Applications/ (not .build/), tccutil reset for the bundle ID, and grant THREE TCC permissions including the surprise one (Full Disk Access on the bundle — sandbox preflights this before allowing the keystroke chain). Follow it top to bottom; skipping any step leaves a hidden denial.
Quick triage — am I hitting this?
Run this immediately after a failed execute_command:
log show --predicate 'process == "tccd"' --last 20s --info --debug | grep -E 'm-pineapple|promptPolicy|Service Policy'You'll see one of:
promptPolicy = 0→ bundle isn't in/Applications/(or no bundle at all). Fix: Steps 2-3 of the recipe.promptPolicy = 2+Denied (Service Policy)forkTCCServiceSystemPolicyAllFiles→ missing Full Disk Access on the bundle. Fix: Step 6 of the recipe.AttributionChain: responsible={identifier=warp-command-runner, ...}(nom-pineapple) → you're not running from the bundle, you're running the bare binary. Fix: re-run./build.shand update your MCP config to the.apppath (Steps 2-4 of the recipe).
Workaround if you don't want to bother with the recipe:
// Use execute_pipeline instead of execute_command:
{"steps": [{"command": "git status"}]}Pure subprocess, no AppleScript, zero TCC. Works on any macOS regardless of permissions. The 34 non-keystroke tools all work too.
Bundle ID Reference: com.m-pineapple.warp-command-runner (this project), com.anthropic.claudefordesktop (Claude Desktop).
macOS Accessibility Permission Issues
The MCP binary requires Accessibility permission only for the AppleScript keystroke path used by send_to_session (typing into a specific Warp tab) and the legacy non-Warp paths in execute_command for iTerm/Terminal/Alacritty. Most v6.0 tools work without Accessibility: subprocess-based execution, warp:// deeplinks for tab opening, clipboard, SSH, env snapshots, file watch, profiles, and all 24 server-side tools.
Symptoms (when it does matter):
Error message:
osascript is not allowed assistive access. (-1719)send_to_sessionfails; clipboard, SSH, env-context, deeplink-basedopen_terminal_taball work fine
Solution:
Open System Settings → Privacy & Security → Accessibility
Click the + button and navigate to your
warp-command-runnerbinary:/path/to/warp-command-runner/.build/release/warp-command-runnerThe
.buildfolder is hidden by default — press Cmd+Shift+. in Finder to reveal itToggle the permission on for the binary
Important: macOS tracks Accessibility permissions by binary identity. After every swift build, the binary changes and you must re-add it to the Accessibility list. This only affects keystroke-injection paths — most tools are unaffected.
MCP Not Responding
Check the client logs (Claude Desktop or Warp). The default server is a child of the client over stdio. Remote MCP (
--http) listens on127.0.0.1only — seedocs/REMOTE.md.Restart the client (Claude Desktop and/or Warp).
Rebuild with
./build.sh. (And re-add the binary to Accessibility ifsend_to_sessionis failing.)
Commands Not Appearing in Terminal
Ensure Warp/WarpPreview is running
Check Claude Desktop logs for errors
Verify your MCP configuration path
Streaming Not Updating
Check that the command is actually running (not waiting for input)
Increase
update_intervalif updates are too frequentCheck
/tmp/wcr_stream_*.logfor output files
Pipeline Steps Skipped Unexpectedly
Check the
on_failsetting –stopwill skip remaining stepsVerify each command works individually first
Check exit codes in the pipeline summary
Templates Not Saving
Ensure
~/.warp-command-runner/directory existsCheck write permissions on templates.json
Verify JSON syntax in template definition
Auto-Retrieve Not Working
Ensure you're using
execute_with_auto_retrieve(notexecute_command)Check if command output file exists:
ls /tmp/wcr_output_*.jsonFor long commands, use
execute_with_streaminginstead
Database Issues
If commands execute but aren't saved to the database:
Check database integrity:
sqlite3 ~/.warp-command-runner/warp_commands.db "PRAGMA integrity_check;"If corrupted, backup and remove:
mv ~/.warp-command-runner/warp_commands.db ~/.warp-command-runner/warp_commands.db.backup # Restart the MCP host — a new database is created automatically
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Warp Agent │ │ Claude Desk. │ │ ChatGPT / │
│ (Grok, GPT, │ │ │ │ Cursor / VS │
│ Claude, …) │ │ │ │ Code / … │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ stdio MCP │ stdio MCP │ stdio MCP
└─────────────────┴─────────────────┘
▼
┌─────────────────────────────────┐
│ warp-command-runner v7.0 │
│ Swift MCP server · 40 tools │
└─────────┬───────────┬───────────┘
│ │
▼ ▼
┌──────────────┐ ┌─────────────────────┐
│ Warp Terminal│ │ Optional shell shim │
│ warp:// │ │ /tmp/wcr-shell-shim-│
│ OSC 777 │ │ <uid>.sock │
└──────────────┘ └─────────────────────┘Any local MCP host, one server. Tab/window operations use Warp's warp:// URL scheme; status events use OSC 777; typing into a tab still uses AppleScript keystrokes (Warp has no API for that). Phone and website chats need --http plus your own HTTPS tunnel — see docs/REMOTE.md.
Contributing
We love contributions! Here's how:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Setup
git clone https://github.com/M-Pineapple/warp-command-runner.git
cd warp-command-runner
swift package resolve
swift build💖 Support This Project
If Warp Command Runner has helped enhance your development workflow or saved you time with intelligent command execution, consider supporting its development:
Your support helps me:
Maintain and improve Warp Command Runner with new features
Keep the project open-source and free for everyone
Dedicate more time to addressing user requests and bug fixes
Explore new terminal integrations and command intelligence
Thank you for considering supporting my work! 🙏
More MCP servers by M-Pineapple
License
MIT License – see LICENSE file for details
Built with ❤️, originally by 🍍 as Claude Command Runner. v7 rebrands the same MCP for any host.
If this helps, star the repo and try Warp.
Available Tools
40 toolsadd_file_watchC
Set up a file system watcher that triggers a command when files change
Inputs: path (required), command (required), pattern, debounce_seconds.
capture_environmentB
Capture a snapshot of the current shell environment variables with a named label
Inputs: name (required).
check_interactiveA
Check if a command is interactive (requires TTY/stdin) before executing it. Returns safety level: safe, cautious, interactive, or blocked with suggestions for non-interactive alternatives
Inputs: command (required).
cleanup_sessionsA
Remove stale terminal sessions that have been inactive. Use periodically to clean up accumulated tabs. Sessions inactive longer than inactive_minutes (default: 30) are removed. Set close_tabs to true to also close the terminal tabs.
Inputs: close_tabs, inactive_minutes.
close_sessionA
Close a named terminal session and optionally close its tab. Use to clean up sessions that are no longer needed. Pass close_tab: true to also close the terminal tab.
Inputs: session_name (required), close_tab.
copy_to_clipboardA
Copy text to the macOS system clipboard
Inputs: text (required).
delete_ssh_profileC
Delete a saved SSH connection profile
Inputs: name (required).
delete_templateB
Delete a saved command template by name
Inputs: name (required).
delete_workspace_profileC
Delete a saved workspace profile
Inputs: name (required).
diff_environmentB
Compare two environment snapshots and show additions, removals, and changes
Inputs: to (required), from (required).
emit_warp_eventA
Build a printf invocation that emits an OSC 777 warp://cli-agent JSON event into Warp's notification UI. The returned printf must be executed inside a Warp pane (e.g. via execute_command) to take effect — our MCP stdout is the JSON-RPC channel and cannot directly write to Warp's PTY.
Inputs: event_type (required), payload, session_id.
execute_and_parseB
Execute a command and return structured parsed output (supports git status, git log, docker ps, test results, ls -la, and JSON)
Inputs: command (required), parser, working_directory.
execute_commandA
Executes a terminal command and captures its output. Preferred for quick commands (ls, git status, cat, echo, etc.) that don't need a visible terminal tab. Use open_terminal_tab only for long-running processes.
Inputs: command (required), working_directory.
execute_pipelineB
Execute a pipeline of commands with conditional logic (stop/continue/warn on failure)
Inputs: steps (required).
execute_with_auto_retrieveA
Executes a command and automatically waits for and returns its output. Preferred for quick commands that don't need a visible terminal tab. Use open_terminal_tab only for long-running processes like builds or servers.
Inputs: command (required), working_directory.
execute_with_streamingB
Execute a command with real-time output streaming - ideal for long-running builds
Inputs: command (required), max_duration, update_interval, working_directory.
focus_warp_sessionA
Focus an existing Warp pane by its session UUID via warp://session/. The UUID must be one Warp itself recognises (typically obtained from the optional shell shim's OSC 777 session_start event). Locally-minted UUIDs returned by open_terminal_tab are NOT valid here.
Inputs: warp_uuid (required).
get_command_outputC
Retrieve the output of a previously executed command
Inputs: command_id.
get_environment_contextB
Get current terminal environment context including git branch, active venv, node version, docker status, and working directory
Inputs: working_directory.
list_file_watchesB
List all active file system watchers
Inputs: no named parameters.
list_recent_commandsB
List recent commands from history with status, duration, and exit codes
Inputs: limit, search, status.
list_sessionsA
List all active terminal sessions. Check this before opening new tabs to avoid creating duplicates. Reuse existing sessions with send_to_session whenever possible.
Inputs: no named parameters.
list_ssh_profilesA
List all saved SSH connection profiles
Inputs: no named parameters.
list_templatesB
List all saved command templates
Inputs: no named parameters.
list_workspace_profilesB
List all saved workspace profiles
Inputs: no named parameters.
load_workspace_profileB
Load a saved workspace profile to restore project context
Inputs: name (required).
open_terminal_tabA
Open a new named terminal tab. ONLY use for long-running commands that need their own visible tab (builds, installs, servers, cloning repos). For quick commands, prefer execute_command or execute_with_auto_retrieve instead. If a session already exists, use send_to_session to reuse it.
Inputs: name (required), terminal, working_directory.
preview_commandB
Preview a command without executing it
Inputs: command (required).
read_from_clipboardA
Read the current contents of the macOS system clipboard
Inputs: no named parameters.
remove_file_watchB
Remove an active file system watcher
Inputs: watcher_id (required).
run_templateC
Execute a saved command template with variable substitution
Inputs: name (required), variables.
save_ssh_profileC
Save an SSH connection profile for quick reuse
Inputs: host (required), name (required), username (required), port, +1 more.
save_templateB
Save a command template with variables for reuse
Inputs: name (required), template (required), category, description.
save_workspace_profileB
Save current project context as a named workspace profile (directory, commands, env vars, terminal preference). Optionally also writes a Warp-native launch config to ~/.warp/launch_configurations/ so the profile appears in Warp's launch UI.
Inputs: name (required), directory (required), default_commands, environment_vars, +2 more.
self_checkB
Run health check on configuration, database, terminal, and recent error rates
Inputs: no named parameters.
send_to_sessionA
Send a command to an existing named terminal session, reusing its tab. Always prefer this over opening a new tab when a relevant session already exists. Use list_sessions first to check for available sessions.
Inputs: command (required), session_name (required).
set_notification_preferenceC
Toggle macOS notification preferences for command completion alerts
Inputs: sound, enabled, minimum_duration, notify_on_failure, +1 more.
shell_shim_statusA
Report the status of the optional shell shim — socket path, whether the MCP server is listening, total events received, and the most recent events. The shim is opt-in (helper/install-shim.sh); when active inside a Warp pane it streams preexec/command_finished events to the MCP via a per-uid Unix socket. Observability surface in v6.0; execute_command auto-routing through shim events is deferred to v6.0.x.
Inputs: no named parameters.
ssh_executeB
Execute a command on a remote host via SSH (key-based authentication only)
Inputs: command (required), host, port, profile, +3 more.
suggest_commandC
Suggests a terminal command based on the user's request
Inputs: query (required), working_directory.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Several execution tools heavily overlap: execute_command, execute_with_auto_retrieve, execute_and_parse, execute_with_streaming, and execute_pipeline all run commands, while get_command_output and auto-retrieve both fetch output. Descriptions provide some guidance, but an agent still faces unclear boundaries for choosing the right runner.
Most tools follow a predictable snake_case verb_noun pattern such as execute_command, list_templates, save_workspace_profile, and delete_ssh_profile. Minor deviations like ssh_execute, self_check, and shell_shim_status keep it from being fully consistent.
With 40 tools, the surface is heavy for a command-runner server and includes many niche capabilities beyond core command execution, such as clipboard access, notifications, Warp event emission, and shell-shim status. The set feels over-expanded rather than tightly scoped.
The surface covers command execution, output retrieval, templates, sessions, workspace profiles, SSH profiles, environment snapshots, file watches, and health checks. Minor gaps remain, such as no explicit template update/get operation and no obvious command cancellation/kill tool, but these are workable.
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceThe terminal AI agents can drive: a cross-platform desktop terminal (macOS/Linux/Windows, MIT) that runs a local MCP server. Spawn tabs/panes, run commands with structured output, read screens and full scrollback, take scrolling screenshots, record sessions with secret redaction, switch identity profiles. Auto-registers with Claude Code / Codex / Gemini CLI on install.24-
- AlicenseNot gradedqualityDmaintenanceExposes an interactive terminal over MCP, enabling remote shell command execution, file operations, and directory management via ChatGPT or Claude Desktop.2MIT
- AlicenseNot gradedqualityCmaintenanceLocal macOS MCP bridge that gives ChatGPT shell, unrestricted filesystem access, real PTY sessions, background jobs, and read-only stored Codex history. ChatGPT stays the reasoning layer; the bridge makes no model calls.57MIT
- AlicenseNot gradedqualityDmaintenanceEnables macOS users to securely connect AI assistants such as Notion AI, Claude, and Cursor to their local files and terminal through an MCP server protected by a Bearer token and Cloudflare Tunnel.MIT