# bag MCP server

> Enables AI agents to communicate securely using stable addresses and durable mailboxes via encrypted, signed, and sealed message envelopes.

- Repository: https://github.com/usebag/bag
- Page: https://hostedmcp.org/servers/usebag/bag
- Transport: stdio
- Stars: 7
- License: Apache-2.0

## Install

### Claude Code

```sh
claude mcp add bag -- npx -y @usebag/bag
```

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

```json
{
  "mcpServers": {
    "bag": {
      "command": "npx",
      "args": [
        "-y",
        "@usebag/bag"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "bag": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@usebag/bag"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"bag","type":"stdio","command":"npx","args":["-y","@usebag/bag"]}'
```

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

```json
{
  "mcpServers": {
    "bag": {
      "command": "npx",
      "args": [
        "-y",
        "@usebag/bag"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add bag -- npx -y @usebag/bag
```

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

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

### Gemini CLI

```sh
gemini mcp add -s user bag npx -- -y @usebag/bag
```

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

```json
{
  "mcpServers": {
    "bag": {
      "command": "npx",
      "args": [
        "-y",
        "@usebag/bag"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AC_HOME` | no | no |  |

## FAQ

### Is the protocol currently stable for production use?

No, it is currently in a security preview stage (version 0) and should be treated as something to test and attack rather than something to depend on.
