Slack MCP
Slack MCP
MCP 服务器,让 AI 代理能够使用会话令牌访问你的 Slack 工作区。无需 OAuth 应用、无需机器人权限、无需管理员批准。
工作原理
Slack MCP 使用你现有的浏览器会话令牌(xoxc/xoxd)代表你与 Slack 交互。默认情况下以隐身模式读取——只有 mark-read 工具会触发已读回执。其他所有操作对其他用户都是不可见的。
令牌提取已内置于二进制文件中。如果你在 Chrome 或 Firefox 中登录了 Slack,设置流程可以自动提取令牌——无需从 DevTools 复制粘贴。
Related MCP server: slack-mpm
前提条件
你需要在浏览器中有一个活跃的 Slack 会话。在运行设置之前,请先在 Chrome、Chromium、Edge 或 Firefox 中登录你的工作区 app.slack.com。
安装
Claude Code
claude mcp add slack-mcp -- npx -y @aaronsb/slack-mcp然后让 Claude 运行 auth-setup 工具。它将引导你完成浏览器选择、配置文件选择和自动令牌提取。
Claude Desktop
从最新版本下载适用于你平台的 .mcpb 文件:
平台 | 文件 |
macOS (Apple Silicon) |
|
macOS (Intel) |
|
Linux (x64) |
|
Linux (ARM) |
|
Windows (x64) |
|
打开文件(双击或拖入 Claude Desktop)。当提示输入令牌时,你可以:
留空,并在连接后使用
auth-setup工具如果已有令牌,直接粘贴
独立二进制文件
从发布页面下载适用于你平台的二进制文件,然后:
# Extract tokens from your browser (interactive)
./slack-mcp setup
# Run as MCP server (stdio, default)
./slack-mcp
# Run as MCP server (SSE, for remote/shared access)
./slack-mcp --transport ssenpm(全局安装)
npm install -g @aaronsb/slack-mcp
slack-mcp setup令牌设置
有三种方式获取你的 Slack 令牌,从最简单到最手动:
自动(Chrome/Edge)
auth-setup MCP 工具或 slack-mcp setup CLI 命令将:
检测你已安装的浏览器
让你选择哪个浏览器和配置文件包含 Slack
打开浏览器,导航到 Slack,并通过 Chrome DevTools 协议提取令牌
验证并保存它们
要求 Chrome 在提取前完全关闭——重新打开时,你的标签页会恢复。
半自动(Firefox)
设置流程将一个临时浏览器扩展写入临时目录,然后引导你通过 about:debugging 在 Firefox 中加载它。该扩展提取令牌并将其发送到本地回调服务器。当 Firefox 关闭时,它会自动被移除。
手动
运行 slack-mcp setup 或使用 auth-setup 工具——如果未检测到浏览器或自动提取失败,它会回退到一个带有逐步 DevTools 说明的 localhost 网页。
你也可以直接通过环境变量设置令牌:
export SLACK_MCP_XOXC_TOKEN="xoxc-..."
export SLACK_MCP_XOXD_TOKEN="xoxd-..."
./slack-mcp工具
工具 | 功能说明 |
| 跨私信、频道和提及的未读消息 |
| 最近频道活动,支持时间过滤 |
| 浏览频道和成员关系 |
| 你的 @-提及,按紧急程度分组 |
| 查找消息(完整的 Slack 查询语法) |
| 线程历史和对话上下文 |
| 对话节奏分析 |
| 发布到频道、私信或线程 |
| 将对话标记为已读(唯一触发已读回执的工具) |
| 添加或删除表情符号反应 |
| 浏览器自动化的令牌提取 |
隐私
默认隐身——读取操作从不触发已读回执;只有
mark-read会触发频道名称,而非 ID——AI 永远不会看到内部 Slack 标识符
令牌本地存储——存储在
~/.config/slack-mcp/config.json,权限为0600除 Slack 外无网络流量——二进制文件仅连接
slack.com/api/*不下载浏览器——使用你已安装的浏览器,从不从 CDN 获取二进制文件
开发
make build # Build for current platform
make test # Run tests
make build-all-platforms # Cross-compile (6 platforms)
make release TAG=v1.3.0 # Tag and push (CI handles the rest)许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceA Model Context Protocol (MCP) server for Slack workspace integration. This server allows AI assistants to interact directly with your Slack workspace, providing tools to manage channels, send messages, list users, and upload files.16,9561MIT
- Flicense-qualityAmaintenanceMCP server for Slack workspace integration, exposing 40+ Slack operations as tools for Claude Desktop and providing a clean async Python API.1
- Alicense-qualityCmaintenanceAn MCP server that enables AI agents to read and write Slack messages as the user, not as a bot, using Slack user tokens for authentic actions across multiple workspaces.1MIT
- Alicense-qualityBmaintenanceMCP server for interacting with Slack using a user token. It allows reading channels, DMs, threads, search, and posting messages as the authenticated user.25MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aaronsb/slack-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server