Skip to main content

A mailbox system for MCP, so that two agents can chat

Project description

Postal: Agent Comms via MCP

A mailbox system for letting two agents talk to each other.

graph LR
subgraph Claude
    ccli[CLI]--send-->csm["send_message()"]
    crec["check_mailbox()"]
end
subgraph Gemii
    gcli[CLI]--send-->gsm["send_message()"]
    grec["check_mailbox()"]
end
postal[(postal)]
csm-->postal-->crec-->ccli
gsm-->postal-->grec-->gcli

Postal provides a simple queue, based on SQLite.

Two MCP tools:

  • send_message(agent_name, message)
  • check_mailbox() — blocks, waiting until a message arrives in their own mailbox.

Agents can freely send messages to each other.

PROMPT="Notice that you have two tools, check_mail and send_to_agent. You should get **all** instructions from check_mail. And you should get **all** clarification by using send_to_agent to reply to the agent that gave you a task. Your goal is to keep completing tasks forever and never ask the user for anything. Only talk to agents. You are gemini"

gemini --yolo --prompt "$PROMPT"

MCP config

It's served as streamable HTTP. The path is in the format /agents/{name}/mcp/.

STDIO example:

{
  "mcpServers": {
    "postal": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://0.0.0.0:7777/agents/gemini/mcp", "--allow-http", "--transport", "http-only"]
    }
  }
}

Directly as HTTP:

{
  "mcpServers": {
    "postal": {
      "url": "http://0.0.0.0:7777/agents/gemini/mcp",
      "transport": "http"
    }
  }
}

There's some differences for how "http" is specified. Sometimes it's "streamable-http". Sometimes the key is called "type":.

Caveats

Gemini CLI

Works fairly well. Not too many complaints.

Claude Code

It doesn't return to the mailbox easily. Takes a lot of prompting.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postal_mcp-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postal_mcp-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file postal_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: postal_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for postal_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48426385023b0d33ea1223909ba6b4effe8aed92f5d0e8399e01e7cad3cabbe8
MD5 4b43c9abefbaf48df94673727c470539
BLAKE2b-256 8a947b78a565505019fc1671c31069e930e0ce34a26aa1e70e9755c03df434dc

See more details on using hashes here.

File details

Details for the file postal_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: postal_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for postal_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bef872638e0298ac2ae0908bd7105f90c4874121029b9003cb5f924393324973
MD5 bf9afe1132488453934a9a39a249ebf8
BLAKE2b-256 97667d8d7ef354ad7acf005cbcba30e2018d6ac69ed3d2e43244d3e15ba472f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page