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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@artinet/agent-relay-mcp

v0.0.5

Published

A Model Context Protocol (MCP) server for relaying messages between A2A enabled AI agents.

Readme

Website npm version npm downloads Apache License Known Vulnerabilities GitHub stars Discord

Agent Relay MCP Server

A Model Context Protocol (MCP) server that enables AI agents to discover and communicate with other A2A (Agent-to-Agent) enabled AI agents through the @artinet/sdk and @artinet/agent-relay.

Features

  • Automatic Agent Discovery: Scans network ports to discover available agents
  • Multi-Agent Orchestration: Coordinate workflows across multiple specialized agents
  • Message Relay: Send messages to agents and receive responses with full task context
  • Task Management: Query task status and cancel running tasks
  • Agent Discovery: View and search agents by name, description, or skills

Installation

npm install @artinet/agent-relay-mcp

Usage

Commandline

npx @artinet/agent-relay-mcp [callerId] [startPort] [endPort] [scanning-threads]

Example:

npx @artinet/agent-relay-mcp my-assistant 3000 3100 10

*We recommend allocating a small port range because port scanning is resource intensive.

As an MCP Server

import { RelayServer } from "@artinet/agent-relay-mcp";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new RelayServer({
  name: "agent-relay-server",
  version: "0.0.1",
});

await server.init({
  callerId: "my-assistant-name",
  scanConfig: {
    host: "localhost",
    startPort: 3000,
    endPort: 3100,
    threads: 10,
  },
});

const transport = new StdioServerTransport();
await server.connect(transport);

Tool Reference

The server exposes six tools for agent interaction:

sendMessage

Send a message to an agent and receive a response.

| Parameter | Type | Description | | --------- | ------ | ------------------------------------------- | | agentId | string | The ID of the agent to send the message to | | message | string | The message content to send | | taskId | string | (Optional) Task ID to continue conversation |

getTask

Get the current status of a running task.

| Parameter | Type | Description | | --------- | ------ | --------------------------- | | agentId | string | The ID of the agent | | taskId | string | The ID of the task to query |

cancelTask

Cancel a running task.

| Parameter | Type | Description | | --------- | ------ | ---------------------------- | | agentId | string | The ID of the agent | | taskId | string | The ID of the task to cancel |

getAgentCard

Get detailed information about an agent, including its capabilities and skills.

| Parameter | Type | Description | | --------- | ------ | ------------------- | | agentId | string | The ID of the agent |

viewAgents

List all registered agents available to the relay.

searchAgents

Search for agents by name, description, or skills.

| Parameter | Type | Description | | --------- | ------ | ------------------------------- | | query | string | Search query (case-insensitive) |

Configuration

Environment Variables

  • ARTINET_RELAY_SYNC_INTERVAL: Agent discovery sync interval in milliseconds (default: 2500)

Configuration Options

interface AgentRelayConfig {
  callerId: string; // Unique identifier for this relay instance (ensures the agent cannot call itself)
  syncInterval?: number; // Sync interval in ms (default: 2500)
  scanConfig?: {
    host?: string; // Host to scan (default: "localhost")
    startPort?: number; // Starting port (default: 3000)
    endPort?: number; // Ending port (default: 3100)
    threads?: number; // Concurrent scan threads (default: 10)
    fallbackPath?: string; // Agent card fallback path (default: "/.well-known/agent-card.json")
  };
}

How It Works

  1. Discovery: The relay scans a port range (default: 3000-3100) to find agents that expose A2A endpoints
  2. Registration: Discovered agents are registered and their capabilities are cached
  3. Synchronization: Periodic sync keeps the agent registry up-to-date
  4. Relay: Messages are forwarded to appropriate agents based on agent IDs
  5. Task Management: Task status and cancellation are handled through the relay interface

Build

npm run build

Test

npm test

License

Apache-2.0

References