Skip to content
Back to search

slack-mcp-server

A Slack MCP server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/ubie-oss/slack-mcp-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/ubie-oss/slack-mcp-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ubie-oss--slack-mcp-server/badge.svg)](/listings/ubie-oss--slack-mcp-server)

HTML

<a href="/listings/ubie-oss--slack-mcp-server"><img src="/api/listings/ubie-oss--slack-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installation

npm install @ubie-oss/slack-mcp-server

NOTE: Its now hosted in GitHub Registry so you need your PAT.

Configuration

You need to set the following environment variables:

- `SLACK_BOT_TOKEN`: Slack Bot User OAuth Token - `SLACK_USER_TOKEN`: Slack User OAuth Token (required for some features like message search) - `SLACK_SAFE_SEARCH` (optional): When set to `true`, automatically excludes private channels, DMs, and group DMs from search results. This is enforced server-side and cannot be overridden by clients.

You can also create a `.env` file to set these environment variables:

SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_USER_TOKEN=xoxp-your-user-token
SLACK_SAFE_SEARCH=true  # Optional: Enable safe search mode

Usage

Start the MCP server

**Stdio Transport (default)**:

npx @ubie-oss/slack-mcp-server

**Streamable HTTP Transport**:

npx @ubie-oss/slack-mcp-server -port 3000

You can also run the installed module with node:

# Stdio transport
node node_modules/.bin/slack-mcp-server

# HTTP transport  
node node_modules/.bin/slack-mcp-server -port 3000

**Command Line Options**: - `-port <number>`: Start with Streamable HTTP transport on specified port - `-h, --help`: Show help message

Client Configuration

**For Stdio Transport (Claude Desktop, etc.)**:

{
  "slack": {
    "command": "npx",
    "args": [
      "-y",
      "@ubie-oss/slack-mcp-server"
    ],
    "env": {
      "NPM_CONFIG_//npm.pkg.github.com/:_authToken": "<your-github-pat>",
      "SLACK_BOT_TOKEN": "<your-bot-token>",
      "SLACK_USER_TOKEN": "<your-user-token>",
      "SLACK_SAFE_SEARCH": "true"
    }
  }
}

**For Streamable HTTP Transport (Web applications)**:

Start the server:

SLACK_BOT_TOKEN=<your-bot-token> SLACK_USER_TOKEN=<your-user-token> npx @ubie-oss/slack-mcp-server -port 3000

Connect to: `http://localhost:3000/mcp`

