Skip to main content
Glama

Slack MCP

License GitHub stars Latest Release

MCP 服务器,让 AI 代理能够使用会话令牌访问你的 Slack 工作区。无需 OAuth 应用、无需机器人权限、无需管理员批准。

工作原理

Slack MCP 使用你现有的浏览器会话令牌(xoxc/xoxd)代表你与 Slack 交互。默认情况下以隐身模式读取——只有 mark-read 工具会触发已读回执。其他所有操作对其他用户都是不可见的。

令牌提取已内置于二进制文件中。如果你在 Chrome 或 Firefox 中登录了 Slack,设置流程可以自动提取令牌——无需从 DevTools 复制粘贴。

Related MCP server: slack-mpm

前提条件

你需要在浏览器中有一个活跃的 Slack 会话。在运行设置之前,请先在 ChromeChromiumEdgeFirefox 中登录你的工作区 app.slack.com

安装

Claude Code

claude mcp add slack-mcp -- npx -y @aaronsb/slack-mcp

然后让 Claude 运行 auth-setup 工具。它将引导你完成浏览器选择、配置文件选择和自动令牌提取。

Claude Desktop

最新版本下载适用于你平台的 .mcpb 文件:

平台

文件

macOS (Apple Silicon)

slack-mcp-darwin-arm64.mcpb

macOS (Intel)

slack-mcp-darwin-x64.mcpb

Linux (x64)

slack-mcp-linux-x64.mcpb

Linux (ARM)

slack-mcp-linux-arm64.mcpb

Windows (x64)

slack-mcp-windows-x64.mcpb

打开文件(双击或拖入 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 sse

npm(全局安装)

npm install -g @aaronsb/slack-mcp
slack-mcp setup

令牌设置

有三种方式获取你的 Slack 令牌,从最简单到最手动:

自动(Chrome/Edge)

auth-setup MCP 工具或 slack-mcp setup CLI 命令将:

  1. 检测你已安装的浏览器

  2. 让你选择哪个浏览器和配置文件包含 Slack

  3. 打开浏览器,导航到 Slack,并通过 Chrome DevTools 协议提取令牌

  4. 验证并保存它们

要求 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

工具

工具

功能说明

check-unreads

跨私信、频道和提及的未读消息

catch-up

最近频道活动,支持时间过滤

list-channels

浏览频道和成员关系

check-mentions

你的 @-提及,按紧急程度分组

search

查找消息(完整的 Slack 查询语法)

get-context

线程历史和对话上下文

check-timing

对话节奏分析

send-message

发布到频道、私信或线程

mark-read

将对话标记为已读(唯一触发已读回执的工具)

react

添加或删除表情符号反应

auth-setup

浏览器自动化的令牌提取

隐私

  • 默认隐身——读取操作从不触发已读回执;只有 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

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
6hResponse time
1wRelease cycle
19Releases (12mo)
Commit activity
Issues opened vs closed

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

  • A
    license
    -
    quality
    C
    maintenance
    A 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,956
    1
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    MCP server for interacting with Slack using a user token. It allows reading channels, DMs, threads, search, and posting messages as the authenticated user.
    25
    MIT

View all related MCP servers

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).

View all MCP Connectors

Latest Blog Posts

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