# Postbag MCP server

> Routes HTML form submissions to email, Telegram, webhooks, or CRMs through a centralized backend.

- Repository: https://github.com/faahim/postbag
- Page: https://hostedmcp.org/servers/faahim/postbag
- Transport: stdio
- Stars: 0
- License: AGPL-3.0
- Latest version: 0.1.1

## Install

### Claude Code

```sh
claude mcp add --env 'POSTBAG_API_KEY=<YOUR_POSTBAG_API_KEY>' postbag -- npx -y @postbag/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "postbag": {
      "command": "npx",
      "args": [
        "-y",
        "@postbag/mcp"
      ],
      "env": {
        "POSTBAG_API_KEY": "<YOUR_POSTBAG_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "postbag": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@postbag/mcp"
      ],
      "env": {
        "POSTBAG_API_KEY": "<YOUR_POSTBAG_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"postbag","type":"stdio","command":"npx","args":["-y","@postbag/mcp"],"env":{"POSTBAG_API_KEY":"<YOUR_POSTBAG_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "postbag": {
      "command": "npx",
      "args": [
        "-y",
        "@postbag/mcp"
      ],
      "env": {
        "POSTBAG_API_KEY": "<YOUR_POSTBAG_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add postbag --env 'POSTBAG_API_KEY=<YOUR_POSTBAG_API_KEY>' -- npx -y @postbag/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.postbag]
command = "npx"
args = ["-y", "@postbag/mcp"]

[mcp_servers.postbag.env]
POSTBAG_API_KEY = "<YOUR_POSTBAG_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'POSTBAG_API_KEY=<YOUR_POSTBAG_API_KEY>' postbag npx -- -y @postbag/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "postbag": {
      "command": "npx",
      "args": [
        "-y",
        "@postbag/mcp"
      ],
      "env": {
        "POSTBAG_API_KEY": "<YOUR_POSTBAG_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `POSTBAG_API_KEY` | yes | yes | A Postbag API key (pb_live_… or pb_test_…). Mint one at https://postbag.dev/app or with `postbag login`. |
| `POSTBAG_API_URL` | no | no | Base URL of the Postbag API. Defaults to https://postbag.dev — set this only for a self-hosted instance. |

## FAQ

### Where can form submissions be sent?

Submissions can be routed to email, Telegram, a webhook, a partner, or your CRM.

### How do I integrate a form with Postbag?

You can integrate by pointing an HTML form's action attribute to a Postbag endpoint.

### What makes Postbag different from other form services?

Postbag acts as a source of truth for form data and downstream system contracts, making it easier to manage multiple sites feeding into a single partner.