See [examples/README.md](examples/README.md) for detailed client examples.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 188 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # slack-mcp-server
  2. A [MCP(Model Context Protocol)](https://www.anthropic.com/news/model-context-protocol) server for accessing Slack API. This server allows AI assistants to interact with the Slack API through a standardized interface.
  3. ## Transport Support
  4. This server supports both traditional and modern MCP transport methods:
  5. - **Stdio Transport** (default): Process-based communication for local integration
  6. - **Streamable HTTP Transport**: HTTP-based communication for web applications and remote clients
  7. ## Features
  8. Available tools:
  9. - `slack_list_channels` - List public channels in the workspace with pagination
  10. - `slack_post_message` - Post a new message to a Slack channel. `text` is standard Markdown that Slack renders; set `format: "slack_mrkdwn"` to write Slack mrkdwn instead
  11. - `slack_reply_to_thread` - Reply to a specific message thread in Slack. Takes `text` and `format` like `slack_post_message`
  12. - `slack_add_reaction` - Add a reaction emoji to a message
  13. - `slack_get_channel_history` - Get recent messages from a channel
  14. - `slack_get_thread_replies` - Get all replies in a message thread
  15. - `slack_get_users` - Retrieve basic profile information of all users in the workspace
  16. - `slack_get_user_profiles` - Get multiple users' profile information in bulk (efficient for batch operations)
  17. - `slack_search_messages` - Search for messages in the workspace with powerful filters:
  18. - Basic query search
  19. - Location filters: `in_channel`
  20. - User filters: `from_user`, `with`
  21. - Date filters: `before` (YYYY-MM-DD), `after` (YYYY-MM-DD), `on` (YYYY-MM-DD), `during` (e.g., "July", "2023")
  22. - Content filters: `has` (emoji reactions), `is` (saved/thread)
  23. - Sorting options by relevance score or timestamp
  24. ## Quick Start
  25. ### Installation
  26. ```bash
  27. npm install @ubie-oss/slack-mcp-server
  28. ```
  29. NOTE: Its now hosted in GitHub Registry so you need your PAT.
  30. ### Configuration
  31. You need to set the following environment variables:
  32. - `SLACK_BOT_TOKEN`: Slack Bot User OAuth Token
  33. - `SLACK_USER_TOKEN`: Slack User OAuth Token (required for some features like message search)
  34. - `SLACK_SAFE_SEARCH` (optional): When set to `true`, message searches use Slack's Real-time Search API with `channel_types: ["public_channel"]`. The user token must have the `search:read.public` scope. The public-channel restriction applies before results are selected and paginated; clients cannot override it. This option affects message search, not the permissions of other tools.
  35. You can also create a `.env` file to set these environment variables:
  36. ```
  37. SLACK_BOT_TOKEN=xoxb-your-bot-token
  38. SLACK_USER_TOKEN=xoxp-your-user-token
  39. SLACK_SAFE_SEARCH=true # Optional: Enable safe search mode
  40. ```
  41. ### Public message search
  42. With `SLACK_SAFE_SEARCH=true`, `slack_search_messages` calls [`assistant.search.context`](https://docs.slack.dev/reference/methods/assistant.search.context/) using the **user token**, public channels only, message results only, and keyword search. It does not call legacy `search.messages`, including when the new API is unavailable or the token lacks a required scope.
  43. The search tool keeps the existing keyword, channel, user, date and sorting fields. Public mode uses `limit` (1–20, default 20) and `cursor` instead of `count` and `page`. Pass `next_cursor` back with the same query and filters to read another page. An empty cursor marks the end of the results.
  44. ```json
  45. {"query":"project update","limit":20,"cursor":"cursor-from-the-previous-response"}
  46. ```
  47. Each successful MCP call returns a single text content block containing this JSON contract. It has no total counts, page numbers, ranking metadata, contextual messages or other result types. `channel.name` and `user` may be omitted; `next_cursor` is always a string.
  48. ```json
  49. {
  50. "contract": "slack-public-search-v1",
  51. "messages": {
  52. "matches": [{
  53. "channel": {"id": "C1234567", "name": "general"},
  54. "text": "Public project update",
  55. "ts": "1234567890.123456",
  56. "user": "U1234567",
  57. "permalink": "https://example.slack.com/archives/C1234567/p1234567890123456"
  58. }]
  59. },
  60. "next_cursor": ""
  61. }
  62. ```
  63. To upgrade an existing safe-search deployment:
  64. 1. Add the `search:read.public` **user** scope to the Slack app and reauthorize it. A token with only legacy `search:read` is insufficient. Do not share tokens in configuration examples or logs.
  65. 2. Deploy this server with safe search enabled. Verify a public query and a subsequent cursor request. A `missing_scope` error explains the required scope; other API failures do not trigger a legacy fallback.
  66. 3. Upgrade clients to accept the `slack-public-search-v1` response and cursor input. Clients that depend on a public-only boundary should reject legacy responses instead of forwarding their metadata.
  67. When `SLACK_SAFE_SEARCH` is unset or false, the existing legacy search API, `count`/`page` inputs and response shape remain unchanged.
  68. ### Usage
  69. #### Start the MCP server
  70. **Stdio Transport (default)**:
  71. ```bash
  72. npx @ubie-oss/slack-mcp-server
  73. ```
  74. **Streamable HTTP Transport**:
  75. ```bash
  76. npx @ubie-oss/slack-mcp-server -port 3000
  77. ```
  78. You can also run the installed module with node:
  79. ```bash
  80. # Stdio transport
  81. node node_modules/.bin/slack-mcp-server
  82. # HTTP transport
  83. node node_modules/.bin/slack-mcp-server -port 3000
  84. ```
  85. **Command Line Options**:
  86. - `-port <number>`: Start with Streamable HTTP transport on specified port
  87. - `-h, --help`: Show help message
  88. #### Client Configuration
  89. **For Stdio Transport (Claude Desktop, etc.)**:
  90. ```json
  91. {
  92. "slack": {
  93. "command": "npx",
  94. "args": [
  95. "-y",
  96. "@ubie-oss/slack-mcp-server"
  97. ],
  98. "env": {
  99. "NPM_CONFIG_//npm.pkg.github.com/:_authToken": "<your-github-pat>",
  100. "SLACK_BOT_TOKEN": "<your-bot-token>",
  101. "SLACK_USER_TOKEN": "<your-user-token>",
  102. "SLACK_SAFE_SEARCH": "true"
  103. }
  104. }
  105. }
  106. ```
  107. **For Streamable HTTP Transport (Web applications)**:
  108. Start the server:
  109. ```bash
  110. SLACK_BOT_TOKEN=<your-bot-token> SLACK_USER_TOKEN=<your-user-token> npx @ubie-oss/slack-mcp-server -port 3000
  111. ```
  112. Connect to: `http://localhost:3000/mcp`
  113. See [examples/README.md](examples/README.md) for detailed client examples.
  114. ## Implementation Pattern
  115. This server adopts the following implementation pattern:
  116. 1. Define request/response using Zod schemas
  117. - Request schema: Define input parameters
  118. - Response schema: Define responses limited to necessary fields
  119. 2. Implementation flow:
  120. - Validate request with Zod schema
  121. - Call Slack WebAPI
  122. - Parse response with Zod schema to limit to necessary fields
  123. - Return as JSON
  124. For example, the `slack_list_channels` implementation parses the request with `ListChannelsRequestSchema`, calls `slackClient.conversations.list`, and returns the response parsed with `ListChannelsResponseSchema`.
  125. ## Development
  126. ### Available Scripts
  127. - `npm run dev` - Start the server in development mode with hot reloading
  128. - `npm run build` - Build the project for production
  129. - `npm run start` - Start the production server
  130. - `npm run lint` - Run linting checks (ESLint and Prettier)
  131. - `npm test` - Run the message-search boundary tests with Node's test runner
  132. - `npm run fix` - Automatically fix linting issues
  133. ### Contributing
  134. 1. Fork the repository
  135. 2. Create your feature branch
  136. 3. Run tests and linting: `npm run lint`
  137. 4. Commit your changes
  138. 5. Push to the branch
  139. 6. Create a Pull Request

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.