# Coding agents

URL: https://swb.one/docs/blocks/coding-agents

## Get the settings [#get-the-settings]

```bash
swb connect coding-agent --choose agent=codex
```

The command shows how to add SwB as a remote MCP server. Use OAuth when both SwB and the client support it. Use the pairing instructions when the command shows them.

| Client | Setup |
| - | - |
| Claude Code | `claude mcp add` |
| Codex | `config.toml` |
| Gemini CLI and Qwen Code | `settings.json` |
| Goose | `config.yaml` |
| OpenCode | `opencode.json` |
| Cline and Kiro | Their MCP settings |
| Other clients | Streamable HTTP with a pairing code |

To use MCP Tasks with Capy, see [MCP Tasks](/docs/blocks/capy#mcp-tasks).

## Claude Code channel [#claude-code-channel]

The channel sends messages from the `claude-code` mailbox to an open Claude Code session. Claude Code channels are a research preview.

Generate a random key of at least 24 characters. Save it as `SWB_KEY_CHANNEL` in the server's private `.env` file. Restart SwB to load the key. This key gives read access to the `claude-code` mailbox. Install [Bun](https://bun.sh). Add the plugin in Claude Code.

```text
/plugin marketplace add ZhehanZhang/SwB
/plugin install swb@swb
```

Enter your SwB base URL in **SwB URL**. Enter the value of `SWB_KEY_CHANNEL` in **Channel key**. Start Claude Code with the channel.

```bash
claude --dangerously-load-development-channels plugin:swb@swb
```

The channel starts with new messages on its first run. On later runs it resumes from its saved position. To answer through SwB, use `reply` from the separate MCP connection.
