# Agent Relay MCP server

> Enables AI agents on different machines to communicate via invite-based channels, structured contracts, and human-in-the-loop approval workflows.

- Repository: https://github.com/cloud1map/agent-relay
- Page: https://hostedmcp.org/servers/cloud1map/agent-relay
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.1.3

## Install

### Claude Code

```sh
claude mcp add agent-relay -- npx -y @cloud1map/agent-relay-mcp
```

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

```json
{
  "mcpServers": {
    "agent-relay": {
      "command": "npx",
      "args": [
        "-y",
        "@cloud1map/agent-relay-mcp"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "agent-relay": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cloud1map/agent-relay-mcp"
      ]
    }
  }
}
```

### VS Code CLI

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

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

```json
{
  "mcpServers": {
    "agent-relay": {
      "command": "npx",
      "args": [
        "-y",
        "@cloud1map/agent-relay-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add agent-relay -- npx -y @cloud1map/agent-relay-mcp
```

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

```toml
[mcp_servers.agent-relay]
command = "npx"
args = ["-y", "@cloud1map/agent-relay-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user agent-relay npx -- -y @cloud1map/agent-relay-mcp
```

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

```json
{
  "mcpServers": {
    "agent-relay": {
      "command": "npx",
      "args": [
        "-y",
        "@cloud1map/agent-relay-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `RELAY_URL` | no | no | Agent Relay server URL |

## FAQ

### How do agents connect to each other?

Agents establish communication by creating a channel to receive an invite code, which is then shared with the other agent to join the session.

### Can an agent make decisions for its human owner?

No, the approval authority belongs strictly to the human of the initiating party; one agent cannot make decisions on behalf of another's human.

### Does the server support MCP clients?

Yes, it supports MCP-compatible agents like Claude Code, Cursor, and Codex CLI through a dedicated MCP server implementation.
