0x0

v1.4.2
io.github.EijiAC24/0x0 Checked 2 days ago Published 5 days ago

A contact address for your AI agent.

Give an agent (or a person) a reachable address in one command: a locally generated number plus a PIN you share. Revoke the PIN when the task is done and the channel is gone. 0x0 does not distinguish human and agent endpoints — the PIN is the only credential. requires Node.js 22.23.4+, 24.22.1+, or 26.12.1+ (the October 2026 security releases) Register this command as an MCP server in your client:

Summary extracted from the README.

0x0

Contact channel for AI agents and humans. No accounts, no API keys, no server relaying messages.

Give an agent (or a person) a reachable address in one command: a locally generated number plus a PIN you share. Revoke the PIN when the task is done and the channel is gone. 0x0 does not distinguish human and agent endpoints — the PIN is the only credential.


install

npm install -g @0x0contact/c0x0

requires Node.js 22.23.4+, 24.22.1+, or 26.12.1+ (the October 2026 security releases)


for agents

MCP server (any MCP client: Claude Code, Codex, Cursor, ...)

Register this command as an MCP server in your client:

npx -y @0x0contact/c0x0@latest mcp
claude mcp add 0x0 -- npx -y @0x0contact/c0x0@latest mcp   # Claude Code
codex mcp add 0x0 -- npx -y @0x0contact/c0x0@latest mcp    # Codex CLI

JSON configs (Cursor and others):

{ "mcpServers": { "0x0": { "command": "npx", "args": ["-y", "@0x0contact/c0x0@latest", "mcp"] } } }

On native Windows, put cmd /c before npx (in JSON: "command": "cmd", "args": ["/c", "npx", "-y", "@0x0contact/c0x0@latest", "mcp"]).

Tools: whoami, create_pin, send_message, wait_for_message, check_inbox, read_messages, revoke_pin, set_consent. The server creates a number on first run, listens on every active PIN while it runs, and queues messages for offline peers. A typical approval flow: send_message to the address a human gave you, then wait_for_message for their answer.

Trust: each channel pins the first peer's key. Every received message carries a sender with consent (allowed / unknown / denied); a different key later is marked key_changed, and the server refuses to send to it until you call set_consent with allowed and the key it reports (after the person confirms a device change some other way). Requesters on a public PIN start as unknown and become allowed when you reply. Treat anything not allowed as untrusted input.

CLI

c0x0 setup --label "deploy-bot"                   # number (first run) + PIN + your 0x0:// address
c0x0 pin new --label "ci" --expires 24h           # another PIN to hand to a human or another agent
c0x0 whoami                                       # number + active PINs

c0x0 send 0x0-293-4471-0038 a3f9 "build passed"   # send once and exit (queued 72h if offline)
c0x0 listen                                       # wait on all active PINs, emit JSON events
c0x0 inbox --json                                 # check inbox without connecting

For a long-lived channel, c0x0 pipe <number> <pin> reads one JSON command per line from stdin and writes one JSON event per line to stdout:

# stdin
{"type": "message", "content": "deploy to prod? (yes/no)"}
{"type": "ping"}
{"type": "disconnect"}

# stdout
{"type": "connected", "peer": "0x0-293-4471-0038"}
{"type": "sent", "content": "deploy to prod? (yes/no)", "timestamp": 1767225600000}
{"type": "message", "from": "0x0-293-4471-0038", "content": "yes", "timestamp": 1767225660000}
{"type": "pong", "timestamp": 1767225700000}
{"type": "disconnected", "peer": "0x0-293-4471-0038"}
{"type": "error", "code": "PEER_OFFLINE", "message": "not connected"}
import subprocess, json

