First-party app
Rocket.Chat Rocket.Chat

Rocket.Chat

Post and manage Rocket.Chat messages, channels, private groups, direct messages and users over the REST API.

stable Communication

About

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.

App id
io.w6w.rocketchat
Version
0.1.1
Author
w6w
Licence
MIT
Categories
Communication

Overview

Rocket.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.

Build with Rocket.Chat

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-channel

Create a public channel (`POST /channels.create`). Needs the `create-c` permission.

Create Direct Message

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 Private Group

create-group

Create a private group (`POST /groups.create`). Needs the `create-p` permission.

Delete Message

delete-message

Delete a message by room and message ID (`POST /chat.delete`).

Get Channel

get-channel

Fetch a public channel by ID or name (`GET /channels.info`).

Get Channel History

get-channel-history

Read the messages of a public channel, optionally within a time range (`GET /channels.history`).

Get Direct Message History

get-dm-history

Read the messages of a direct-message room, optionally within a time range (`GET /dm.history`).

Get Private Group

get-group

Fetch a private group by ID or name (`GET /groups.info`).

Get Private Group 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 Me

get-me

The connected user's own profile: ID, username, status, roles (`GET /me`).

Get Message

get-message

Fetch one message by ID (`GET /chat.getMessage`).

Get User

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

invite-to-channel

Add one or more users to a public channel by user ID (`POST /channels.invite`).

Invite to Private Group

invite-to-group

Add one or more users to a private group by username (`POST /groups.invite`).

List Channel Members

list-channel-members

List the members of a public channel (`GET /channels.members`).

List Channels

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 Private Groups

list-groups

List the private groups the connected user belongs to (`GET /groups.list`).

List Users

list-users

List workspace users (`GET /users.list`). Needs `view-d-room`; richer fields need `view-full-other-user-info`.

Pin or Unpin Message

pin-message

Pin a message (`POST /chat.pinMessage`), or unpin it (`POST /chat.unPinMessage`) with `unpin`. Needs the `pin-message` permission.

Post Message

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

react-to-message

Add or remove an emoji reaction on a message (`POST /chat.react`).

Search Messages

search-messages

Search the messages of one room by text (`GET /chat.search`).

Send Message

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.

Set Channel Topic

set-channel-topic

Set the topic of a public channel (`POST /channels.setTopic`).

Update Message

update-message

Edit the text of an existing message (`POST /chat.update`).

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>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create Channel

    perform
    create-channel
  • Create Direct Message

    perform
    create-dm
  • Create Private Group

    perform
    create-group
  • Get Channel

    read
    get-channel
  • Get Channel History

    read
    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.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { 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);
Install the CLI
npm install -g @w6w/cli
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.

What the agent gets

Credentials it can't read

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.

A tool surface scoped to the caller

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.

A durable workflow in one call

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.

Health-aware discovery

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).

Request MCP access

Health checks

Rocket.Chat declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Rocket.Chat Cloud status

dependency

Workspace API reachable

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.

quota

Quota headroom