Skip to main content
Glama
E1ainaQwq

MCP Message Bridge

by E1ainaQwq

MCP Message Bridge

A small local MCP server for authenticated, explicit-text message exchange between independent clients. It provides a durable SQLite WAL queue, idempotent sends, replay-safe inbox reads, bounded conversations, manual pause/reset controls, and a client-driven polling boundary.

What is public here

This repository contains generic source only. Participant names, tokens, data paths, and admin identity are configured at runtime. No chat transcript, private memory, database, token, tunnel configuration, provider-specific account setup, or local machine path is included.

Related MCP server: agent-mailbox

Install

python -m venv .venv
.venv\Scripts\python -m pip install -e .
python -m message_bridge.setup_auth --file runtime/auth.json --participants participant-a participant-b --force

The command prints each token once. Keep tokens local. Do not commit runtime/.

Run one participant

$env:BRIDGE_PARTICIPANT = "participant-a"
$env:BRIDGE_TOKEN = "<local token>"
$env:BRIDGE_AUTH_FILE = "runtime/auth.json"
$env:BRIDGE_DATA_DIR = "runtime"
$env:BRIDGE_ADMIN_PARTICIPANT = "participant-a"
python -m message_bridge.server

Start a separate process for each participant using the same data directory. The MCP tools are:

  • bridge_send(to, text, message_id, conversation_id)

  • bridge_inbox(limit, after_id, wait_seconds, acknowledge)

  • bridge_status(action)

Default limits are 12,000 characters per message, 8 sends per participant per conversation, 16 messages per conversation, and 36 total turns. Change these constants in source for a different deployment policy.

Privacy and safety

Only the text explicitly passed to bridge_send is queued. The server does not read model chats, private memory, tool output, cookies, or credentials. It cannot wake a model or create a new model turn. bridge_inbox is client-driven polling. acknowledge=false is replay-safe; acknowledge only after the caller has accepted the response.

The server refuses self-send, invalid identifiers, duplicate payload conflicts, paused sends, conversation limits, turn limits, and unauthenticated clients. Logs contain metadata and never message bodies or tokens. Keep the runtime directory private.

License

MIT. See LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables durable agent-to-agent messaging across any MCP client, DSH session, or A2A agent, with threads, receipts, search, broadcast, attachments, presence, SSE streaming, signing, and wake-on-message.
    73 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables any agent to send a message by name into a live chat or another agent's conversation, and to receive replies by long-polling an inbox cursor that yields each message exactly once, in order, in roughly a tenth of a second. Also lets agents discover reachable chats, threads, and registered agents, with unresolvable names optionally routed to a relay agent for delivery.
    6 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables coding agents such as Codex and Claude Code to exchange durable, locally stored messages through shared MCP tools for listing enrolled recipients, sending and replying to messages, reading pending inbox items, acknowledging receipt, and checking message status. Delivery uses each runtime's native session interface, so messages persist across broker restarts without resuming or launching conversations.
    AGPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables personal agents to exchange durable messages through permanent identities, shared private rooms, direct messages, and owner-approved external contacts while preserving history and supporting push/webhook wake-ups.
    MIT