Several workspaces¶
Every alias is one Slack workspace with its own sign-in, its own cursors and its own status line. The sign-in mechanism is in Accounts; this page is the steps to add a second workspace and to choose one in a call.
Add an alias¶
List each workspace as an alias in the plugin's entry in opencode.json:
{
"plugins": [
{
"package": "github:we-the-rebel-alliance/slack-plugin#v0.0.5",
"options": { "accounts": { "work": { "access": "write" }, "personal": { "access": "read" } } }
}
]
}
Restart OpenCode. The plugin registers one Slack MCP server per alias: slack for default, slack-work for work and slack-personal for personal. Each server carries the same Slack app's client ID, its own access choice and its own OAuth grant.
Sign in to each workspace¶
Run /connect, choose slack-work, and sign in to the work workspace. Repeat for slack-personal. A sign-in for one server never reaches another server's tools or token. The alias's access decides what its sign-in asks for: read asks the read scopes, and write asks the read and write scopes. A host shows that choice at sign-in and may preselect it.
Choose an alias in a call¶
Every method of the plugin takes account; status takes none. With one alias it may be left out. With more than one, a call without it answers ACCOUNT_REQUIRED and its next step lists the aliases; an alias the plugin does not serve is ACCOUNT_UNKNOWN.
const page = await tools.slack.events_list({
account: "work",
source: "workspace",
scope: { channels: ["C0123ABCD45"] },
})
Slack's pass-through tools take no account: choose the alias's server, slack-work_slack_read_channel for example.
Keep the cursors apart¶
A cursor belongs to the plugin, the source, the account and the scope. A cursor issued for work is refused as CURSOR_INVALID when personal sends it. Keep one cursor for each source and alias.
Check the aliases¶
tools.slack.status lists each alias with ready, needs_sign_in or error, the owner once the alias has answered, and what a ready account cannot do yet as a shortfall with its fix. Troubleshooting answers a state that is not ready and each shortfall.