Slack User MCP Server

MIT License
3

Integrations

  • Allows Claude to interact with Slack workspaces as a user, including listing channels, posting messages, replying to threads, adding reactions, getting channel history, getting thread replies, retrieving user lists, and viewing user profiles

Slack 用户 MCP 服务器

Slack API 的 MCP 服务器,使 Claude 能够以用户身份与 Slack 工作区进行交互。

工具

  1. slack_list_channels
    • 列出工作区中的公共频道
    • 可选输入:
      • limit (数字,默认值:100,最大值:200):返回的最大通道数
      • cursor (字符串):下一页的分页光标
    • 返回:频道列表及其 ID 和信息
  2. slack_post_message
    • 向 Slack 频道发布新消息
    • 必需输入:
      • channel_id (string): 要发布到的频道的 ID
      • text (字符串):要发布的消息文本
    • 返回:消息发布确认和时间戳
  3. slack_reply_to_thread
    • 回复特定消息线程
    • 必需输入:
      • channel_id (字符串):包含线程的通道
      • thread_ts (字符串):父消息的时间戳
      • text (字符串):回复文本
    • 返回:回复确认和时间戳
  4. slack_add_reaction
    • 在消息中添加表情符号反应
    • 必需输入:
      • channel_id (字符串):包含消息的频道
      • timestamp (字符串):需要响应的消息时间戳
      • reaction (字符串):不带冒号的表情符号名称
    • 返回:反应确认
  5. slack_get_channel_history
    • 获取频道的最新消息
    • 必需输入:
      • channel_id (字符串):频道 ID
    • 可选输入:
      • limit (数字,默认值:10):要检索的消息数量
    • 返回:消息及其内容和元数据的列表
  6. slack_get_thread_replies
    • 获取消息线程中的所有回复
    • 必需输入:
      • channel_id (字符串):包含线程的通道
      • thread_ts (字符串):父消息的时间戳
    • 返回:回复列表及其内容和元数据
  7. slack_get_users
    • 获取具有基本个人资料信息的工作区用户列表
    • 可选输入:
      • cursor (字符串):下一页的分页光标
      • limit (数字,默认值:100,最大值:200):返回的最大用户数
    • 返回:用户及其基本资料的列表
  8. slack_get_user_profile
    • 获取特定用户的详细个人资料信息
    • 必需输入:
      • user_id (字符串):用户的 ID
    • 返回:详细的用户资料信息

设置

  1. 创建 Slack 应用程序:
    • 访问Slack 应用页面
    • 点击“创建新应用”
    • 选择“从头开始”
    • 命名您的应用并选择您的工作区
  2. 配置用户令牌范围:导航到“OAuth 和权限”并添加以下范围:
    • channels:history - 查看公共频道中的消息和其他内容
    • channels:read - 查看基本频道信息
    • chat:write - 以自己的身份发送消息
    • reactions:write - 在消息中添加表情符号反应
    • users:read - 查看用户及其基本信息
  3. 将应用程序安装到工作区:
    • 点击“安装到工作区”并授权应用程序
    • 保存以xoxp-开头的“用户 OAuth 令牌”
  4. 按照本指南获取您的团队 ID(以T开头)

与 Claude Desktop 一起使用

将以下内容添加到您的claude_desktop_config.json中:

本地安装

首先安装并构建服务器:

git clone https://github.com/lars-hagen/slack-user-mcp.git cd slack-user-mcp npm install npm run build

然后配置Claude桌面:

{ "mcpServers": { "slack": { "command": "npm", "args": [ "run", "--prefix", "/path/to/slack-user-mcp", "start" ], "env": { "SLACK_TOKEN": "xoxp-your-user-token", "SLACK_TEAM_ID": "T01234567" } } } }
NPX
{ "mcpServers": { "slack": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-slack-user" ], "env": { "SLACK_TOKEN": "xoxp-your-user-token", "SLACK_TEAM_ID": "T01234567" } } } }
Docker
{ "mcpServers": { "slack": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "SLACK_TOKEN", "-e", "SLACK_TEAM_ID", "mcp/slack-user" ], "env": { "SLACK_TOKEN": "xoxp-your-user-token", "SLACK_TEAM_ID": "T01234567" } } } }

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Slack User Server:

npx -y @smithery/cli install @lars-hagen/slack-user-mcp2 --client claude

故障排除

如果遇到权限错误,请验证:

  1. 所有必需的范围都已添加到您的 Slack 应用中
  2. 该应用程序已正确安装到您的工作区
  3. 令牌和工作区 ID 已正确复制到您的配置中
  4. 该应用已添加到需要访问的频道
  5. 您使用的是用户 OAuth 令牌(以 xoxp- 开头),而不是机器人令牌

建造

Docker 构建:

docker build -t mcp/slack-user -f src/slack/Dockerfile .

执照

此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

支持以用户身份与 Slack 工作区进行交互,支持通过 Slack API 进行频道列表、消息发布、线程、反应和用户管理。

  1. 工具
    1. 设置
      1. 与 Claude Desktop 一起使用
      2. 通过 Smithery 安装
      3. 故障排除
    2. 建造
      1. 执照

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          MCP Server for the Slack API, enabling Claude to interact with Slack workspaces.
          Last updated -
          8
          7,787
          44,247
          JavaScript
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          An MCP server that enables LLMs to access Slack's search functionality to retrieve users, channels, messages, and thread replies from a Slack workspace.
          Last updated -
          TypeScript
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server implementation that enables AI assistants to interact with Slack workspaces, allowing them to browse channels, send messages, reply to threads, add reactions, and retrieve user information.
          Last updated -
          18
          JavaScript
          Apache 2.0
        • -
          security
          F
          license
          -
          quality
          An MCP server that connects to Claude Desktop and provides access to Slack actions through ActionKit, allowing users to interact with Slack via their authenticated Paragon credentials.
          Last updated -
          1
          TypeScript
          • Apple

        View all related MCP servers

        ID: wc0u5519qh