agentcourier

Let coding agents message each other

agentcourier is an MCP server that lets Claude Code, Codex and GitHub Copilot send each other messages and files. On one laptop, across your machines, or with a colleague. No account, no cloud service.

Get the commands Source on GitHub

frontend Copilot copilot-frontend

You
Ask claude-backend which fields GET /orders returns.

courier_send to claude-backend
delivered

Answer
GET /orders returns id, items, total and status.

backend Claude Code claude-backend

← agentcourier: copilot-frontend

Which fields does GET /orders return?

courier_send to copilot-frontend
"id, items, total, status"
delivered

With the channels flag, the message appears in the running session.

Example exchange. Tool names, addresses and statuses are the real ones.

Your setup

For Copilot and Claude Code on one laptop. Change the choice above and the commands follow.

  1. Install

    pip install agentcourier
  2. Add it to Copilot

    In your user mcp.json (Command Palette: MCP: Open User Configuration). Run agentcourier vscode once for message notices.

    {
      "servers": {
        "agentcourier": {
          "type": "stdio",
          "command": "agentcourier",
          "args": ["mcp"]
        }
      }
    }
  3. Add it to Claude Code

    The flag is needed on every start, because channels are a research preview.

    claude mcp add --scope user agentcourier -- agentcourier mcp --channel
    claude --dangerously-load-development-channels server:agentcourier
  4. Say it

    Ask claude-backend which fields GET /orders returns.

Mail waits for a closed session

Every session keeps its name after a restart. A message to a closed one waits on its machine, up to 1000 per session, and is there when it starts again.

$ agentcourier send claude-backend "Tests pass on main"
{
  "id": "48460de584942d5b0a7ff4d7189b0812",
  "redacted": [],
  "status": "held until the agent connects"
}

Large files, streamed

Send HDF5, NetCDF or plain CSV to an agent on another machine. Memory use stays small whatever the size, and a transfer continues where it stopped if the connection drops.

$ agentcourier status
"transfers": [
  {
    "bytes": 21474836480,
    "direction": "out",
    "done": 13743895347,
    "file": "results.h5",
    "peer": "server"
  }
]

Strangers get no reply

Only machines you paired can connect. Every link is end-to-end encrypted with X25519 and ML-KEM-768, and incoming messages are marked as untrusted. Agents get no tools to pair machines; that stays with you.

$ agentcourier status
"refused_handshakes": [
  {
    "from": "203.0.113.7:51544",
    "key": "…",
    "secs_ago": 12
  }
]

One exchange, start to end

Illustration of a typical exchange.

Questions

How do I let two Claude Code sessions talk to each other?

Add agentcourier to Claude Code once. Every session can then message the others by name. The steps for Claude Code.

Does it work between Claude Code, Codex and Copilot?

Yes, and with other MCP clients that can start a local server. The setup for each tool.

Can I reach an agent on a server or cluster?

Yes, through the SSH access you already have, without admin rights. Servers, clusters and relays.

Can my agent talk to a colleague's agent?

Yes, once your two machines are paired. Agents are told to ask their user before acting on a message.

Does it need an account or a server?

No account and no company service. Each machine runs a small background program that agentcourier starts by itself, and there is no usage reporting.

What does it not do?

It does not punch through home routers, so one machine must be reachable by the other: an open port, an SSH tunnel, or a relay you run. Masking of personal data is pattern-based and can miss things. All limits.

How is it different from A2A, AutoGen or CrewAI?

Those run several agents inside one program or connect agent services over the web. agentcourier connects the coding agents you already use, in their running sessions.

Start on one laptop

Two sessions on the same computer need no pairing.

pip install agentcourier

Read the guide