From matrix
Set up the Matrix channel — save the homeserver URL and access token, review access policy. Use when the user pastes Matrix credentials, asks to configure Matrix, asks 'how do I set this up' or 'who can reach me,' or wants to check channel status.
npx claudepluginhub bakhtarian/claude-matrix-channel --plugin matrixThis skill is limited to using the following tools:
Writes credentials to `~/.claude/channels/matrix/.env` and orients the user
Suggests manual /compact at logical task boundaries in long Claude Code sessions and multi-phase tasks to avoid arbitrary auto-compaction losses.
Share bugs, ideas, or general feedback.
Writes credentials to ~/.claude/channels/matrix/.env and orients the user
on access policy. The server reads both files at boot.
Arguments passed: $ARGUMENTS
Read both state files and give the user a complete picture:
Credentials — check ~/.claude/channels/matrix/.env for
MATRIX_HOMESERVER_URL and MATRIX_ACCESS_TOKEN. Show set/not-set;
if set, show homeserver URL and first 6 chars of token masked.
Runtime — read the plugin .mcp.json (check $CLAUDE_PLUGIN_ROOT/.mcp.json,
then ~/.claude/plugins/cache/matrix-channel/matrix/**/.mcp.json,
then ./.mcp.json). Show the current command value (e.g. bun).
Mention /matrix:configure runtime <bun|npx-tsx|deno> to change.
Access — read ~/.claude/channels/matrix/access.json (missing file
= defaults: dmPolicy: "pairing", empty allowlist). Show:
What next — end with a concrete next step based on state:
/matrix:configure <homeserver_url> <access_token>
with your bot's homeserver URL and access token."/matrix:access pair <code>."Push toward lockdown — always. Once IDs are captured via pairing, switch
to allowlist:
pairing → offer to run
/matrix:access policy allowlist./matrix:access pair <code>."E2EE Note: E2EE is supported. Both encrypted and unencrypted rooms work.
By default the bot accepts messages from unverified devices. For stricter
security, set requireVerifiedDevice to true in access.json — then
device verification is required. Mention /matrix:verify for verification.
<homeserver_url> <access_token> — save credentialsmkdir -p ~/.claude/channels/matrix.env if present; update/add both keys, preserve others.chmod 600 ~/.claude/channels/matrix/.envHow to get an access token:
runtime <bun|npx-tsx|deno> — change the TypeScript runtimeUpdates the .mcp.json in the plugin directory to use a different runtime.
The server needs a restart after changing.
Supported values and their .mcp.json mappings:
| Value | command | args |
|---|---|---|
bun (default) | bun | ["server.ts"] |
npx-tsx | npx | ["tsx", "server.ts"] |
deno | deno | ["run", "--allow-all", "server.ts"] |
Steps:
.mcp.json. Check these locations in order:
$CLAUDE_PLUGIN_ROOT/.mcp.json (if env var is set)~/.claude/plugins/cache/matrix-channel/matrix/**/.mcp.json./.mcp.json (development fallback).mcp.json, preserve the cwd field if present.command and args per the table above.<value>. Restart the session for it to take effect."If the user passes an unrecognized value, list the supported options.
clear — remove credentialsDelete the MATRIX_HOMESERVER_URL= and MATRIX_ACCESS_TOKEN= lines.
.env once at boot. Credential changes need a session
restart. Say so after saving.access.json is re-read on every inbound message — policy changes via
/matrix:access take effect immediately.