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

@mjxupup/agentlink

v0.1.0

Published

P2P communication layer for AI programming agents

Readme

AgentLink

P2P communication layer for AI programming agents. Connect AI agents on your local network via encrypted channels, discover peers through mDNS, and delegate tasks — all through the Model Context Protocol (MCP).

Features

  • Encrypted P2P Transport — TCP connections secured with libsodium's XChaCha20-Poly1305 secretstream encryption and Ed25519 key exchange
  • Zero-Config Discovery — mDNS broadcast/listen with automatic peer detection on the LAN, plus static peer fallback
  • Task Delegation — Full task lifecycle (create → accept → progress → complete/fail) with priority, timeout, and artifact support
  • Trust Management — Explicit trust model with auto-approve for known agents, team seed import/export
  • MCP Integration — Exposes all capabilities as MCP tools, resources, and prompts — works with any MCP-compatible AI agent out of the box
  • Audit Logging — Every inbound/outbound event is logged as JSONL for full traceability
  • Network Resilience — Automatic reconnection with exponential backoff, DHCP adaptation, and address book tracking

Architecture

┌─────────────────────────────────────────────────────────┐
│                    AI Agent (MCP Host)                   │
│                  Claude / Cursor / ...                   │
└──────────────────────┬──────────────────────────────────┘
                       │ stdio (MCP)
┌──────────────────────▼──────────────────────────────────┐
│                  AgentLink MCP Server                     │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────────┐ │
│  │  Tools   │ │Resources │ │ Prompts  │ │TrustManager│ │
│  └────┬─────┘ └──────────┘ └──────────┘ └────────────┘ │
│       │         TaskManager    AuditLogger               │
├───────┼─────────────────────────────────────────────────┤
│       │              Transport (TCP)                     │
│       │         ┌──────────────────────┐                │
│       │         │ XChaCha20-Poly1305   │                │
│       │         │ Ed25519 Key Exchange │                │
│       │         └──────────────────────┘                │
├───────┼─────────────────────────────────────────────────┤
│       │           Discovery (mDNS)                       │
│       │    AddressBook     AgentDatabase (SQLite)        │
└───────┴─────────────────────────────────────────────────┘
                       │ TCP / mDNS
          ┌────────────┼────────────┐
          ▼            ▼            ▼
       Agent A      Agent B      Agent C

Quick Start

Option 1: One-click install (Claude Desktop)

Download agentlink.mcpb → double-click → done.

First launch will auto-initialize with defaults.

Option 2: Command line

npx @mjxupup/agentlink serve

First run will guide you through setup. No separate init step needed.

For other MCP hosts (Cursor, VS Code, etc.)

Add to your MCP host config:

{
  "mcpServers": {
    "agentlink": {
      "command": "npx",
      "args": ["-y", "@mjxupup/agentlink", "serve"]
    }
  }
}

Manual init (optional)

npx agentlink init --name "My Agent" --type "coder" --capabilities "code-review,testing"

CLI

agentlink init     Initialize identity and config
agentlink serve    Start MCP server with P2P transport and discovery
agentlink status   Show agent status, trust list, and active tasks
agentlink trust list     List trusted agents
agentlink trust remove <agent-id>   Remove a trusted agent

Init Options

--name <name>              Agent display name
--type <type>              Agent type (e.g. coder, reviewer)
--capabilities <caps>      Comma-separated capability list

MCP Tools

| Tool | Description | |------|-------------| | agentlink_discover | Discover LAN agents. Filter by capability or status. | | agentlink_send_message | Send a message/task to a specific agent. | | agentlink_broadcast | Broadcast a message to all trusted online agents. | | agentlink_get_status | Get detailed info about a specific agent. | | agentlink_wait_for_reply | Block until a task reply arrives or timeout. |

MCP Resources

| URI | Description | |-----|-------------| | agentlink://agents | Currently online agents | | agentlink://tasks | Active (non-terminal) tasks | | agentlink://trust | Trusted agents and trust levels |

Security Model

  • Ed25519 Identity — Each agent generates a key pair at init. Agent IDs are derived from the public key (al-XXXXXXXX-XXXXXXXX-XXXXXXXX).
  • Encrypted Transport — All TCP traffic uses XChaCha20-Poly1305 secretstream with session keys derived via crypto_kx.
  • Signed Messages — Every message is signed with the sender's Ed25519 secret key and verified on receipt.
  • Trust-Based Access — Agents start as untrusted. Explicit trust grants are required for task delegation and broadcasts.
  • Team Seeds — Export/import trust lists for pre-configured team setups.

Configuration

Config is stored in ~/.agentlink/config.json:

{
  "identity": {
    "name": "My Agent",
    "agentType": "coder",
    "capabilities": ["code-review", "testing"]
  },
  "network": {
    "port": 9876,
    "mdns": true,
    "bindAllInterfaces": true,
    "excludeInterfaces": ["docker0", "veth*", "lo"],
    "peers": []
  },
  "security": {
    "requireApproval": "untrusted",
    "autoApproveTrusted": true,
    "maxConcurrentTasks": 3
  },
  "logging": {
    "level": "info",
    "auditLog": true
  }
}

Project Structure

src/
├── cli/               # CLI entry point (commander)
│   ├── index.ts
│   └── actions.ts
├── core/
│   ├── identity.ts    # Ed25519 key generation, signing, verification
│   ├── transport.ts   # TCP transport with encrypted secretstream
│   ├── discovery.ts   # mDNS broadcast/listen + static peers
│   ├── task-manager.ts # Task lifecycle (SQLite-backed)
│   ├── trust-manager.ts # Trust store with team seed import/export
│   ├── audit-logger.ts  # JSONL audit logging
│   ├── address-book.ts  # Peer address tracking
│   └── types.ts       # All shared types and constants
├── db/
│   └── database.ts    # SQLite schema and queries
├── mcp/
│   ├── server.ts      # AgentLinkServer — wires all modules together
│   └── tools.ts       # MCP tools, resources, and prompts
└── index.ts           # Public API exports

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Lint (type check)
npm run lint

Tech Stack

  • Runtime: Node.js (TypeScript, ESM)
  • Transport: Raw TCP with length-framed messages
  • Crypto: libsodium (Ed25519 signing, X25519 key exchange, XChaCha20-Poly1305 encryption)
  • Discovery: bonjour-service (mDNS/DNS-SD)
  • Database: better-sqlite3 (WAL mode)
  • MCP: @modelcontextprotocol/sdk
  • CLI: commander
  • Testing: vitest

License

MIT