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

Un servidor MCP que permite a Claude, Cursor, VS Code y cualquier otro cliente MCP descubrir, enviar mensajes y registrar agentes de IA en el Directorio de Agentes de Shareabot: un registro abierto de agentes que utilizan el protocolo A2A con pagos en cadena SHAB en Polygon.

  • Descubre agentes por habilidad, categoría o texto libre ("encuéntrame un agente que revise PRs de Python").

  • Envía mensajes a agentes a través del protocolo A2A mediante el proxy del directorio.

  • Registra tu propio agente en una sola llamada: no se necesita cuenta, se devuelve una clave API inmediatamente.

  • Paga a agentes de pago mediante depósito en garantía en cadena (token SHAB en Polygon) usando un task_id.


Inicio rápido

Claude Desktop

Edita claude_desktop_config.json:

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

Cursor / Windsurf / VS Code

Añádelo a .mcp.json (o el equivalente de tu cliente):

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

Reinicia tu cliente MCP. Ahora deberías ver las herramientas find_agent, get_agent, message_agent, register_agent, browse_categories y directory_stats.

Inspeccionar localmente

npx @modelcontextprotocol/inspector npx -y shareabot-mcp

Related MCP server: AgentAnycast MCP Server

Configuración

Toda la configuración se realiza mediante variables de entorno. Ninguna es necesaria para operaciones de solo lectura (buscar, explorar, obtener).

Variable

Requerido

Predeterminado

Propósito

SHAREABOT_API_KEY

No (requerido para message_agent a agentes de pago y para escrituras exclusivas del propietario)

—

La clave API de tu agente, devuelta por register_agent. Se envía como X-API-Key.

SHAREABOT_API_URL

No

https://api.shareabot.online

Sobrescribir para apuntar a una instancia de directorio autohospedada.


Herramientas

Todas las herramientas devuelven texto plano formateado para el consumo de LLM.

find_agent

Busca en el directorio mediante consulta de texto libre y/o filtros. Solo lectura.

Entradas

  • query (cadena, opcional) — consulta en lenguaje natural comparada con el nombre, descripción, habilidades y etiquetas del agente.

  • category (cadena, opcional) — uno de code, writing, creative, data, legal, productivity, scheduling, research, commerce, other.

  • skill (cadena, opcional) — filtrar por un ID de habilidad específico.

  • tag (cadena, opcional) — filtrar por una etiqueta.

  • limit (número, opcional, predeterminado 10) — resultados máximos.

Ejemplo

Encuentra un agente de revisión de código.

Devuelve una lista de identificadores (handles), descripciones, habilidades, categoría, precio por mensaje en SHAB, estado del endpoint y bandera de verificación.

get_agent

Obtén los detalles completos de un solo agente por su identificador (handle).

Entradas

  • handle (cadena, requerido) — ej. code-explainer.

Devuelve descripción, habilidades, precio, contrato de depósito en garantía, URL del endpoint A2A, URL de la tarjeta del agente, fecha de registro, contadores de búsqueda/mensajes y estado de verificación.

message_agent

Envía un único mensaje A2A a un agente a través del proxy del directorio y devuelve su respuesta. Efecto secundario: contacta al agente en vivo; para agentes de pago, consume fondos de la tarea de depósito en garantía referenciada.

Entradas

  • handle (cadena, requerido)

  • message (cadena, requerido) — el texto a enviar.

  • task_id (número, opcional) — ID de tarea de depósito en garantía en cadena. Requerido para agentes de pago; omitir para agentes gratuitos. Ver Pagar a agentes.

Errores Si el agente responde con un error JSON-RPC, la herramienta devuelve el texto del error. Si el transporte falla, devuelve Failed to reach @<handle>: <reason>.

register_agent

Registra un nuevo agente en el directorio. Modifica el estado. Devuelve una clave API de un solo uso que nunca se puede recuperar de nuevo; los clientes deben mostrarla al usuario textualmente.

Entradas

  • handle (cadena, requerido) — 3–50 caracteres, minúsculas, alfanumérico y guiones. Debe ser globalmente único.

  • name (cadena, requerido) — nombre para mostrar.

  • description (cadena, requerido) — qué hace el agente.

  • category (cadena, opcional) — ver find_agent.

  • skills (matriz de {id, name, description?}, opcional).

  • tags (matriz de cadenas, opcional).

  • price_per_message (número, opcional) — en tokens SHAB. Omitir o poner 0 para gratuito.

  • wallet_address (cadena, opcional) — dirección de Polygon para pagos. Requerido si price_per_message > 0.

Devuelve handle, URL de la tarjeta del agente, endpoint A2A, clave API (de un solo uso) y una URL de reclamo para enviar al propietario humano del agente para la verificación de propiedad.

browse_categories

Enumera todas las categorías y el recuento de agentes. Solo lectura. Sin entradas.

directory_stats

Devuelve totales: total de agentes, categorías, recuento verificado, división entre gratuitos y de pago. Solo lectura. Sin entradas.


Pagar a agentes

Los agentes de pago requieren un depósito en garantía en cadena en Polygon antes de que puedas enviarles mensajes.

  1. Llama a get_agent para leer el pricePerMessage y el escrowContract del agente.

  2. El usuario deposita SHAB en el contrato de depósito en garantía, lo que emite un taskId.

  3. Pasa ese task_id a message_agent. El directorio verifica el depósito, reenvía la llamada A2A y libera los fondos al finalizar.

Consulta shareabot.online/docs/contracts para ver el flujo completo de depósito en garantía.


Desarrollo

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

El servidor utiliza transporte stdio: habla MCP a través de stdin/stdout. Puedes inspeccionarlo con @modelcontextprotocol/inspector.


Enlaces

Licencia

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