# agent-peers [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/ThomasMarcelis/agent-peers  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-peers

## Description
Local agent-to-agent messaging for Claude Code and Codex, with a Codex MCP server and Hermes plugin

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/ThomasMarcelis/agent-peers), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g agent-peers@next
```

2. Add to Codex:

```sh
codex mcp add agent-peers -- codex-peer
```

## Documentation

## What agent-peers does

agent-peers lets separate coding-agent sessions exchange messages while retaining their own context and workflows. Claude Code and Codex sessions can discover one another, ask questions, coordinate changes, and return replies to the originating conversation. Communication can span different projects and repositories as long as the sessions run locally under the same operating-system user.

The project also includes experimental integrations for Hermes and opencode. Hermes can contact Claude and Codex through a native plugin, while the opencode 2.x plugin exposes the same peer tools used by the Codex integration.

## How it works

Local Unix sockets provide the transport, so no separate broker, account, or hosted service is required. A peer appears with an identity such as `codex:<folder>-<id>` or a `uds:` address that Claude Code can use with `SendMessage`.

Codex connects through the app-server used by agent-peers. The shared Codex daemon is the default path; headless workers can use a private app-server. Embedded servers started by `codex exec`, `--no-daemon`, or certain configuration overrides cannot be reached by peers.

Messages are delivered to a peer's inbox while its host is idle or busy, using the host's normal conversation handling. Delivery confirms that the inbox accepted the message, not that the model produced an answer. There is no offline mailbox, so a closed conversation cannot receive messages.

## Setup and configuration

The runtime requirement is Node.js 22 or newer on Linux or macOS. Install the package globally with the npm `next` tag:

```sh
npm install -g agent-peers@next
```

Register the Codex MCP server with:

```sh
codex mcp add agent-peers -- codex-peer
```

Keeping the MCP server name as `agent-peers` enables the inbox to open when a Codex session starts. Claude Code requires no MCP server; add instructions telling the agent to run `agent-peers list`, then use `SendMessage` with a discovered `uds:` address.

The CLI includes `agent-peers list` for discovery and `agent-peers doctor` for installation checks. Set `AGENT_PEERS_DEBUG=1` for local diagnostics, then inspect retained metadata with `agent-peers logs --json`. Existing processes must restart before inheriting the debug setting.

Hermes can install the experimental plugin with `hermes plugins install ThomasMarcelis/agent-peers --enable`, followed by the documented dependency and injection setup. Stock Hermes supports discovery only; sending requires the documented Hermes fork. opencode 2.x can install its plugin with `opencode plugin add agent-peers@next` and must be restarted afterward.

## Tools and capabilities

The Codex MCP integration supports:

- `list_peers` to discover reachable agent sessions.
- `send_peer(to, message)` to send a message to a selected peer.

The opencode plugin exposes those tools plus `claim_name` and `release_name` for stable session names. Claude Code uses the native `SendMessage` tool after discovering peers through the CLI. Hermes provides plugin-based contact with Claude and Codex, including private replies to the originating conversation.

## Limitations and notes

Messages are peer input rather than user approval, and host approval policies still apply. A peer can answer on its own, but changing a worker's task mid-turn requires the documented headless-worker setup and an instruction in its brief.

Hermes support is experimental, and opencode support is experimental as well. opencode sessions become reachable after a prompt or tool call, can become unbound after 60 minutes without session activity, and should not be run in two servers at once. Its `--auto` mode can approve tool calls that are not explicitly denied, so it should not be used with untrusted peers or sensitive repositories.

The local transport limits communication to the same machine and OS user. Closed conversations are unreachable, and the system does not provide an offline queue. Diagnostic logs retain bounded metadata, timings, correlation IDs, and failure categories while excluding message bodies and raw errors.

_Full upstream README: https://allmcps.com/mcp/agent-peers/readme_

