Slack MCP 服务器
用于 Slack API 的 MCP 服务器,使 Claude 能够与 Slack 工作区进行交互。
工具
slack_list_channels
- 列出工作区中的公共或预定义频道
- 可选输入:
limit
(数字,默认值:100,最大值:200):返回的最大通道数cursor
(字符串):下一页的分页光标
- 返回:频道列表及其 ID 和信息
slack_post_message
- 向 Slack 频道发布新消息
- 必需输入:
channel_id
(string): 要发布到的频道的 IDtext
(字符串):要发布的消息文本
- 返回:消息发布确认和时间戳
slack_reply_to_thread
- 回复特定消息线程
- 必需输入:
channel_id
(字符串):包含线程的通道thread_ts
(字符串):父消息的时间戳text
(字符串):回复文本
- 返回:回复确认和时间戳
slack_add_reaction
- 在消息中添加表情符号反应
- 必需输入:
channel_id
(字符串):包含消息的频道timestamp
(字符串):需要响应的消息时间戳reaction
(字符串):不带冒号的表情符号名称
- 返回:反应确认
slack_get_channel_history
- 获取频道的最新消息
- 必需输入:
channel_id
(字符串):频道 ID
- 可选输入:
limit
(数字,默认值:10):要检索的消息数量
- 返回:消息及其内容和元数据的列表
slack_get_thread_replies
- 获取消息线程中的所有回复
- 必需输入:
channel_id
(字符串):包含线程的通道thread_ts
(字符串):父消息的时间戳
- 返回:回复列表及其内容和元数据
slack_get_users
- 获取具有基本个人资料信息的工作区用户列表
- 可选输入:
cursor
(字符串):下一页的分页光标limit
(数字,默认值:100,最大值:200):返回的最大用户数
- 返回:用户及其基本资料的列表
slack_get_user_profile
- 获取特定用户的详细个人资料信息
- 必需输入:
user_id
(字符串):用户的 ID
- 返回:详细的用户资料信息
设置
- 创建 Slack 应用程序:
- 访问Slack 应用页面
- 点击“创建新应用”
- 选择“从头开始”
- 命名您的应用并选择您的工作区
- 配置机器人令牌范围:导航到“OAuth 和权限”并添加以下范围:
channels:history
- 查看公共频道中的消息和其他内容channels:read
- 查看基本频道信息chat:write
- 以应用程序身份发送消息reactions:write
- 在消息中添加表情符号反应users:read
- 查看用户及其基本信息users.profile:read
- 查看用户的详细资料
- 将应用程序安装到工作区:
- 点击“安装到工作区”并授权应用程序
- 保存以
xoxb-
开头的“Bot User OAuth Token”
- 按照本指南获取您的团队 ID(以
T
开头)
与 Claude Desktop 一起使用
将以下内容添加到您的claude_desktop_config.json
中:
NPX
码头工人
与 VS Code 一起使用
为了快速安装,请单击下面的安装按钮之一...
如需手动安装,请将以下 JSON 块添加到 VS Code 中的“用户设置 (JSON)”文件中。您可以按下Ctrl + Shift + P
并输入Preferences: Open Settings (JSON)
来完成此操作。
或者,您可以将其添加到工作区中名为.vscode/mcp.json
的文件中。这样您就可以与其他人共享该配置。
请注意
.vscode/mcp.json
文件中不需要mcp
键。
NPX
Docker
环境变量
SLACK_BOT_TOKEN
:必需。以xoxb-
开头的机器人用户 OAuth 令牌。SLACK_TEAM_ID
:必填。您的 Slack 工作区 ID,以T
开头。SLACK_CHANNEL_IDS
:可选。以逗号分隔的频道 ID 列表,用于限制频道访问权限(例如,“C01234567、C76543210”)。如果未设置,则将列出所有公开频道。
故障排除
如果遇到权限错误,请验证:
- 所有必需的范围都已添加到您的 Slack 应用中
- 该应用程序已正确安装到您的工作区
- 令牌和工作区 ID 已正确复制到您的配置中
- 该应用已添加到需要访问的频道
建造
Docker 构建:
执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
用于 Slack API 的 MCP 服务器,使 Claude 能够与 Slack 工作区进行交互。
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that enables saving and sharing Claude Desktop conversations, allowing users to store chats privately or make them public through a web interface.Last updated -11MIT License
- -securityFlicense-qualityAn 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 -3
- -securityFlicense-qualityAn 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
- AsecurityFlicenseAqualityAn MCP server that allows Claude to interact with Discord by providing tools for sending/reading messages and managing server resources through Discord's API.Last updated -1929