克劳德命令运行器 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
克劳德命令运行器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
克劳德命令运行器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/M-Pineapple/claude-command-runner
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--------": {
"command": "npx",
"args": ["-y", "claude-command-runner"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 克劳德命令运行器 执行以下任务... Claude: [自动调用 克劳德命令运行器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"________": {
"command": "npx",
"args": ["-y", "claude-command-runner"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Lets Claude actually use your terminal. You ask, Claude types the command into your Warp tab, captures the output, and tells you what happened. It's a Model Context Protocol (MCP) server with 39 tools — command execution, project setups, file watching, SSH, clipboard, environment intelligence — and the same binary works from both Claude Desktop and Warp's built-in AI agent panel. macOS, Swift, open source.
Built for Warp Terminal (free, open source AGPL-3.0). The 5 most powerful tools route commands visibly into your active Warp tab — that's the magic of this MCP. If you don't use Warp yet, grab it here — it pairs with this MCP for what's probably the closest thing to "Claude with a real terminal" you can get right now.
Claude Command Runner is a dual-consumer MCP server — the same binary serves Claude Desktop and Warp's native agent panel. It enables an LLM (whichever you've configured in either client) to:
warp:// deeplinks; AppleScript fallback for non-Warp terminals) and send commands to the active tabwarp://cli-agent eventsTriggered by Warp going open source under AGPL-3.0 (github.com/warpdotdev/warp) in May 2026. v6.0 re-establishes Warp as the primary integration target and adds a new install path: Warp's native agent panel.
claude-command-runner in ~/.warp/.mcp.json and Warp's built-in agent (which uses your configured LLM — Claude Sonnet, Opus, etc.) calls the same tools Claude Desktop calls. Same binary, same code, two consumers. See docs/WARP_AGENT.md.open_terminal_tab now uses warp://action/new_tab?path=.... No menu-clicking, no Accessibility permission for the open path.emit_warp_event): build printf invocations that surface structured events into Warp's notification UI. Schema reimplemented from upstream event/v1.rs (no vendoring).save_workspace_profile accepts include_warp_launch_config: true to also write a YAML to ~/.warp/launch_configurations/, making the profile appear in Warp's launch UI.helper/install-shim.sh adds zsh/bash hooks that emit preexec/command_finished events to a per-uid Unix socket the MCP listens on. Auto-disables outside Warp panes. Observability surface in v6.0; auto-routing execute_command through it is deferred to v6.0.x.0.10.x with a deterministic scripts/patch-swift-sdk.sh so a fresh clone builds without manual patches.Honest caveat: the "Claude" replying in Warp's agent panel is Warp's agent (running whichever LLM you configure in Warp's AI settings), not your Claude Desktop instance. Both can call the MCP; they don't share conversations. v6.0 does not bridge them.
v5.0.0: 36 tools, up from 12.
git status, docker ps, test results, and moreA: 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.
1. Clone and build: ```bash git clone https://github.com/M-Pineapple/claude-command-runner.git cd claude-command-runner
export CCR_CODESIGN_IDENTITY="<your-cert-sha1>" # persist in ~/.zshrc so you don't forget ./build.sh
rm -rf "/Applications/Claude Command Runner.app" cp -R .build/release/claude-command-runner.app "/Applications/Claude Command Runner.app" ```
Then restart Claude Desktop. Because the bundle keeps the same identifier and is signed with the same certificate, your existing TCC grants (Automation, Input Monitoring, Accessibility, Full Disk Access) carry over — no re-granting needed. If the keystroke tools start failing with error 1002 after an upgrade, you almost certainly rebuilt unsigned; re-sign with your cert and redeploy.
Ifexecute_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 /Applications/, not .build/release/ |
| 2. Bundle identity stable | (n/a — codesign) | Signed with a stable cert (cdhash doesn't drift across rebuilds) |
| 3. Sandbox FDA preflight | kTCCServiceSystemPolicyAllFiles | Full Disk Access grant on the bundle |
| 4. AppleEvents | kTCCServiceAppleEvents | Automation → System Events ☑ |
| 5. Keystroke synthesis | kTCCServiceListenEvent / kTCCServicePostEvent | Input Monitoring + Accessibility |
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:
claude-command-runner, Identity Type: Self Signed Root, Certificate Type: Code SigningExport the cert identifier for build.sh to find: ```bash
git clone https://github.com/yourusername/claude-command-runner.git
cd claude-command-runner
swift package resolve
swift build
Simple Command:
You: "Check my Swift version"
Claude: [execute_with_auto_retrieve: swift --version]
Claude: "You're running Swift 6.0.2"
Build Pipeline:
You: "Build, test, and package my app"
Claude: [execute_pipeline with build → test → package steps]
Claude: "Pipeline complete! Build: ✅ Test: ✅ Package: ✅"
Streaming Long Build:
You: "Build this large project"
Claude: [execute_with_streaming: swift build -c release]
Claude: "Building... [live updates every 3 seconds]"
Claude: "Build completed in 45 seconds!"
Using Templates:
You: "Save a template for deploying to staging"
Claude: [save_template: name="deploy-staging", template="cd {{project}} && ./deploy.sh staging"]
You: "Deploy MyApp to staging"
Claude: [run_template: name="deploy-staging", variables={project: "MyApp"}]
Environment Context (v5.0):
You: "What's my current dev environment?"
Claude: [get_environment_context]
Claude: "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"
Claude: [save_workspace_profile: name="api-project", directory="~/Projects/api", ...]
You: "Switch to the API project"
Claude: [load_workspace_profile: name="api-project"]
File Watching (v5.0):
You: "Rebuild whenever a Swift file changes"
Claude: [add_file_watch: path="./Sources", pattern="*.swift", command="swift build"]
Claude: "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"
Claude: [ssh_execute: host="staging.example.com", username="deploy", command="df -h"]
Claude: "Here's the disk usage on staging..."
export CCR_CODESIGN_IDENTITY="<the-sha1-hash-from-above>"
#### Step 2 — Build (creates the signed `.app` bundle)
bash ./build.sh
`build.sh` invokes `scripts/make-app-bundle.sh`, which wraps the CLI in `.build/release/claude-command-runner.app/` with a proper `Info.plist` (CFBundleIdentifier `com.m-pineapple.claude-command-runner`, the three required `NSXxxUsageDescription` strings, LSUIElement=true). If `CCR_CODESIGN_IDENTITY` is set, the bundle is signed with that cert as a unit — stable cdhash across rebuilds.
**Verify:**bash codesign --display --verbose=4 .build/release/claude-command-runner.app | grep -E 'Identifier|TeamIdentifier|CDHash' codesign --verify --deep --strict .build/release/claude-command-runner.app # should succeed silently
#### Step 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:
bash cp -R .build/release/claude-command-runner.app "/Applications/Claude Command Runner.app"
Verify the signature survived the copy:bash codesign --verify --deep --strict "/Applications/Claude Command Runner.app"
#### Step 4 — Point your MCP config at the `/Applications/` path
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):json { "mcpServers": { "claude-command-runner": { "command": "/Applications/Claude Command Runner.app/Contents/MacOS/claude-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:
bash for svc in AppleEvents ListenEvent PostEvent Accessibility; do tccutil reset "$svc" com.m-pineapple.claude-command-runner done ```
Each line should print "Successfully reset". If you see "no entries", that's also fine — means TCC had nothing recorded yet.
In System Settings → Privacy & Security, add /Applications/Claude Command Runner.app to each of:
kTCCServiceSystemPolicyAllFiles before 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.kTCCServiceListenEvent / kTCCServicePostEvent (synthetic keystroke generation).keystroke AppleEvent action itself.Each grant requires Touch ID / admin password to confirm. Bundle name appears as "Claude Command Runner" in the panels.
⌘Q Claude Desktop, reopen. On your first execute_command, macOS may show one more prompt — Automation → "Claude 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).
---
The configuration file is located at ~/.claude-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 ~/.claude-command-runner/templates.json. Workspace profiles are stored at ~/.claude-command-runner/profiles.json. SSH profiles are stored at ~/.claude-command-runner/ssh_profiles.json.
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 failure - continue – Log error and proceed to next step - warn – Show warning and continue
A: Depends on the on_fail setting: - stop – Pipeline halts immediately, remaining steps are skipped - continue – Error is logged, pipeline continues to next step - warn – Warning is shown, pipeline continues
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.
on_fail setting – stop will skip remaining stepsA: 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
Claude 命令运行器是一款双消费者 MCP 服务器,同一二进制可供 Claude 桌面和 Warp 原生代理面板使用。它使 LLM (您在任意客户端配置的) 能够:
Claude 命令运行器 v6.0.0 是由于 Warp 在 2026 年 5 月开源(AGPL-3.0)而重新定位为主要集成目标。它还添加了一个新安装路径:Warp 的原生代理面板。
环境依赖与系统要求:macOS 13.0 或更高版本、Swift 6.0+ (Xcode 16+)、Claude 桌面、支持的终端(Warp 强烈推荐)
快速安装:克隆和构建、使用 Docker 或 pip 安装、源码安装
使用教程:简单命令、建造流水线、实时输出长建造
配置说明:MCP 服务器、环境变量、关键参数
工作流 / 模块说明:命令管道、条件逻辑、错误处理
常见问题:触发器、工作流、模块、错误处理
创新性的MCP工具,提高效率
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,克劳德命令运行器 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | claude-command-runner |
| 原始描述 | 开源MCP工具:Lets Claude actually use your terminal. You ask, Claude types the command into y。⭐17 · Swift |
| Topics | ai-agentsautomationclaude |
| GitHub | https://github.com/M-Pineapple/claude-command-runner |
| License | MIT |
| 语言 | Swift |
收录时间:2026-06-07 · 更新时间:2026-06-08 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端