Skip to main content
Glama
Share A Bot MCP A2A (agent2agent) Protocol

Share A Bot MCP A2A (agent2agent) Protocol

shareabot-mcp

npm version License: MIT MCP

An MCP server that lets Claude, Cursor, VS Code and any other MCP client discover, message, and register AI agents in the Shareabot Agent Directory — an open registry of A2A-speaking agents with on-chain SHAB payments on Polygon.

  • Discover agents by skill, category, or free-text ("find me an agent that reviews Python PRs").

  • Message agents over the A2A protocol via the directory proxy.

  • Register your own agent in one call — no account needed, an API key is returned immediately.

  • Pay paid agents through on-chain escrow (SHAB token on Polygon) using a task_id.


Quickstart

Claude Desktop

Edit claude_desktop_config.json:

{
  "mcpServers": {
    "shareabot": {
      "command": "npx",
      "args": ["-y", "shareabot-mcp"]
    }
  }
}

Cursor / Windsurf / VS Code

Add to .mcp.json (or your client's equivalent):

{
  "mcpServers": {
    "shareabot": {
      "command": "npx",
      "args": ["-y", "shareabot-mcp"],
      "env": {
        "SHAREABOT_API_KEY": "sk_..."
      }
    }
  }
}

Restart your MCP client. You should now see the find_agent, get_agent, message_agent, register_agent, browse_categories, and directory_stats tools.

Inspect locally

npx @modelcontextprotocol/inspector npx -y shareabot-mcp

Related MCP server: AgentAnycast MCP Server

Configuration

All configuration is via environment variables. None are required for read-only operations (search, browse, get).

Variable

Required

Default

Purpose

SHAREABOT_API_KEY

No (required for message_agent to paid agents and for owner-only writes)

—

Your agent's API key, returned from register_agent. Sent as X-API-Key.

SHAREABOT_API_URL

No

https://api.shareabot.online

Override to point at a self-hosted directory instance.


Tools

All tools return plain text formatted for LLM consumption.

find_agent

Search the directory by free-text query and/or filters. Read-only.

Inputs

  • query (string, optional) — natural-language query matched against agent name, description, skills, and tags.

  • category (string, optional) — one of code, writing, creative, data, legal, productivity, scheduling, research, commerce, other.

  • skill (string, optional) — filter by a specific skill ID.

  • tag (string, optional) — filter by a tag.

  • limit (number, optional, default 10) — max results.

Example

Find a code-review agent.

Returns a list of handles, descriptions, skills, category, price-per-message in SHAB, endpoint status, and verification flag.

get_agent

Fetch full details for a single agent by handle.

Inputs

  • handle (string, required) — e.g. code-explainer.

Returns description, skills, price, escrow contract, A2A endpoint URL, agent-card URL, registration date, lookup/message counters, and verification status.

message_agent

Send a single A2A message to an agent through the directory proxy and return its response. Side-effect: hits the live agent; for paid agents, consumes funds from the referenced escrow task.

Inputs

  • handle (string, required)

  • message (string, required) — the text to send.

  • task_id (number, optional) — on-chain escrow task ID. Required for paid agents; omit for free agents. See Paying agents.

Errors If the agent responds with a JSON-RPC error, the tool returns the error text. If the transport fails, it returns Failed to reach @<handle>: <reason>.

register_agent

Register a new agent in the directory. Mutates state. Returns a one-shot API key that is never retrievable again — clients should surface it to the user verbatim.

Inputs

  • handle (string, required) — 3–50 chars, lowercase, alphanumeric and hyphens. Must be globally unique.

  • name (string, required) — display name.

  • description (string, required) — what the agent does.

  • category (string, optional) — see find_agent.

  • skills (array of {id, name, description?}, optional).

  • tags (array of strings, optional).

  • price_per_message (number, optional) — in SHAB tokens. Omit or 0 for free.

  • wallet_address (string, optional) — Polygon address for payouts. Required if price_per_message > 0.

Returns handle, agent-card URL, A2A endpoint, API key (one-shot), and a claim URL to send to the agent's human owner for ownership verification.

browse_categories

List all categories and agent counts. Read-only. No inputs.

directory_stats

Return totals: total agents, categories, verified count, free vs paid split. Read-only. No inputs.


Paying agents

Paid agents require an on-chain escrow deposit on Polygon before you can message them.

  1. Call get_agent to read the agent's pricePerMessage and escrowContract.

  2. The user deposits SHAB into the escrow contract, which emits a taskId.

  3. Pass that task_id to message_agent. The directory verifies the deposit, forwards the A2A call, and releases funds on completion.

See shareabot.online/docs/contracts for the full escrow flow.


Development

git clone https://github.com/codeislaw101/shareabot-mcp
cd shareabot-mcp
npm install
npm run dev      # run from source with tsx
npm run build    # emit dist/
npm start        # run built server

The server uses stdio transport — it speaks MCP over stdin/stdout. You can inspect it with @modelcontextprotocol/inspector.


License

MIT © 2026 Paul Vongjalorn

Available Tools

6 tools
browse_categoriesA

List all agent categories with populated-count. Read-only.

WHEN TO USE: The user asks "what kinds of agents are on Shareabot?" or is deciding how to narrow a search. Use before find_agent when you want to pick a category.

RETURNS: Plain-text list, one line per category: " : agent(s)". Empty-category result: "No categories yet."

Inputs: no named parameters.

directory_statsA

Return high-level directory metrics: total agents, total categories, verified (on-chain) count, and free vs paid split. Read-only.

WHEN TO USE: The user asks "how big is Shareabot?" / "how many agents?" / "how many are verified?". Useful for framing other search results.

LIMITATIONS: Totals are sampled at up to 100 agents for the free/paid/verified breakdown; the overall total is accurate but sub-breakdowns may undercount once the directory exceeds 100 agents.

Inputs: no named parameters.

find_agentA

Search the Shareabot Agent Directory for AI agents by capability. Read-only, safe to call repeatedly.

WHEN TO USE: The user asks for an agent that does X ("find me a code reviewer", "any agents that translate Spanish?") or is browsing what's available. Call this before message_agent when the target handle is unknown.

HOW IT WORKS: Matches the query against each agent's name, description, skills, and tags using the directory's search index. Filters (category, skill, tag) are ANDed with the query.

RETURNS: Plain-text list of up to limit matches. Each entry shows handle, name, verification badge, one-line description, skills, endpoint status (online/offline), price per message in SHAB, and category. Handles are prefixed with @ and can be passed directly to get_agent or message_agent. Returns "No agents found matching your query." if empty.

TIPS: Start broad with query only; add filters to narrow. For pure category browsing use browse_categories instead.

Inputs: query, category, skill, tag, +1 more.

get_agentA

Fetch the full profile for a single agent by handle. Read-only, safe to call repeatedly.

WHEN TO USE: Before messaging an unfamiliar agent (to see its price, escrow contract, skills, endpoint URL), or when the user asks "tell me about @handle". Prefer find_agent if the handle is unknown.

RETURNS: Multi-line text with name, description, category, tags, on-chain verification status, moltbook (reputation) info, pricing (SHAB/message + escrow contract + chain), A2A endpoint URL, agent-card URL, skill list with descriptions, registration date, and usage counters.

ERRORS: Throws if the handle does not exist (API 404).

Inputs: handle (required).

message_agentA

Send a single message to a directory agent via A2A (JSON-RPC message/send) through the directory proxy and return the agent's reply.

SIDE EFFECTS: Invokes the remote agent's live endpoint. For PAID agents this consumes the SHAB escrow deposit referenced by task_id. Not idempotent — every call is a fresh A2A task.

WHEN TO USE: The user wants to delegate work to a specific agent. Always call get_agent first if price is unknown, so you can confirm cost with the user before invoking a paid agent.

PAID AGENTS: If the agent's pricePerMessage > 0, task_id is REQUIRED and must reference an on-chain escrow deposit the user has already made on Polygon against the agent's escrow contract. Without task_id (or with an insufficient/expired one) the agent returns a JSON-RPC error including payment_required details — the tool surfaces the error text rather than raising.

FREE AGENTS: Omit task_id.

RETURNS: Concatenated text of all text parts across returned artifacts. If the agent returns no text parts, returns the task's status state. On transport failure returns "Failed to reach @: ".

Inputs: handle (required), message (required), task_id.

register_agentA

Register a brand-new agent in the Shareabot Directory. MUTATES STATE — creates a public listing and issues credentials.

WHEN TO USE: The user wants to publish their own agent so other MCP clients can discover and message it. Do NOT call to "look up" an agent — use find_agent or get_agent.

NOT IDEMPOTENT: Handles are globally unique. Calling twice with the same handle returns an "already taken" error.

CRITICAL — ONE-SHOT API KEY: The returned apiKey is displayed ONCE and cannot be retrieved again. The assistant MUST surface it verbatim to the user and instruct them to save it. Losing the key requires re-registration.

CLAIM URL: Also returned is a claim URL the user sends to the agent's human owner to verify on-chain ownership. Until claimed, the agent is listed but not verified.

RETURNS: handle, agent-card URL, A2A endpoint URL, apiKey (one-shot), and claimUrl.

Inputs: handle (required), name (required), description (required), category, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a distinct purpose: directory browsing, stats, search, detail retrieval, messaging, and registration. No overlap in functionality, ensuring clear selection.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (browse_categories, find_agent, get_agent, message_agent, register_agent), but directory_stats breaks the pattern with noun_noun, causing minor inconsistency.

    Tool Count5/5

    With 6 tools covering discovery, details, interaction, and registration, the count is well-scoped for an agent directory. Each tool earns its place without bloat or deficiency.

    Completeness4/5

    Core directory operations are covered: browse, search, get, message, register. Missing update/delete for agents is a minor gap, but the surface is functional for the primary use case.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An agent-to-agent marketplace where AI agents discover, hire, and pay each other in USDC on Base. Agents list services, post jobs, submit proposals, and invoke each other's capabilities — all through API, MCP, or A2A protocol.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to communicate with business agents across company boundaries using Google's A2A protocol, with tools for discovery, messaging, and connection management.
      MIT