协同代码桥 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 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/abhinaykrupa/cowork-to-code-bridge
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"-----": {
"command": "npx",
"args": ["-y", "cowork-to-code-bridge"]
}
}
}
# 配置文件位置
# 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", "cowork-to-code-bridge"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
⭐ If this saves you time, a star helps others find it. It takes one click.
Let Claude run code on your real machine — safely — from any Claude chat. Integrate with Hermes, cron jobs, CI/CD, or any daemon.
<p align="center"> <img src="https://raw.githubusercontent.com/abhinaykrupa/cowork-to-code-bridge/main/docs/demo.svg" alt="Cowork hands a 'build me a Flask app' task to Claude Code on your machine; it scaffolds, installs, runs, and verifies it — then reports back." width="100%"> </p>
🖥️ macOS, Linux, and WSL2. Works on your Mac (launchd), a Linux box/server (systemd, or a manual path for containers/minimal distros), or Windows via WSL2 (systemd in Ubuntu). Native Windows isn't supported yet — see docs/WSL.md.
Claude Cowork (and Claude in your browser) is great at planning and editing, but it runs in a sealed cloud sandbox — it can't reach your actual machine. Claude Code, running on your computer, can: it has your shell, your repos, your tools, and full agent abilities.
This bridge connects the two. Cowork hands a task to Claude Code on your machine, a real local agent does the work, and the result streams back to your chat. So you can say things like:
"build me a web app on my machine, install deps, and run it" "run the test suite and fix what's failing" "review the diff and push if it's clean"
…and a Claude Code agent on your computer actually does it.
Because Claude Code can run things on your Mac, a useful side benefit is that the same bridge lets Cowork run approved shell scripts directly (builds, git, disk checks) without going through the agent — handy for simple, fixed actions.
It's idempotent. Tasks have side effects (edits, commits, pushes), so the bridge caches results by an idempotency key: a retry after a dropped connection returns the cached result instead of running the agent — or the script — twice.
---
Is it safe to let a cloud chat reach my machine? Short answer: the bridge opens no network ports, never uses sudo, runs only scripts you approve, is gated by a secret token, and uninstalls completely with one command. Full threat model in SECURITY.md.
cowork-to-code-bridge is designed as a universal MCP-based local code execution backend, seamlessly integrating with major agent frameworks and development platforms across the broader ecosystem:
Agent Frameworks & Orchestration - LangGraph — Graph-based workflow integration enabling local code execution nodes - LangChain — MCP client integration for agent-based code generation and validation - AutoGen — Code execution configuration with multi-language support via MCP - CrewAI — Production crew workflows with safe local code execution patterns - Pydantic AI — Structured code execution with validation via agent tools - n8n — Secure local code execution steps for workflow automation - Dify — Local code execution patterns for autonomous agent workflows - Langflow — Visual workflow builder integration with code execution components - Mastra, Upsonic, AutoGPT, OpenAI Swarm — General-purpose agent infrastructure
Model Context Protocol (MCP) Ecosystem - Official MCP Registry — Canonical server listing for all MCP clients - MCP Quickstart Resources — Reference implementation for stateful MCP server patterns - MCP Specification — Documentation of async escalation patterns for long-running operations - GitHub's MCP Server — Companion pattern enabling GitHub data discovery + local code execution
Developer-First Platforms - Cursor, VS Code, and IDE Extensions — MCP provider for Claude Code within editor environments - OpenAI Assistants — Code execution backend for assistant-based workflows
Infrastructure & CI/CD - GitHub Actions & Agentic Workflows — Self-hosted runner integration for local execution - DevOps Agent Frameworks — Infrastructure automation with local code execution context - Kubernetes & Container-Native Workflows — MCP server deployment patterns
Community & Visibility - Curated Registries — awesome-mcp-servers, awesome-ai-agents, awesome-mcp-clients, 500-AI-Agents-Projects - Agent Ecosystem Directories — Listed in major community indexes for agent infrastructure and execution backends
Integration Approach
Each integration leverages the bridge's core capabilities: - Zero external API key management (uses local Claude Code subscription) - Full repository and environment context access - JSONRPC 2.0 MCP standard protocol - File-based queue with token authentication - Async escalation patterns for non-blocking task delegation - Idempotent request handling with unique operation tracking
The bridge is framework-agnostic and protocol-standard, enabling any MCP-aware tool to escalate code execution tasks while maintaining local context, security, and cost predictability. For integration guidance specific to your framework, see docs/EXTERNAL_AGENT_INTEGRATION.md and docs/MCP_SERVER_IMPLEMENTATION.md.
---
Step 1 — on your machine (once). Open Terminal (Cmd + Space → Terminal), paste this, press Enter:
```bash
Run this any time to confirm the bridge is healthy:
cowork-to-code-bridge-selfcheck
It checks six things and prints a clear PASS/FAIL for each:
cowork-to-code-bridge selfcheck
bridge root : /Users/you/.cowork-to-code-bridge
platform : Darwin arm64
Bridge root [PASS] /Users/you/.cowork-to-code-bridge
Bridge token [PASS] set in /Users/you/.cowork-to-code-bridge/.env
Daemon registered [PASS] launchd: running (pid 1234)
Skill installed [PASS] /Users/you/.claude/skills/cowork-to-code-bridge
Ping round-trip [PASS] ping round-trip OK
claude CLI [PASS] /opt/homebrew/bin/claude
All checks passed. Bridge is healthy.
Exits 0 if all pass, 1 if any fail — safe to use in scripts or bug reports.
---
One command, undoes everything the installer did:
cowork-to-code-bridge-uninstall
It undoes everything the installer set up: stops and removes the background daemon, removes the global Cowork skill (so it stops loading into your Cowork sessions), deletes the bridge folder (token, scripts, history), and uninstalls the Python package. It asks before each destructive step — say yes to all to fully reset.
No network needed, no Cowork step. Uninstall is entirely on your Mac. Once the skill is removed, your Cowork chats simply won't have the bridge anymore — nothing to clean up there.
For a no-questions-asked uninstall:
cowork-to-code-bridge-uninstall --yes
| Flag | What it does |
|---|---|
--yes / -y | Skip every prompt |
--keep-data | Leave your bridge folder (token, scripts, history) but remove the daemon |
--keep-package | Stop the daemon, delete bridge folder, but leave the pip package installed |
--bridge-root PATH | Use a non-default bridge folder location |
Stock macOS ships an old Python (3.8). You need 3.10+. Easiest fix:
brew install python@3.12
Then re-run the installer.
After running uninstall, all of these should return empty or "not found":
launchctl list | grep cowork-to-code-bridge
ls ~/Library/LaunchAgents/dev.cowork-to-code-bridge.daemon.plist
ls ~/.cowork-to-code-bridge
python3 -c "import cowork_to_code_bridge"
---
Once the bridge is in place, a single Cowork chat can run a whole project — not just edit files, but actually run, test, and ship them. Paired with Claude Code's built-in skills (like frontend-design, code-review, security-review), one conversation covers the full cycle:
| Step | How the bridge helps |
|---|---|
| **Build & design** | Claude Code writes the code and the UI |
| **Run** | The bridge starts your app and dev servers on your Mac |
| **Test** | The bridge runs your tests and shows you the results |
| **Ship** | The bridge runs git push, opens PRs, kicks off deploys |
| **Operate** | The bridge checks logs, disk space, restarts services |
Before the bridge, anything that needed your actual machine meant leaving Cowork for a terminal. Now it all happens in one chat.
---
There are several ways to get Claude near a machine. Here's where this bridge fits, honestly — including the cases where you don't need it:
| Approach | Runs on | Reaches your real shell / files | Always-on / survives reboot | Best when |
|---|---|---|---|---|
| **Cowork alone** | Local VM (sandboxed) | ❌ Only a granted workspace folder; sandbox is hypervisor-isolated from the host | n/a | You don't need the host machine at all |
**Claude Code on the web** (--remote) | Anthropic cloud | ❌ Only your cloned repo; no host access | ❌ Cloud session | The task is fully inside a GitHub repo |
**Remote Control** (--remote-control) | **Your machine** | ✅ Full local shell/files | ⚠️ Ends when claude stops; ~10-min offline timeout; needs paid claude.ai login | You're driving a *live* local session from your phone/web and keep it running |
| **MCP (local server)** | Your machine | ✅ Within the server you build | ⚠️ You run/maintain the server | You want structured tool calls, not a full agent task — **but Cowork's sandbox can't reach a localhost MCP server** |
| **SSH / self-hosted runner** | Your machine | ✅ Full | ✅ If you set it up | You're comfortable running and securing your own listener |
| **this bridge** | **Your machine** | ✅ Full (a real Claude Code agent) | ✅ Daemon auto-restarts, reboot-safe, no session to keep alive | You want to drive your machine **from a Cowork chat**, hands-off, no open port, idempotent |
The honest takeaway: the closest first-party option is Remote Control — same security shape (local execution, outbound-only, no inbound port). The bridge differs in that it's driven from a Cowork chat, needs no live session kept running (a background daemon survives reboots), is idempotent across dropped connections, and runs approved scripts directly when you don't need a full agent. If you live in a live Claude Code terminal session, Remote Control may suit you better — use the right tool for where you actually talk to Claude.
Feature facts above reflect Anthropic's published docs as of mid-2026 (code.claude.com/docs). They evolve — corrections welcome via issue or PR.
---
Q: Does this work on Linux or Windows? macOS (launchd), Linux (systemd --user or the no-systemd installer path), and WSL2 on Windows (systemd in your Ubuntu distro) are supported. Native Windows (PowerShell, Task Scheduler) is not — use WSL2; see docs/WSL.md.
Q: Does it cost anything? No. It's free and open source (MIT).
Q: Do I need to be a developer to use this? You need to be comfortable pasting one terminal command. Beyond that, no — Claude does the rest. Adding custom scripts is "knows what a script is" level, not "writes code daily" level.
Q: Can my Cowork agents from different projects share one bridge? Yes — one daemon serves any number of Cowork sessions. The token is shared across sessions on the same Mac.
Q: Can I have multiple Macs? Yes — install the bridge on each Mac separately. Each generates its own token. Cowork sessions automatically use whichever Mac they're connected to.
Q: Is this an official Anthropic project? No. This is a third-party tool that fills a gap Anthropic's Cowork doesn't (yet) cover. If they ship native Cowork ↔ Mac IPC someday, you can uninstall this and switch.
Q: I'm worried about something running on my Mac without me knowing. Three protections: 1. Every command writes to ~/.cowork-to-code-bridge/processed/ so you can audit history. 2. The daemon log shows every command in real time — tail -f ~/.cowork-to-code-bridge/daemon.log. 3. You control the script whitelist — Claude can't run anything you haven't put there.
If you want even more conservative: review every Claude suggestion before agreeing to run it.
Q: How do I restrict what Claude Code can do on a task? Set CLAUDE_FLAGS in your environment before the bridge invokes Claude Code. Three recipes, from cautious to locked-down:
```bash
创新MCP工具,安全运行代码
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,协同代码桥 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | cowork-to-code-bridge |
| Topics | mcpai-agentsanthropicasyncautogenautomationpython |
| GitHub | https://github.com/abhinaykrupa/cowork-to-code-bridge |
| License | MIT |
| 语言 | Python |
收录时间:2026-07-11 · 更新时间:2026-07-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端