yt-slack-mcp
yt-slack-mcp
用于 Slack 的 MCP 服务器 — 读取永久链接、线程和频道历史;回复线程;添加表情反应。
实现了 Model Context Protocol 规范:它通过 stdio 传输运行,使用 JSON-RPC 2.0 通信,在 initialize 时协商协议版本,声明 tools 能力,并用 JSON Schema 描述每个工具。协议版本协商由 @modelcontextprotocol/sdk 的 Server 类处理,该类默认使用最新支持的版本。
工具
工具 | 描述 |
| 从永久链接读取消息或线程(包括 PDF/图片) |
| 按频道 ID + 时间戳读取线程的回复 |
| 读取最近的频道历史 |
| 回复线程(仅限于允许的频道) |
| 添加表情反应(仅限于允许的频道) |
读取工具使用私有的 Slack 浏览器会话 API(通过 xoxc / xoxd 令牌),因此可以获取私有文件内容 — PDF 会被下载并提取文本(最多 50 页 / 100k 字符),图片则以内联方式返回。
Related MCP server: Slack MCP Server
设置
1. 获取浏览器会话令牌
xoxc:Slack 网页版 localStorage 令牌(来自你已登录的浏览器会话)。xoxd:名为d的 Slack Cookie。
当 Slack 轮换/失效会话时,这些令牌可能需要刷新。
2. 放置密钥
将每个令牌保存为单行文件:
~/.config/opencode/secrets/slack-xoxc.txt
~/.config/opencode/secrets/slack-xoxd.txt或者通过配置文件或环境变量覆盖路径。
3. (可选)配置允许写入的频道和路径
所有配置都可以放在 JSON 配置文件中,路径为
~/.config/yt-slack-mcp/config.json(可通过 SLACK_MCP_CONFIG 覆盖):
{
"secretsDir": "~/.config/opencode/secrets",
"xoxcPath": "~/.config/opencode/secrets/slack-xoxc.txt",
"xoxdPath": "~/.config/opencode/secrets/slack-xoxd.txt",
"allowedWriteChannels": ["C0123456789", "C0987654321"],
"userAgent": "Mozilla/5.0"
}默认情况下,写入工具(slack_reply_to_thread、slack_add_reaction)
是锁定的 — 没有任何频道可写。每个字段都是可选的;如果
文件缺失,则仅表示使用默认值。环境变量始终覆盖配置文件。
配置
配置解析顺序:内置默认值 → 配置文件 → 环境变量。
配置文件键 | 环境变量 | 默认值 | 描述 |
|
|
| 存放令牌文件的目录 |
|
|
|
|
|
|
|
|
|
| (无) | 允许写入工具的频道 ID(在环境变量中以逗号分隔) |
|
|
| HTTP |
(配置文件路径) |
|
| JSON 配置文件的路径 |
MCP 主机配置
opencode
{
"mcp": {
"slack": {
"type": "local",
"command": ["npx", "yt-slack-mcp"]
}
}
}Claude Desktop
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["yt-slack-mcp"]
}
}
}许可证
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
- AlicenseNot gradedqualityCmaintenanceSelf-hosted MCP server for Slack using User OAuth Token, enabling message management, channel operations, and user interactions via natural language.25MIT
- AlicenseNot gradedqualityBmaintenanceA production-ready MCP server for the Slack API that enables searching, listing channels, reading history, inspecting users, fetching threads, and sending messages through controlled Slack tools.16,956MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for interacting with Slack using a user token. It allows reading channels, DMs, threads, search, and posting messages as the authenticated user.25MIT
- AlicenseAqualityCmaintenanceMCP server that reads Slack through your own browser session, authenticating as you rather than a bot. Provides tools to search messages, retrieve channel/DM/thread history, resolve users, and post messages (write disabled by default).10MIT
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
A basic MCP server to operate on the Postman API.
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/yentsun/slack-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server