JC

jtianling/cross-agent-teams-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 2 forks 质量 81 趋势 31MIT

跨代理协作的MCP守护进程

概览

一个本地MCP守护进程,允许多个AI编码代理(Claude Code、Codex、opencode)在同一台机器上相互通信。代理注册、发送一对一消息、向团队或角色广播,并互相唤醒——全部通过一个守护进程进行,没有外部服务。 Claude Code 已经推出了自己的代理团队功能。跨代理团队在表面上与之重叠,但解决了不同的问题。选择这个项目有三个具体理由: Claude Code 的代理团队与 Claude Code 本身绑定——每个成员都是 Claude Code 的子代理。跨代理团队允许你在同一支队伍中混合不同的代理:Claude Code 代理、Codex 代理、OpenCode 代理、Cursor 代理等,所有代理通过一个守护进程协调。使用最适合每个角色的代理,而不是被锁定在一个框架上。 在该设计中,每个代理流程都是手动启动和停止的。

概述(AI 翻译)

中文说明

一个本地MCP守护进程,允许多个AI编码代理(Claude Code、Codex、opencode)在同一台机器上相互通信。代理注册、发送一对一消息、向团队或角色广播,并互相唤醒——全部通过一个守护进程进行,没有外部服务。

为什么不直接用克劳德·科德的特工团队?

Claude Code 已经推出了自己的代理团队功能。跨代理团队在表面上与之重叠,但解决了不同的问题。选择这个项目有三个具体理由:

跨代理支持。 Claude Code 的代理团队与 Claude Code 本身绑定——每个成员都是 Claude Code 的子代理。跨代理团队允许你在同一团队中混合不同的代理:Claude Code 代理、Codex 代理、OpenCode 代理、Cursor 代理等,所有代理通过一个守护进程协调。使用最适合每个角色的代理,而不是被锁定在一个框架上。

更好的持久性和可控性。 在该设计中,每个代理进程都是手动启动和停止的。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

cross-agent-teams-mcp

中文说明

A local MCP daemon that lets multiple AI coding agents (Claude Code, Codex, opencode) running on the same machine talk to each other. Agents register, send 1-to-1 messages, broadcast to a team or role, and wake each other up — all over a single daemon, no external services.

Why not just use Claude Code’s agent teams?

Claude Code already ships its own agent teams feature. cross-agent-teams overlaps with it on the surface, but solves a different problem. Three concrete reasons to reach for this project:

Cross-agent support. Claude Code’s agent teams are tied to Claude Code itself — every member is a Claude Code sub-agent. cross-agent-teams lets you mix different agents in the same team: a Claude Code agent, a Codex agent, an opencode agent, a Cursor agent, etc., all coordinating through one daemon. Use the agent that’s best suited for each role instead of being locked to one harness.

Better persistence and controllability. In this design, each agent process is started and stopped manually. That’s more cumbersome than implicit spawn-on-demand, but it’s also much more controllable and persistent — agents keep their own long-running context, memory, and conversation state instead of being recreated from scratch every time the orchestrator decides it needs them. You can leave a specialist agent running for hours or days and keep talking to the same session.

Cross-device / cross-user collaboration. The daemon recently grew support for building teams across physical machines (see section 4). That means you can coordinate with agents running on a teammate’s laptop, where different people may own different specialized agents or workflows — something a single-process in-harness teams feature can’t reach.

Quick start

The whole device setup (zshrc launchers, daemon token, codex/opencode config) is written as an agent-readable runbook: README.agent.md. Paste this to any code agent that can fetch URLs and run shell commands:

Read https://raw.githubusercontent.com/jtianling/cross-agent-teams-mcp/HEAD/README.agent.md
and follow it to set up xats on this device.

The agent will confirm a device label and the ~/.zshrc changes with you, auto-generate the daemon token on first start-xats, and wire up the free-xats-codex / xats-codex / free-xats-opencode / xats-opencode launchers plus start-xats / stop-xats. Prefer doing it by hand? Continue below.

Claude Code

# 1. Start the daemon (run once, keep it alive)
npx -y cross-agent-teams-mcp@latest daemon --port 9100 &

# 2. In your project, install the MCP config
npx mcpsmgr add jtianling/cross-agent-teams-mcp -a claude-code

# 3. Start Claude Code with the channel loader (manual permission prompt expected)
claude --dangerously-load-development-channels server:cross-agent-teams-channel
在 GitHub 查看完整 README

安装

npx -y -p cross-agent-teams-mcp@latest cross-agent-teams-channel --daemon-url http://127.0.0.1:9100/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "cross-agent-teams": { "type": "http", "url": "http://127.0.0.1:9100/mcp" }, "cross-agent-teams-channel": { "command": "npx", "args": [ "-y", "-p", "cross-agent-teams-mcp@latest", "cross-agent-teams-channel", "--daemon-url", "http://127.0.0.1:9100/mcp" ] } } }