What chat-tool-ui-preview does
The chat-tool-ui-preview MCP server creates a browser-based preview of a proposed Slack message. It is intended for reviewing content before an agent sends it, not for delivering the message. The preview uses an independent chat-style layout rather than copying Slack’s branding, colors, fonts, or screen structure.
The input can use standard Markdown, Slack mrkdwn, or Block Kit JSON. A request can include the destination channel, thread information, whether the post should also appear in the channel, and whether the sender is represented as a user or bot. An ID-to-name map can provide display names for users and channels.
How it works
As an MCP server, chat-tool-ui-preview communicates over stdio and provides one tool: preview_message. The tool accepts the same message fields as the command-line interface and returns the generated preview path, whether a browser was opened, any warnings, and a reminder that a person should approve the content before sending.
Claude Code can also use the binary as a PreToolUse hook. When configured to match Slack send, scheduled-send, or draft-send tools, the hook writes a temporary HTML preview, opens it in the browser, and reports review items through Claude Code’s normal permission dialog. The person can approve or reject the pending tool call. Rejecting with a reason allows the agent to revise the message and produce another preview.
This design supports two workflows: automatic interception through Claude Code, or explicit preview requests from an MCP client or another agent workflow.
Setup and configuration
Install the static chat-preview binary from a GitHub Release using the macOS/Linux shell installer or the Windows PowerShell installer. The installer places it in ~/.local/bin by default, checks the release SHA-256 file, and does not require sudo. Set CHAT_PREVIEW_INSTALL_DIR to change the installation directory or CHAT_PREVIEW_VERSION to select a version. Go 1.24 or newer can also install it with go install.
For Claude Desktop, download the release’s OS- and architecture-specific .mcpb bundle and install it through the application or by opening the file. The project also registers the bundle as io.github.gridhra/chat-tool-ui-preview in the official MCP registry. To register the stdio server with Claude Code, use claude mcp add --scope user chat-tool-ui-preview -- chat-preview mcp.
Tools and capabilities
The preview_message tool and CLI preview command support:
- Markdown, mrkdwn, and Block Kit input
- Bold, italic, strikethrough, inline code, code blocks, quotes, links, mentions, dates, emoji, lists, and tables
- Block Kit sections, headers, dividers, context, images, actions, and rich text
- Destination, thread-reply, broadcast, and sender context
- Warnings for unresolved mentions, unknown emoji, excessive length, and invalid or unsupported blocks
- A gallery command for viewing formatting examples
Limitations and notes
chat-tool-ui-preview never sends Slack messages and does not query the Slack API or use Slack tokens. It does not persist post content. Images and linked resources are not fetched, so previewing does not contact external servers for those assets.
The format field is required because Markdown and Slack mrkdwn assign different meanings to some syntax. Missing names remain unresolved and generate warnings. The tool is designed to run on the host because it must open a browser; no container image or npx launcher is provided. Windows builds exist, but the README notes that Windows hardware execution has not been tested. Temporary preview files are private to the user and are removed after one hour.