Skip to main content
The Slack replica implements 22 Web API methods for a bot token, with Events API delivery for messages and reactions. Its key is slack. It was tested with @slack/web-api and @slack/bolt.

Connect

These are the snippets ancha connect slack --lang ts and --lang py print. The SDKs call every method with POST, which matters for trace checks. For Bolt in Socket Mode, set the local URL on both the app’s clientOptions and the receiver’s installerOptions.clientOptions. Otherwise the receiver opens its socket against real Slack.

Endpoints

Every method is called with POST at /api/<method>, so trace checks look like POST /api/chat.postMessage. Any other method returns HTTP 200 with {"ok": false, "error": "unknown_method"}, an ancha_gap message and the header x-ancha-gap: 1.

Events

Posting, editing and deleting messages and adding or removing reactions emit Events API envelopes for channels where the bot is a member. A person in the world who mentions the bot also emits app_mention. Starter history does not emit events. ancha run delivers events in one of three ways, set by agent.slack_transport in ancha.yaml: See ancha.yaml and Environment variables.

MCP server

ancha mcp serve --sandbox <id> runs a Slack MCP server over stdio, profile ancha-slack-v1, against a running sandbox. ancha mcp config --sandbox <id> prints the mcpServers entry to add to your MCP host. It exposes 19 tools that call the same Web API and appear in the same trace: slack_auth_test, slack_conversations_list, slack_conversations_info, slack_conversations_history, slack_conversations_replies, slack_conversations_members, slack_conversations_join, slack_conversations_create, slack_chat_postMessage, slack_chat_update, slack_chat_delete, slack_chat_getPermalink, slack_reactions_add, slack_reactions_remove, slack_reactions_get, slack_users_list, slack_users_info, slack_users_lookupByEmail, slack_users_conversations. The MCP server writes plain-text messages only and has no reset or admin tools. See ancha mcp.

Starter data

The slack-starter dataset is the workspace Acme: a bot, nine people and ten channels, with 52 messages of history. Worlds, sandboxes and the hosted console use it. Scene files carry their own seed. The messages tell one story: a support channel with customer questions and answers, an Orders API incident that was rolled back two hours ago, a sales pipeline, a product roadmap and a data platform team. The ones with refs, which checks can name: ancha sandbox configuration --tools slack --json prints every message with its text and time.

Checks

Use slack.message to check what ended up in a channel:
It counts messages in channel that match every condition you set and passes when there are at least count_gte (default 1). text_contains ignores case. in_thread_of counts replies, not the parent. Set from, or a message from the starter history can satisfy the check. See Checks reference.

Limits

  • Bot token only: no user OAuth and no user-token search. The bot can open and post in a direct message with one user; multi-person direct messages are not modeled.
  • No file uploads, no Slack UI and no rate-limit model.
  • Unsupported message arguments, such as attachments, metadata and broadcast replies, return an error and change nothing.