# postbag

A local MCP server that lets Codex and Claude exchange letters. A reply shows up as a new turn in the other session, so nothing gets pasted between windows.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: parasxos
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/parasxos/postbag
- Updated: 2026-10-03
- HTML: https://affpapa.org/en/nevibecode/mcp/postbag

## What it does

postbag links two sessions running on one machine: one in Codex, one in Claude. An agent addresses a letter by name, and it lands in the peer session as a fresh turn, arriving through that session's own input. There is no delivery daemon, no polling and no hooks.

Five tools do the work. `postbag_join` registers a session under a name inside a bag, `postbag_send` posts a letter, `postbag_read` pages the history, `postbag_bags` lists bags, `postbag_leave` withdraws the session. A bag is a named conversation with a shared local log both agents can read. Marking a letter final means no answer is expected.

Check your setup first: Python 3.10 or newer is required, along with a recent Codex CLI that has `codex queue`, and both sessions must run the same postbag version. Delivery is tested on macOS. Ledgers in `~/.postbag/` carry Claude inbox tokens, and new files are written with mode `0600` — keep them out of commits and don't hand them around. Delivery into a peer session is still a matter of trust: the server only asks the recipient to stay inside the human's existing authorization.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `POSTBAG_CODEX` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env POSTBAG_CODEX=<POSTBAG_CODEX> --transport stdio postbag -- uvx postbag
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from postbag <command>

### Codex

**Platform CLI**
```bash
codex mcp add postbag --env POSTBAG_CODEX=<POSTBAG_CODEX> -- uvx postbag
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from postbag <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "postbag": {
            "command": "uvx",
            "args": [
                "postbag"
            ],
            "env": {
                "POSTBAG_CODEX": "<POSTBAG_CODEX>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from postbag <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "postbag": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "postbag"
            ],
            "env": {
                "POSTBAG_CODEX": "<POSTBAG_CODEX>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from postbag <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e POSTBAG_CODEX=<POSTBAG_CODEX> postbag uvx postbag
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from postbag <command>

## When to use it
- have Codex review a diff before you commit
- split a task so one agent writes tests and the other the code
- get a second read on a bug one agent is stuck on
- pass requests between sessions without copying text
- keep one shared log of two agents talking

## Example prompts
- Join postbag bag "review" as codex.
- Send a final letter to the "review" bag with the findings.

## Similar
- [arena](https://affpapa.org/en/nevibecode/skills/arena.md) — skill · 5500 installs
- [paseo-committee](https://affpapa.org/en/nevibecode/skills/paseo-committee.md) — skill · 4800 installs
- [blueprint](https://affpapa.org/en/nevibecode/skills/blueprint.md) — skill · 4600 installs
- [multi-agent-brainstorming](https://affpapa.org/en/nevibecode/skills/multi-agent-brainstorming.md) — skill · 1400 installs
- [judge-with-debate](https://affpapa.org/en/nevibecode/skills/judge-with-debate.md) — skill · 1300 installs
- [critique](https://affpapa.org/en/nevibecode/skills/critique.md) — skill · 1300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
