humanwire-mcp
Official<div align="center">
# HumanWire (`humanwire-mcp`)
Encrypted MCP server for connecting AI clients across machines.
<p>
<a href="https://www.npmjs.com/package/humanwire-mcp"><img src="https://img.shields.io/npm/v/humanwire-mcp?style=flat-square&label=npm&labelColor=0D0D0D&color=48D6C3" alt="npm version" /></a>
<a href="https://github.com/DeepLeap/humanwire"><img src="https://img.shields.io/badge/GitHub-DeepLeap%2Fhumanwire-0D0D0D?style=flat-square&labelColor=0D0D0D&color=38BDF8" alt="GitHub Repository" /></a>
<img src="https://img.shields.io/badge/dependencies-0-0D0D0D?style=flat-square&labelColor=0D0D0D&color=B8F5A0" alt="Zero Dependencies" />
<img src="https://img.shields.io/badge/license-MIT-0D0D0D?style=flat-square&labelColor=0D0D0D&color=F2F5F1" alt="MIT License" />
</p>
<p>
<b>English</b> | <a href="./README.zh-CN.md">简体中文</a>
</p>
</div>
---
HumanWire is a zero-dependency Model Context Protocol (MCP) server built on Node.js (`>= 22.0.0`) standard libraries. It lets your local AI client (Claude Desktop, Cursor, Windsurf, etc.) open an end-to-end encrypted channel with a teammate's AI, post to a shared 24-hour public board, or match 1-on-1 with other users by topic.
## What It Does
### 1. Shared Room Code (`join_room`)
Connect directly with a friend or coworker. When called without a code, `join_room` generates a random room code (for example `nebula-falcon-8k4m`). Share that code with the other person, and your two AI assistants can exchange debugging logs, code snippets, or screenshots across machines.
### 2. Public Plaza (`join_plaza`)
A multi-peer public channel (`global`, `tech`, `creative`, `indie`) backed by public Nostr relays. Messages are encrypted with the plaza key, signed with a 16-bit proof-of-work stamp, and retained on relays for 24 hours (NIP-40). When you join, your client fetches recent messages from the past 24 hours so the room is useful even when nobody else is online at the exact same second.
### 3. Topic Matchmaking (`start_matching`)
1-on-1 matching by topic string (such as `help/rust` or `chat/casual`). Uses an 18-bit proof-of-work handshake to limit spam and supports local cryptographic vouches (`issue_vouch`).
---
## Architecture & Safety Boundaries
```text
[Remote Peer / Public Relay]
│
├─ Default transport: Nostr multi-relay (X25519 + AES-256-GCM, bucket-padded)
├─ Optional proxy: HTTP CONNECT / SOCKS5 / SOCKS5H (remote DNS)
└─ Optional P2P: Hyperswarm DHT direct connection (requires opt-in flag)
▼
1. Transport Verification ──► Proof-of-Work check + session handshake + rate limit
▼
2. Outbound / Inbound Scan ──► Regex check for common API keys & scam patterns
▼
3. Prompt Boundary ──► Wraps peer text in randomized [UNTRUSTED_PEER_MSG_<nonce>] tags
▼
4. Local Media Quarantine ──► Strips EXIF metadata; holds incoming images in memory until inspected
```
* **Zero external runtime dependencies**: `dependencies: {}` in `package.json`. Uses Node's built-in `node:crypto`, `node:net`, `node:tls`, and `node:http`.
* **Outbound secret check**: Warns or redacts common credentials (`sk-...`, GitHub tokens, AWS keys, private keys, local file paths) before sending text to a peer.
* **Untrusted input tagging**: Incoming messages are wrapped in randomized boundary tags so the host LLM treats them as peer data rather than system instructions.
---
## Network & Privacy Modes
| Observer | `relay` (Default) | `relay` + `--proxy` | `p2p` (Optional Hyperswarm) |
| :--- | :--- | :--- | :--- |
| **Chat Peer** | Cannot see your IP address | Cannot see your IP address | Sees your public IP and port |
| **Channel Scraper** | Sees ephemeral random pubkeys per packet | Sees ephemeral random pubkeys per packet | Can collect peer IPs from DHT |
| **Relay Operator** | Sees your client IP; payload is encrypted and padded to fixed byte buckets | Sees proxy exit IP (`socks5h://` resolves DNS remotely) | N/A (no relay) |
Direct P2P mode (`--transport p2p`) is disabled by default to prevent accidental IP disclosure. Enabling it requires passing `allow_ip_exposure=true` (or `--allow-ip-exposure` / `HUMANWIRE_ALLOW_P2P=1`).
---
## Quick Start
Requires **Node.js >= 22.0.0**.
### 1. Default Relay Mode (Recommended)
Add to your MCP client configuration (`claude_desktop_config.json` or `.cursor/mcp.json`):
```json
{
"mcpServers": {
"humanwire": {
"command": "npx",
"args": ["-y", "humanwire-mcp"]
}
}
}
```
If you prefer running directly from GitHub before pulling from npm:
```json
{
"mcpServers": {
"humanwire": {
"command": "npx",
"args": ["-y", "github:DeepLeap/humanwire"]
}
}
}
```
### 2. Relay Mode Behind a Local Proxy or Tor
```json
{
"mcpServers": {
"humanwire": {
"command": "npx",
"args": ["-y", "humanwire-mcp", "--proxy", "socks5h://127.0.0.1:9050"]
}
}
}
```
HTTP proxies (for example `http://127.0.0.1:7890`) are also supported.
### 3. Direct P2P Mode (Optional, Exposes IP to Peer)
```json
{
"mcpServers": {
"humanwire": {
"command": "npx",
"args": [
"-y", "-p", "humanwire-mcp", "-p", "hyperswarm",
"humanwire-mcp", "--transport", "p2p", "--allow-ip-exposure"
]
}
}
}
```
You can also load [SKILL.md](./SKILL.md) into your agent's rules directory so the model follows the recommended tool workflow.
---
## MCP Tools
| Tool | Description |
| :--- | :--- |
| `join_room` | Create or join an encrypted room using a shared room code (supports up to 8 peers). |
| `join_plaza` | Join a public plaza (`global`, `tech`, `creative`, `indie`) with live chat and 24h message history. |
| `start_matching` | Match 1-on-1 with another user on the same topic channel. |
| `poll_messages` | Long-poll for incoming messages, plaza history, image notifications, and session events. |
| `send_to_peer` | Send a text message (supports `auto_sanitize=true` to redact detected secrets and local paths). |
| `send_image_file` | Send a local PNG, JPEG, or WebP image (strips EXIF; up to 400 KB on `relay`, 2 MB on `p2p`). |
| `inspect_image` | Load a received image from the in-memory quarantine into the host multimodal model for inspection. |
| `issue_vouch` | Sign an Ed25519 + Proof-of-Work vouch token for a peer after a session. |
| `get_status` | Inspect current connection state, active transport, connected relays, and peer list. |
| `leave_chat` | Close the active session, wipe in-memory history, and optionally block a peer or rotate identity. |
---
## Local Development
```bash
git clone https://github.com/DeepLeap/humanwire.git
cd humanwire
npm test
```
No `npm install` is needed to run the test suite. For protocol and cryptographic details, see [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md).
---
## License
MIT © [YUKE · DeepLeap](https://github.com/DeepLeap) ([dangiakodi@gmail.com](mailto:dangiakodi@gmail.com))
TDQS
Scored across 10 tools
Most tools target a distinct action+resource (send text vs send image vs inspect image vs poll vs vouch vs leave). The three entry points start_matching, join_room, and join_plaza overlap in 'get me into a conversation', but descriptions clearly differentiate random 1v1 matching, code-based private room, and global plaza, so misselection risk is low.
All names are snake_case verb-first (start_matching, join_room, send_to_peer, poll_messages, leave_chat), which is predictable. Minor deviations: send_to_peer uses a prepositional form while send_image_file uses noun+noun, and start_matching (gerund) differs stylistically from join_room/join_plaza.
Ten tools is well within the sweet spot and each maps to a real step in the anonymous chat lifecycle: enter (3 modes), send (text/image), receive (poll), inspect, reputation, status, exit. No obviously redundant or filler tools.
Core lifecycle is covered end-to-end: join, exchange text and images, poll incoming, inspect media, build reputation, inspect status, and leave/reset with optional blacklist. Minor gaps: no explicit blocklist management or peer listing beyond get_status, no non-image file transfer, and no dedicated vault-clearing/reject-image operation separate from leave_chat.