proc = subprocess.Popen(
    ["c0x0", "pipe", "0x0-293-4471-0038", "a3f9"],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
)
proc.stdin.write(json.dumps({"type": "message", "content": "done"}).encode() + b"
")
proc.stdin.flush()
for line in proc.stdout:
    event = json.loads(line)
    if event["type"] == "message":
        print(event["content"])

Patterns: human → agent (give an always-on agent a PIN), agent → human (notifications, yes/no approvals), agent → agent (share a PIN for one task, then rotate it). A ready-made agent skill ships in the package as SKILL.md and is published at https://0x0.contact/skill.md.


quick start (humans)

# initialize (generates your number)
c0x0 init

# --- share your number + PIN with someone ---
c0x0 pin new --label "for sale"   # creates e.g. "a3f9"
c0x0 whoami                       # shows your number to share

# --- or connect to someone who shared their number + PIN ---
c0x0 chat 0x0-293-4471-0038 a3f9

# done — revoke your PIN when finished
c0x0 pin revoke a3f9

commands

setup

c0x0 init          # generate your number
c0x0 whoami        # show your number
c0x0 renew         # generate a new number (resets all PINs)

local identity migration

c0x0 migrate identity --json          # read-only migration preview
c0x0 migrate identity --apply --json  # create the additive local sidecar
c0x0 migrate preflight --json         # read-only legacy data inventory

These migration tools are local and do not publish an ID, create an account, or change P2P routing. The preflight command reports aggregate counts and blocking categories only; it has no apply mode.

PIN management

c0x0 pin new                          # create a PIN
c0x0 pin new --label "label"          # with label
c0x0 pin new --expires 24h            # expires in 24h (also: 1w)
c0x0 pin new --public                 # create a public PIN (for requests)
c0x0 pin list                         # list all PINs
c0x0 pin rotate <pin>                 # change PIN value
c0x0 pin revoke <pin>                 # permanently revoke

messaging

c0x0 chat <number> <pin>              # interactive chat
c0x0 send <number> <pin> "message"    # send once and exit
c0x0 inbox                            # view all inboxes
c0x0 read <pin>                       # read messages for a PIN
c0x0 listen                           # wait for incoming messages
c0x0 queue                            # show offline message queue

requests (public PIN)

Share a public PIN openly — anyone can message you without knowing your number. First reply creates a dedicated private channel automatically.

c0x0 pin new --public --label "open"  # create a public PIN to share
c0x0 requests                         # list incoming requests
c0x0 approve <shortKey> "message"     # reply and convert to private chat

contacts

c0x0 contact add 0x0://NUMBER/PIN     # add from URI
c0x0 contact add NUMBER PIN           # add manually
c0x0 contact list                     # list contacts
c0x0 contact label <id> "label"       # set label
c0x0 contact remove <id>              # remove

QR code

c0x0 qr <pin>    # show QR code in terminal (scan to connect)

web UI

c0x0 web              # open browser UI at localhost:3000
c0x0 web --port 8080
c0x0 web --lan        # also reachable from other devices on your network (trusted networks only)
c0x0 web --no-open

Starts a local web server with a chat interface. Open the full URL printed by the command; its #session= fragment authenticates the WebSocket and is removed from the address bar after loading. --lan accepts only that session plus an exact local-network origin, so do not reuse a token-free bookmark. Anyone on the same network who gets the session link can read and send your messages, so use --lan only on a network you trust (not public or shared Wi-Fi).


how it works

your number:  0x0-816-8172-8198   (generated locally, never sent anywhere)
your PIN:     a3f9                (you create and revoke it)

connection:   sha256("0x0:{number}:{pin}:0x0-v1-2026") → Hyperswarm topic
transport:    Hyperswarm (DHT-based P2P, Noise protocol)
storage:      ~/.0x0/ (local only)

No accounts. No servers. No registration. Messages route peer-to-peer via Hyperswarm.


URI scheme

0x0://0x0-816-8172-8198/a3f9

Share as a link, QR code, or copy-paste. The other person adds it as a contact and connects directly.


data

Everything lives in ~/.0x0/:

~/.0x0/
├── identity.json       # your number
├── pins.json           # your PINs
├── contacts.json       # saved contacts
├── queue.jsonl         # offline message queue (TTL: 72h)
└── messages/           # message history (per PIN)

Delete ~/.0x0/ to erase all traces.


mobile

Android app available on Google Play. iOS coming soon. The CLI and mobile apps are fully compatible — same number, same PINs, same P2P network.

0x0.contact


license

MIT