Slack User MCP Server
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
返回:详细的用户资料信息
Related MCP server: Slack MCP Server
设置
创建 Slack 应用程序:
点击“创建新应用”
选择“从头开始”
命名您的应用并选择您的工作区
配置用户令牌范围:导航到“OAuth 和权限”并添加以下范围:
channels:history- 查看公共频道中的消息和其他内容channels:read- 查看基本频道信息chat:write- 以自己的身份发送消息reactions:write- 在消息中添加表情符号反应users:read- 查看用户及其基本信息
将应用程序安装到工作区:
点击“安装到工作区”并授权应用程序
保存以
xoxp-开头的“用户 OAuth 令牌”
按照本指南获取您的团队 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故障排除
如果遇到权限错误,请验证:
所有必需的范围都已添加到您的 Slack 应用中
该应用程序已正确安装到您的工作区
令牌和工作区 ID 已正确复制到您的配置中
该应用已添加到需要访问的频道
您使用的是用户 OAuth 令牌(以 xoxp- 开头),而不是机器人令牌
建造
Docker 构建:
docker build -t mcp/slack-user -f src/slack/Dockerfile .执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
Available Tools
8 toolsslack_add_reactionB
Add a reaction emoji to a message
Inputs: channel_id (required), timestamp (required), reaction (required).
slack_get_channel_historyC
Get recent messages from a channel
Inputs: channel_id (required), limit.
slack_get_thread_repliesB
Get all replies in a message thread
Inputs: channel_id (required), thread_ts (required).
slack_get_user_profileB
Get detailed profile information for a specific user
Inputs: user_id (required).
slack_get_usersB
Get a list of all users in the workspace with their basic profile information
Inputs: cursor, limit.
slack_list_channelsB
List public channels in the workspace with pagination
Inputs: limit, cursor.
slack_post_messageB
Post a new message to a Slack channel
Inputs: channel_id (required), text (required).
slack_reply_to_threadB
Reply to a specific message thread in Slack
Inputs: channel_id (required), thread_ts (required), text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose targeting specific Slack operations: adding reactions, retrieving channel history, fetching thread replies, getting user profiles, listing users, listing channels, posting messages, and replying to threads. There is no overlap or ambiguity between these functions.
All tool names follow a consistent 'slack_verb_noun' pattern using snake_case, such as slack_post_message and slack_get_user_profile. This uniformity makes the tool set predictable and easy to navigate.
With 8 tools, the server is well-scoped for a Slack integration, covering essential messaging, user management, and channel operations. Each tool serves a clear purpose without redundancy, making the count appropriate for the domain.
The tool set provides strong coverage for core Slack workflows, including message posting, reactions, threading, and user/channel listing. Minor gaps exist, such as updating or deleting messages, but agents can likely work around these with the available tools.
Maintenance
Related MCP Connectors
Enable interaction with Slack workspaces. Supports subscribing to Slack events through Resources.
Hosted Slack MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Chat with your AI agents from Slack: each gets a thread in your DM, and your replies there wake it.
Work with shared spaces, threads, documents, skills, apps, automations, and connected tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Slack workspaces through comprehensive integration capabilities. Supports channel management, messaging, thread replies, reactions, and message history retrieval through natural language commands.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Slack workspaces through comprehensive channel management, messaging, direct messages, search functionality, and user management capabilities.305 npm3MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Slack workspaces through natural language, supporting channel management, message operations, user profiles, reactions, and threaded conversations.-
- AlicenseAqualityCmaintenanceEnables Slack workspace integration including channel creation, user invites, message posting, and thread management through natural language.61MIT