npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

amp-protocol

v0.2.4

Published

AMP — Agent Messaging Protocol. P2P messaging for AI agents.

Downloads

231

Readme


npm install -g amp-protocol
amp init

That's it. Your AI agent can now send and receive messages.


What is AMP?

AMP is a transport protocol for AI agents — like SMTP, but peer-to-peer. Agents on different machines send messages and files directly to each other. No cloud. No accounts. No API keys.

"Send this to Javier via AMP"  →  encrypted, queued, delivered

If the recipient is offline, messages queue locally and deliver automatically when they reconnect. Works with Claude Code, Cursor, Codex, Windsurf, and any MCP-compatible tool.

Quick start

Install and initialize

npm install -g amp-protocol
amp init

amp init does three things:

  1. Generates your cryptographic identity (Ed25519 + X25519)
  2. Installs the daemon as a background service (launchd)
  3. Configures MCP for detected AI tools

Connect with a peer

# You generate an invite
amp invite
# → amp://invite/eyJ2Ijox...
# Share via WhatsApp, Slack, in person

# They accept it
amp join amp://invite/eyJ2Ijox...

# They generate their invite, you accept it
# Bidirectional connection established

Send messages

amp send javier "The deploy is ready"
amp send javier -f ./report.pdf "Q2 numbers attached"

Or let your AI do it

> "Send this to Javier via AMP"        → amp_send
> "Any messages for me?"               → amp_inbox
> "Reply to Javier's last message"     → amp_reply

How it works

  Your Mac                                    Their Mac
┌──────────────┐                          ┌──────────────┐
│ Claude Code  │                          │   Cursor     │
│      ↕ MCP   │                          │      ↕ MCP   │
│  AMP Daemon  │ ◄── encrypted P2P ────► │  AMP Daemon  │
│    :9800     │                          │    :9800     │
│  ┌────────┐  │     Ed25519 + X25519     │  ┌────────┐  │
│  │ SQLite │  │     NaCl SecretBox       │  │ SQLite │  │
│  │ inbox  │  │                          │  │ inbox  │  │
│  └────────┘  │                          │  └────────┘  │
└──────────────┘                          └──────────────┘

The daemon runs in the background, handles peer discovery, message delivery, and encryption. Your AI tools connect via MCP and get six tools: amp_send, amp_inbox, amp_read, amp_reply, amp_peers, amp_status.

Network discovery

AMP finds peers automatically using three layers:

| Layer | Scope | How | |-------|-------|-----| | mDNS | Same WiFi/LAN | Bonjour — instant, zero-config | | Tailscale | Different networks | Polls tailscale status every 30s | | STUN | Raw internet | Google STUN servers — discovers public IP for hole-punching | | Manual | Fallback | amp set-address javier 83.45.12.99:9800 |

STUN — how it works

STUN only asks "what's my public IP?" — it never sees your messages. Once both peers know each other's address, they connect directly:

David                    STUN Server              Javier
  │── "my IP?" ───────────►│                         │
  │◄── "83.45.12.99:4521" ─│                         │
  │                         │◄── "my IP?" ───────────│
  │                         │── "91.22.33.44:7832" ─►│
  │                                                  │
  │◄══════════ direct P2P (AMP encrypted) ══════════►│

Security

| Layer | Implementation | |-------|---------------| | Identity | Ed25519 keypair — generated locally, never transmitted | | Key exchange | X25519 ECDH | | Encryption | NaCl SecretBox (XSalsa20-Poly1305) | | Signing | Ed25519 detached signatures on invite codes | | Trust | TOFU (Trust On First Use) — like SSH known_hosts | | Contacts | Whitelist-only — unknown peers rejected silently | | At rest | ~/.amp/ with mode 700 |

What a remote peer can do: send you text messages and files (up to 50MB).

What a remote peer cannot do: read your files, execute commands, access your AI tools, see your inbox, list your contacts, or run any code on your machine.

CLI reference

| Command | Description | |---------|-------------| | amp init | Initialize identity + daemon + MCP | | amp status | Node info, peer count, inbox stats | | amp invite | Generate invite code (expires 15 min) | | amp join <code> | Accept an invite | | amp peers | List contacts with online status | | amp send <peer> <msg> | Send a message | | amp send <peer> -f <file> <msg> | Send with file (up to 50MB) | | amp inbox | Show unread messages | | amp inbox --all | Show all messages | | amp read <id> | Read and mark as read | | amp set-address <peer> <ip:port> | Set peer address manually |

MCP tools

| Tool | When your AI uses it | |------|---------------------| | amp_send | "Send this to Javier" | | amp_inbox | "Any new messages?" | | amp_read | "Show me that message" | | amp_reply | "Reply to Javier" | | amp_peers | "Who's online?" | | amp_status | "AMP status" |

File transfer

Any file up to 50MB. Encrypted end-to-end. Received files go to ~/.amp/files/<peer>/.

amp send javier -f ./design.pdf "New mockups"
amp send javier -f ./photo.jpg "From the office"
amp send javier -f ./data.xlsx "Updated sheet"

Architecture

~/.amp/
├── identity.json       # Ed25519 + X25519 keypair (mode 600)
├── amp.db              # SQLite WAL — messages, peers, config
├── daemon.log          # Daemon output
└── files/              # Received files
    └── javier/
        └── report.pdf

Invite handshake

David                                        Javier
  │                                             │
  │  amp invite                                 │
  │  → signed payload: pubkey + addr + TTL      │
  │  → encoded as amp://invite/eyJ...           │
  │                                             │
  │  ── share via WhatsApp / in person ───────► │
  │                                             │
  │                              amp join <code> │
  │                    verify signature + expiry │
  │                    save peer (TOFU)          │
  │                                             │
  │ ◄── Javier sends his invite back ────────── │
  │ amp join <code>                             │
  │ verify + save                               │
  │                                             │
  │ ══════ encrypted channel established ══════ │

Compared to

| | AMP | c2c | MeshTerm | Google A2A | |---|:---:|:---:|:---:|:---:| | P2P (no server) | Yes | relay | broker | HTTP server | | E2E encrypted | NaCl | — | — | TLS only | | Offline delivery | Yes | — | — | — | | Zero-config LAN | mDNS | — | — | — | | MCP native | Yes | Yes | Yes | — | | Open source | MIT | closed | MIT | Apache | | File transfer | 50MB | — | — | — |

What AMP is not

  • Not a chatbot framework — AMP moves messages, it doesn't run models
  • Not a cloud service — no accounts, no servers, no subscriptions
  • Not an orchestrator — it doesn't coordinate workflows
  • Not a blockchain — no tokens, no fees, no consensus

AMP is a transport protocol. Like SMTP for agents.

Requirements

  • Node.js 20+
  • macOS or Linux
  • For LAN: Bonjour (built into macOS) or Avahi (Linux)
  • For WAN: Tailscale (optional) or port 9800 accessible

Contributing

Contributions welcome. Please open an issue first to discuss.

License

MIT