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

@tsagent/orchestrator

v1.3.6

Published

MCP server that bridges to @tsagent/server instances via the A2A client

Readme

@tsagent/orchestrator

An MCP (Model Context Protocol) server that allows an agent to delegate to one or more sub-agent A2A (Agent-to-Agent) servers. This server allows MCP clients to discover and interact with A2A agents through standardized MCP tools.

While this MCP server was designed with TsAgent in mind, it can be used by any agent (TsAgent or otherwise) that supports MCP to allow it to interact with A2A servers (or directly with TsAgent agents).

About TSAgent

This package is part of TSAgent, an open-source TypeScript-first platform for building, testing, running, and orchestrating AI agents.

Features

  • MCP Protocol Compliance: Full MCP server implementation with proper tool schemas
  • A2A Server Connection: Connect to external A2A servers via HTTP endpoints
  • Embedded Agent Support: Run local agents directly using file paths (via a2a-server)
  • Agent Discovery: Automatically discover and list available A2A agents
  • Message Routing: Send messages to specific agents by ID

Installation

npm install @tsagent/orchestrator

Usage

Command Line

# Connect to external A2A servers
npx @tsagent/orchestrator http://localhost:4000 http://localhost:4001

# Run with local agent files (embedded mode)
npx @tsagent/orchestrator ./agent1 ./agent2

# Mix of HTTP and file paths
npx @tsagent/orchestrator http://remote-agent.com ./local-agent

Programmatically

import { A2AMCPServer } from '@tsagent/orchestrator';

// Connect to external A2A servers
const server = new A2AMCPServer(['http://localhost:4000', 'http://localhost:4001']);
await server.start();

Available MCP Tools

a2a_list_agents

List all available A2A agents and their capabilities.

Parameters: None

Returns:

{
  "agents": [
    {
      "agentId": "agent_001",
      "name": "Agent Name",
      "description": "Agent description",
      "version": "1.0.0",
      "url": "http://localhost:4000",
      "provider": {
        "organization": "Organization Name",
        "url": "https://organization.com"
      },
      "iconUrl": "https://example.com/icon.png",
      "documentationUrl": "https://docs.example.com",
      "skills": [
        {
          "id": "skill-id",
          "name": "Skill Name",
          "description": "Skill description",
          "examples": ["example1", "example2"],
          "inputModes": ["text", "image"],
          "outputModes": ["text"],
          "tags": ["tag1", "tag2"]
        }
      ],
      "capabilities": {
        "streaming": true,
        "pushNotifications": false,
        "stateTransitionHistory": false
      }
    }
  ]
}

a2a_send_message

Send a message to a specific A2A agent.

Parameters:

  • agentId (required): The unique ID of the A2A agent (from a2a_list_agents)
  • message (required): The message to send to the agent

Returns:

{
  "response": "Agent response text",
  "taskId": "task-id-if-applicable",
  "status": "completed|unknown"
}

How It Works

External A2A Servers

When you provide HTTP URLs (e.g., http://localhost:4000), the server:

  1. Connects to the A2A server endpoint
  2. Fetches the agent card from /.well-known/agent-card.json
  3. Creates an A2A client for communication
  4. Maps the agent to a unique ID for MCP tool calls

Embedded Agents

When you provide file paths (e.g., ./agent), the server:

  1. Starts an embedded A2A server using the a2a-server package
  2. Loads agents from the specified file paths
  3. Creates HTTP endpoints for the embedded agents
  4. Treats them the same as external servers

Example MCP Client Usage

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';

// Connect to the MCP server
const transport = new StdioClientTransport({
  command: 'npx',
  args: ['@tsagent/orchestrator', 'http://localhost:4000']
});

const client = new Client({
  name: 'a2a-client',
  version: '1.0.0'
}, {
  capabilities: {}
});

await client.connect(transport);

// List available agents
const agents = await client.callTool({
  name: 'a2a_list_agents',
  arguments: {}
});

// Send a message to an agent
const response = await client.callTool({
  name: 'a2a_send_message',
  arguments: {
    agentId: 'agent_001',
    message: 'Hello, how are you?'
  }
});

console.log(response);

Related Packages

  • @tsagent/core - Core TypeScript agent framework
  • @tsagent/cli - Command-line interface for agent operations
  • @tsagent/server - A2A protocol server for exposing agents as HTTP endpoints

Development

# Build the package
npm run build

# Run in development mode
npm run dev

# Run tests
npm test

License

MIT License - see LICENSE for details.