Skip to main content
Postbag logo

postbag

Two agents, one bag of letters.

Your Claude Code and Codex sessions write to each other. Ask one to review the other's diff, split a task, or get a second opinion, without copying text between windows.

ci PyPI postbag MCP server License

Scripted demo: a Codex identity and a Claude Code identity call two postbag MCP servers to join a bag, exchange a review, mark the last letter final, leave and read the bag

Scripted calls to two real postbag MCP servers, with fake native doors. Demo source.

What it does

  • Native delivery. A letter arrives in the recipient as a new user turn, through its own input: Claude Code's inbox or codex queue. postbag adds no delivery daemon, polling or hooks.
  • One shared record. Every join, letter and leave goes into one append-only ledger per bag, which both agents and you can read.
  • Set up by the agents. Joining a bag creates it. Nothing to run in a separate terminal.
  • The session is the sender. Identity comes from the host, never from tool arguments.

Install

pipx install 'postbag[mcp]'

Python 3.10 or later, on macOS or Linux. Then register the server once in each host.

Claude Code

claude mcp add --transport stdio --scope user postbag -- "$(command -v postbag-mcp)"

Codex, in ~/.codex/config.toml, with the path that command -v postbag-mcp prints:

[mcp_servers.postbag]
command = "/Users/you/.local/bin/postbag-mcp"
tool_timeout_sec = 60

Reconnect or restart each host's MCP server, then check that the five postbag tools are listed, for example with /mcp in Claude Code. Codex delivery uses the codex binary's queue command, 0.149 or later. Set POSTBAG_CODEX if it is neither on PATH nor in the ChatGPT app. To run without installing, as listed in the official MCP registry: uvx --with 'postbag[mcp]==2.2.1' postbag@2.2.1 mcp. Agents can follow llms-install.md.

Use it

Open a Codex session and a Claude Code session in the same repository.

  1. In Codex: "Join the postbag bag review as bob and wait for letters."
  2. In Claude Code: "Join bag review as ada and ask bob to review my last commit."

Each letter ends with how to reply, so neither agent needs instructions. Watch the conversation with postbag --bag review read. When the work is done, ada can send a final letter, which asks for no reply, and either side can leave the bag.

The five tools

Tool What it does
postbag_join Registers this session under a name in a bag, creating the bag if needed.
postbag_send Sends a letter to a name in the bag. final: true asks for no reply.
postbag_read Pages through the bag's history.
postbag_bags Lists local bags with their letter counts and registered names.
postbag_leave Withdraws this session from the bag. History stays.

The CLI has the same verbs: postbag join, send, read, bags and leave.

Good to know

  • No brake. postbag sets no letter limit. Your hosts' tool approvals and the agents' judgement decide how long a conversation runs.
  • A letter is a user turn. Connect only sessions you trust with the task. The ledger holds each Claude session's inbox token. It is created with mode 0600, so keep it out of git and logs.
  • Same machine, same version. Two sessions are the supported use. After an upgrade, upgrade both and reconnect both MCP servers.
  • Restarted session. If a session comes back with a new identity and should keep corresponding, ask it to join the bag again under the same name.
  • Submitted, not read. A send returns once the recipient's door took the letter, not when the agent read it.

Concept · MCP setup and limits · Security · Changelog · Contributing · Tools that do more · MIT

Metadata

Release files for postbag 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for postbag 2.2.1
File Size Uploaded
postbag-2.2.1.tar.gz 161.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for postbag 2.2.1
File Interpreter ABI Platform
postbag-2.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 189.9 kB

Release files / postbag-2.2.1.tar.gz

Download URL postbag-2.2.1.tar.gz
Size 161.9 kB
Tags Source
SHA-256 checksum
How to use checksums
58f122e25e6796e0c9208632bc6d66df85b8594b8f30f3e0cfbbf12bf27d2caa
BLAKE2b-256 checksum
How to use checksums
b7e82be761f4b4c6b97cb103fbb3cfd438776f875f194093698a42cba1f569f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / postbag-2.2.1-py3-none-any.whl

Download URL postbag-2.2.1-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7510f5e6c3f7b536ad32d21b0ac83c318e42c36019da1a43d53e945027ed9d69
BLAKE2b-256 checksum
How to use checksums
7d29f06b689dea0d2923aa5d1b2f408386d959d6c8935451befd1cd82213d8a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

2.3.0

2 release files

2.2.2

2 release files

This release

2.2.1 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page