# Cc Matrix Channel

> Matrix channel bridge for Claude Code — two-way MCP server in Rust

- **Type:** MCP server
- **Install:** `agentstack add mcp-ia-pierocv-cc-matrix-channel`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [IA-PieroCV](https://agentstack.voostack.com/s/ia-pierocv)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [IA-PieroCV](https://github.com/IA-PieroCV)
- **Source:** https://github.com/IA-PieroCV/cc_matrix_channel

## Install

```sh
agentstack add mcp-ia-pierocv-cc-matrix-channel
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

[](https://github.com/IA-PieroCV/cc_matrix_channel/actions/workflows/ci.yml)
[](https://opensource.org/licenses/MIT)

# Matrix Channel for Claude Code

Chat with your running Claude Code session from any Matrix client.

Works with any Matrix homeserver (Continuwuity, Synapse, Conduit, Dendrite). Full E2EE support.

## Features

- Two-way messaging with reply threading
- File attachments (send, receive, auto-decrypt E2EE media)
- Permission relay — approve/deny tool calls remotely
- Runtime config — change settings without restart
- Pairing-based access control

## Setup (one-time)

Requires [Bun](https://bun.sh).

```
/plugin marketplace add IA-PieroCV/cc_matrix_channel
/plugin install matrix@cc-matrix-channel
/reload-plugins
# You must need to restart your session to get the slash commands working and connect to the channel MCP
# claude --dangerously-load-development-channels plugin:matrix@cc-matrix-channel
/configure https://matrix.example.com @bot:example.com YOUR_PASSWORD
OR
/matrix:configure https://matrix.example.com @bot:example.com YOUR_PASSWORD
```

Then pair your account — DM the bot from your Matrix client:

```
/access pair 
OR
/matrix:access pair 

/access policy allowlist
OR
/matrix:access policy allowlist
```

## Usage (every session)

```bash
claude --dangerously-load-development-channels plugin:matrix@cc-matrix-channel
```

## Skills

| Skill | Description |
|-------|-------------|
| `/matrix:access` | Pairing, allowlists, groups, delivery settings |
| `/matrix:configure` | Credentials, status, setup guide |

## Tools

| Tool | Description |
|------|-------------|
| `reply` | Send text + optional files, with threading |
| `react` | Emoji reaction |
| `edit_message` | Edit a sent message |
| `download_attachment` | Download files (auto-decrypts E2EE) |
| `send_attachment` | Send local files |
| `fetch_messages` | Room history |
| `approve_pairing` | Approve user access (terminal only) |

## Configuration

### Connection (`~/.claude/channels/matrix/.env`)

| Variable | Required | Description |
|---|---|---|
| `MATRIX_HOMESERVER_URL` | Yes | Homeserver URL |
| `MATRIX_USER_ID` | Yes | Bot user ID (`@bot:server`) |
| `MATRIX_PASSWORD` | Yes* | Bot password (first-run only) |
| `MATRIX_STORE_PATH` | No | E2EE key storage (default: `./data/matrix_store`) |
| `MATRIX_ACCESS_TOKEN` | No | Fallback auth (limited E2EE) |
| `MATRIX_DEVICE_ID` | No | Device ID hint (auto-generated) |
| `MATRIX_STORE_PASSPHRASE` | No | Encrypt store at rest |

### Access & Delivery (`~/.claude/channels/matrix/access.json`)

Managed via `/matrix:access`. Changes take effect immediately.

| Setting | Default | Description |
|---------|---------|-------------|
| `dmPolicy` | `pairing` | `pairing`, `allowlist`, or `disabled` |
| `allowFrom` | `[]` | Allowed user IDs |
| `groups` | `{}` | Per-room mention-only + patterns |
| `ackReaction` | `👀` | Ack emoji (empty to disable) |
| `textChunkLimit` | `4096` | Max chars per chunk |
| `chunkMode` | `newline` | `newline` or `length` |
| `replyToMode` | `first` | `first`, `all`, or `off` |

## Manual Install

Without the plugin system:

1. Download binary from [Releases](https://github.com/IA-PieroCV/cc_matrix_channel/releases/latest)
2. Save credentials to `~/.claude/channels/matrix/.env`
3. Add to `.mcp.json`:
   ```json
   { "mcpServers": { "matrix": { "command": "/path/to/cc_matrix_channel" } } }
   ```
4. `claude --dangerously-load-development-channels server:matrix`

## Build from Source

```bash
git clone https://github.com/IA-PieroCV/cc_matrix_channel
cd cc_matrix_channel
cargo build --release   # Requires Rust 1.85+
```

## Testing / Development

### Test an RC build with `--plugin-dir`

The `dev` branch produces pre-release binaries. The Bun launcher downloads the exact version listed in `plugin.json` directly from GitHub Releases, so RC builds work the same as stable ones:

```bash
git clone https://github.com/IA-PieroCV/cc_matrix_channel
cd cc_matrix_channel
git checkout dev
# In your terminal:
claude --dangerously-load-development-channels --plugin-dir /path/to/cc_matrix_channel plugin:matrix@cc-matrix-channel
```

The launcher fetches the RC binary on first run and caches it.

### Test local code changes (no GitHub release needed)

Build the binary and drop it in the launcher's cache path — the launcher skips the download when the file already exists:

```bash
cargo build --release
VERSION=$(grep '^version' .claude-plugin/plugin.json | sed 's/.*"\(.*\)".*/\1/')
cp target/release/cc_matrix_channel \
   ~/.claude/channels/matrix/plugin-data/bin/cc_matrix_channel-v${VERSION}
chmod +x ~/.claude/channels/matrix/plugin-data/bin/cc_matrix_channel-v${VERSION}
```

Then run with `--plugin-dir` as above. Repeat the `cp` after each `cargo build`.

## Troubleshooting

| Problem | Fix |
|---|---|
| E2EE fails | Delete store directory, restart with password |
| "Cannot send to this room" | Send a message to the bot first |
| Bot ignores messages | Check `/matrix:access` or complete pairing |
| Session won't restore | Verify `MATRIX_STORE_PATH` |

---

Licensed under [MIT](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [IA-PieroCV](https://github.com/IA-PieroCV)
- **Source:** [IA-PieroCV/cc_matrix_channel](https://github.com/IA-PieroCV/cc_matrix_channel)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ia-pierocv-cc-matrix-channel
- Seller: https://agentstack.voostack.com/s/ia-pierocv
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
