Skip to main content
Glama
agentic-messaging-mcp

agentic-messaging-mcp

by ReferMore

agentic-messaging-mcp

An MCP server that gives an LLM agent the agentic message bus as native tools — no CLI, no polling loop to hand-roll. Configure it in your agent's MCP client with the agent's credentials, and the agent can send, receive, and discover contacts as tool calls.

Tools

Tool

What it does

send_message(to, body, correlation_id?)

send a message to an agent by handle

check_messages(peek?)

fetch new messages addressed to you; marks them read unless peek

list_contacts(capability?)

list agents you can message, optionally filtered by capability

presence(handle)

is a given agent currently online

whoami()

your handle + connection status

The agent discovers these automatically from the server (with descriptions) — you don't have to document them to the agent.

Related MCP server: agent2agent

Setup

Requires Node 22+. Install dependencies once:

npm install

Then register it in your agent's MCP client, passing the agent's three credentials as env vars.

Claude Desktop — claude_desktop_config.json

{
  "mcpServers": {
    "agentic-messaging": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/agentic-messaging-mcp/server.mjs"],
      "env": {
        "MSG_BASE": "https://your-bus.example.com",
        "MSG_HANDLE": "your-handle",
        "MSG_TOKEN": "amsg_your_token"
      }
    }
  }
}

Claude Code — CLI

claude mcp add agentic-messaging \
  -e MSG_BASE=https://your-bus.example.com \
  -e MSG_HANDLE=your-handle \
  -e MSG_TOKEN=amsg_your_token \
  -- node /ABSOLUTE/PATH/agentic-messaging-mcp/server.mjs

Any MCP client

  • command: node

  • args: ["/ABSOLUTE/PATH/agentic-messaging-mcp/server.mjs"]

  • env: MSG_BASE, MSG_HANDLE, MSG_TOKEN — all three required

Notes

  • All three credentials are required (same contract as the CLI client). Missing any → every tool returns a {"error":"not configured…"} result.

  • stdio transport. The server logs only to stderr; stdout is the MCP protocol channel.

  • Security model matches the client: the token is the credential (hashed + revocable server-side); the handle is admin-assigned provisioning metadata.

  • Publishing this to a registry later would let clients run it via npx (no path), an even cleaner onboarding step.

License

MIT © ReferMore.

Available Tools

5 tools
check_messagesCheck for new messagesA

Fetch new messages addressed to you (from other agents) since you last checked. Marks them read unless peek=true. Returns an array; empty means nothing new.

Inputs: peek.

list_contactsList agents you can messageA

List the agents on the bus (your contacts), optionally filtered by a capability tag. Use this to decide who to route a task to.

Inputs: capability.

presenceIs an agent onlineA

Check whether a given agent currently has a live connection.

Inputs: handle (required).

send_messageSend a messageB

Send a message to another agent by handle. Optionally pass correlation_id to match a later reply.

Inputs: to (required), body (required), correlation_id.

whoamiYour identity + connection statusA

Return your own handle, the bus URL, and how many contacts are reachable (also verifies your token).

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: sending, receiving, listing contacts, checking presence, and identity. No ambiguity.

    Naming Consistency4/5

    Most tools follow verb_noun pattern (send_message, check_messages, list_contacts), but 'presence' and 'whoami' deviate slightly, breaking full consistency.

    Tool Count5/5

    5 tools is well-scoped for a messaging agent, covering core operations without being too few or too many.

    Completeness4/5

    Covers essential messaging operations, but lacks an explicit reply tool or contact management (add/remove), though correlation_id partially addresses replies.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers