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

a2a-client

v1.3.1

Published

Agent client using agent2agent protocol

Readme

a2a-client

Agent client using the Agent2Agent (A2A) protocol.

Supports two modes from the same binary:

  • Interactive CLI — talk to an A2A agent directly in the terminal
  • MCP server — expose the agent as a Model Context Protocol tool so any MCP-compatible client (Joule Desktop, Claude Desktop, Cursor, etc.) can use it

Prerequisites

The target agent must be running and reachable before launching a2a-client.

Installation

npm install -g a2a-client

Usage

Interactive CLI

a2a-client <agent-url>

Example:

a2a-client http://localhost:41241

At startup the agent card (name, version, description, skills) is displayed. Then type messages and press Enter to send them. The conversation context is preserved across turns.

Keyboard shortcuts

| Key | Action | |-----|--------| | / | Open command picker | | Ctrl+C | Quit |

Commands (type / to open the picker)

| Command | Description | |---------|-------------| | /exit | Close the session and quit | | /new | Start a fresh conversation (new context ID) |

MCP server

a2a-client <agent-url> --port <n>

Example:

a2a-client http://localhost:41241 --port 3000

This connects to the agent, fetches its card, then starts an HTTP MCP server on http://127.0.0.1:<port>. The server exposes a single tool submit_prompt whose description is built from the agent card.

Tool: submit_prompt

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | prompt | string | yes | The message to send to the agent | | contextId | string | no | Context ID from a previous turn (for multi-turn conversations) | | taskId | string | no | Task ID from a previous turn |

The tool returns a JSON object:

{
  "response": "<agent reply>",
  "contextId": "<uuid>",
  "taskId": "<string>"
}

Pass contextId and taskId from one turn into the next to maintain conversation state across stateless MCP calls.

Connecting Claude Desktop

Add this to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "my-agent": {
      "command": "a2a-client",
      "args": ["http://localhost:41241", "--port", "3000"],
      "transport": "http",
      "url": "http://127.0.0.1:3000"
    }
  }
}

End-to-end flow

CLI mode

a2a-client                              agent
│                                           │
│── GET /.well-known/agent-card.json ──────▶│
│◀─ { name, version, description, skills } ─│
│   (rendered as the startup box)           │
│                                           │
│── POST /a2a  { message/send, stream } ───▶│
│◀─ SSE: statusUpdate / task events ────────│
│   (spinner → "Agent: <response>")         │
│                                           │
│── POST /a2a  { same contextId/taskId } ──▶│  ← next turn
│◀─ SSE: ...                                │

MCP server mode

MCP client          a2a-client (MCP server)         agent
│                           │                            │
│── initialize ────────────▶│                            │
│◀─ { tools: [submit_prompt] }                           │
│                           │── GET /agent-card ────────▶│
│                           │◀─ { name, description… } ──│
│                           │                            │
│── tools/call ────────────▶│                            │
│   submit_prompt(prompt)   │── POST /a2a (stream) ─────▶│
│                           │◀─ SSE events ──────────────│
│◀─ { response, contextId, taskId }                      │
│                           │                            │
│── tools/call ────────────▶│                            │
│   submit_prompt(prompt,   │── POST /a2a (same context)▶│
│     contextId, taskId)    │◀─ SSE events ──────────────│
│◀─ { response, contextId, taskId }                      │