Post and manage Rocket.Chat messages, channels, private groups, direct messages and users over the REST API.
Rocket.Chat ships in the w6w first-party pack. It declares 25 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.rocketchatRocket.Chat is the open-source team chat platform many organizations run for internal and customer communication. This app connects a workflow to a Rocket.Chat Cloud workspace so it can talk where the team already talks.
Post messages to channels, private groups or individual users, reply inside threads, attach rich cards, edit or delete what was sent, react, and pin. Read the other direction too: pull channel, group and direct-message history for a time range, search a room, and look up users and their profiles.
Room management covers the everyday cases: list and fetch channels and private groups, create them with their initial members, invite more people, and set a channel topic. Direct messages are opened with a username and the returned room is ready for the next message.
It authenticates with a Personal Access Token and the user ID it was issued to, so the workflow acts as that user with exactly that user’s permissions. Cloud workspaces on a rocket.chat subdomain are supported; self-hosted servers on their own domain are not.
Three routes to the same 25 actions. The Workflow tab is generated from Rocket.Chat's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
create-channel Create a public channel (`POST /channels.create`). Needs the `create-c` permission.
create-dm Open (or fetch the existing) direct-message room with one user, or a multi-user DM with several (`POST /dm.create`). The returned `room._id` is what Post Message and Send Message need.
create-group Create a private group (`POST /groups.create`). Needs the `create-p` permission.
get-channel-history Read the messages of a public channel, optionally within a time range (`GET /channels.history`).
get-dm-history Read the messages of a direct-message room, optionally within a time range (`GET /dm.history`).
get-group-history Read the messages of a private group, optionally within a time range (`GET /groups.history`). Takes a room ID only — there is no name lookup on this endpoint.
get-user Fetch one user by user ID, username or email (`GET /users.info`). Provide exactly one. What comes back is limited to what the connected user may see.
invite-to-channel Add one or more users to a public channel by user ID (`POST /channels.invite`).
invite-to-group Add one or more users to a private group by username (`POST /groups.invite`).
list-channel-members List the members of a public channel (`GET /channels.members`).
list-channels List public channels (`GET /channels.list`), or only the ones the connected user has joined (`GET /channels.list.joined`). Paged with `count` / `offset`.
list-groups List the private groups the connected user belongs to (`GET /groups.list`).
list-users List workspace users (`GET /users.list`). Needs `view-d-room`; richer fields need `view-full-other-user-info`.
pin-message Pin a message (`POST /chat.pinMessage`), or unpin it (`POST /chat.unPinMessage`) with `unpin`. Needs the `pin-message` permission.
post-message Post a message to a channel, private group or user. Supports attachments and thread replies. `alias` and `avatar` need the `message-impersonate` permission (the bot role by default).
react-to-message Add or remove an emoji reaction on a message (`POST /chat.react`).
send-message Send a message into a room by room ID, as the connected user. Unlike Post Message it takes no `#channel` / `@user` shorthand, but supports UI blocks and sending a thread reply to the channel as well.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Rocket.Chat's real ids.
{
"manifestVersion": "2",
"name": "rocketchat-example",
"steps": [
{
"id": "create-channel",
"uses": {
"app": "io.w6w.rocketchat",
"action": "create-channel",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"name": "<name>"
}
}
]
}create-channel create-dm create-group get-channel get-channel-history +20 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Rocket.Chat, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Rocket.Chat. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "create-channel",
payload: {
name: "<value>",
// members: "<value>",
// readOnly: "<value>",
// excludeSelf: "<value>",
// topic: "<value>",
// customFields: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action create-channel --payload '{"name":"<value>"}' Give an AI agent Rocket.Chat — without giving it Rocket.Chat's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.rocketchat#create-channel",
"input": {
"name": "<name>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Rocket.Chat connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Rocket.Chat's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Rocket.Chat itself is MIT, and the runtime that executes it is source-available (FSL).
Rocket.Chat declares its own checks, so its health is a property of the app rather than something the host guesses at.
Unsigned GET /api/v1/me on this connection's workspace. Rocket.Chat's JSON 401 passes — it proves the API is answering; credential validity is the `auth:*` check's job.