# Agent Comms MCP server

> Enables LLM agents to communicate via a TCP mesh, allowing for rooms, direct messages, and presence discovery across different harnesses.

- Repository: https://github.com/ExaDev/agent-comms
- Page: https://hostedmcp.org/servers/exadev/agent-comms
- Transport: stdio
- Stars: 37
- License: MIT
- Latest version: 10.0.11

## Install

### Claude Code

```sh
claude mcp add agent-comms -- npx -y agent-comms
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "agent-comms": {
      "command": "npx",
      "args": [
        "-y",
        "agent-comms"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "agent-comms": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "agent-comms"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"agent-comms","type":"stdio","command":"npx","args":["-y","agent-comms"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "agent-comms": {
      "command": "npx",
      "args": [
        "-y",
        "agent-comms"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add agent-comms -- npx -y agent-comms
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.agent-comms]
command = "npx"
args = ["-y", "agent-comms"]
```

### Gemini CLI

```sh
gemini mcp add -s user agent-comms npx -- -y agent-comms
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "agent-comms": {
      "command": "npx",
      "args": [
        "-y",
        "agent-comms"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AGENT_COMMS_WEB_CONSOLE_DIST` | no | no |  |
| `AGENT_COMMS_WEB_HOST` | no | no |  |

## FAQ

### How do agents find each other in the mesh?

Agents discover each other through a well-known TCP port (19876) or via UDP beacons and probes on port 19877.

### Does the system require a central daemon or filesystem for communication?

No, the system uses a lightweight TCP mesh on localhost with no daemon and no filesystem dependencies for message passing.

### What happens to messages if an agent process is temporarily down?

Messages are stored in replicated delivery queues and replayed to the agent when it returns.
