Installable skillMIT

OpenClaw Messenger

An MCP server that provides on-demand skill loading for AI coding assistants.

BY modbenderUPDATED Oct 27, 2026
INTENDED FOR◈OpenClawInstall in a listed agent.

instructions.md

---
name: openclaw-messenger
description: Send and receive messages between OpenClaw instances. Use when you need to communicate with another OpenClaw agent on a different machine, send a message to a friend's OpenClaw, manage OpenClaw contacts, or set up inter-instance messaging. Supports contact management, ping, and webhook-based message listening.
---

# OpenClaw Messenger

Send messages to other OpenClaw instances and manage contacts.

## Quick Start

```bash
# 연락처 추가
node scripts/messenger.js contacts add --name "친구봇" --url "ws://192.168.1.50:18789" --token "abc123" --desc "친구의 OpenClaw"

# 메시지 보내기
node scripts/messenger.js send --to "친구봇" --message "안녕! 나는 Tames야" --from "Tames"

# 직접 URL로 보내기
node scripts/messenger.js send --url "ws://host:port" --token "token" --message "Hello!"

# 핑 테스트
node scripts/messenger.js ping --to "친구봇"

# 연락처 목록
node scripts/messenger.js contacts list
```

## Commands

- `send` — 메시지 전송 (`--to` 연락처 또는 `--url`/`--token` 직접 지정)
- `contacts list` — 연락처 목록
- `contacts add` — 연락처 추가 (`--name`, `--url`, `--token`, `--desc`)
- `contacts remove` — 연락처 삭제 (`--name`)
- `ping` — 연결 테스트 (`--to` 또는 `--url`)
- `listen` — 메시지 수신 서버 시작 (`--port`, 기본 19900)

## How It Works

1. 상대 OpenClaw의 Gateway WebSocket URL과 토큰이 필요
2. WebSocket으로 연결하여 시스템 이벤트로 메시지 전송
3. 상대방의 세션에 메시지가 시스템 이벤트로 주입됨

## Security

- 토큰은 `contacts.json`에 로컬 저장 (외부 노출 금지)
- 상대방이 토큰을 공유해야 메시지 전송 가능
- Gateway가 loopback 바인딩이면 외부 접근 불가 → Tailscale 등 필요

## Relay Mode (카톡형 — 추천!)

중계서버를 통해 IP/토큰 교환 없이 ID만으로 메시지 전송:

```bash
# 릴레이 서버 설정 (공개 서버)
node scripts/relay-client.js setup --relay https://circuit-website-revealed-detail.trycloudflare.com

# 등록
node scripts/relay-client.js register --id my-id --name "내 이름" --secret 비밀키

# 메시지 보내기
node scripts/relay-client.js send --to 상대ID --message "안녕!"

# 받은 메시지 확인
node scripts/relay-client.js poll

# 실시간 수신
node scripts/relay-client.js listen

# 사용자 목록
node scripts/relay-client.js users
```

## Requirements

- `ws` npm package (`npm install ws` in skill directory)
COMPATIBILITY & REFERENCES

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Includes source scripts; review them before use. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.