Slack MCP Server Ab7d0313

MCPAI代理

提供方 stevenvo

AI代理 stdio · 本地进程 OAuth 授权 社区 / 第三方 Claude
查看接入方式

一个通过Model Context Protocol(MCP)提供程序化访问Slack对话、线程和工作区信息的服务器,专为AI助手如Claude设计,使其能够通过标准化接口与Slack工作区交互。

一句话选型结论

按资料字段整理

Slack MCP Server Ab7d0313 属于AI代理类 MCP 服务器,stdio · 本地进程,OAuth 授权,可直接接入 Claude,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权OAuth 授权 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

Slack集成Python本地部署AI助手对话管理工作区信息MCP协议

安装与配置

stdio · 本地进程 OAuth 授权
客户端在本机拉起子进程,数据不出本机
pip install slack-mcp-server-v2

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Slack MCP Server Ab7d0313当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方stevenvo上游标注的维护方 stevenvo
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

16.6 KB
来自项目仓库与上游目录的原文,未做删改

Slack MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to Slack conversations, threads, and workspace information. Designed for AI assistants like Claude to interact with your Slack workspace through a standardized interface.

What is MCP?

The Model Context Protocol is an open standard that enables AI assistants to securely access external data sources and tools. This server implements MCP to give Claude direct access to your Slack workspace.

Features

📨 Message Operations

  • Read Channel Messages: Fetch recent messages from any channel with flexible time-based filtering
  • Read Thread Messages: Access complete conversation threads including all replies
  • Get Message Permalinks: Generate permanent, shareable links to specific messages

🔍 Discovery & Search

  • List Your Channels: Enumerate all channels you're a member of (public, private, DMs, group DMs)
  • Search Conversations: Find messages where you're mentioned or involved using Slack's search

📊 Metadata & Context

  • Get Channel Info: View channel details, topics, purposes, member counts, and settings
  • Get User Info: Look up user profiles, emails, titles, timezones, and status information

Quick Start

Option 1: Install from PyPI (Recommended)

The easiest way to use this MCP server is to install it directly from PyPI:```bash

Install via pip

pip install slack-mcp-server-v2

Or install via uvx (recommended for MCP servers)

uvx slack-mcp-server-v2


### Option 2: Install from Source```bash
# Clone the repository
git clone https://github.com/stevenvo/slack-mcp-server.git
cd slack-mcp-server

# Install dependencies
pip install -r requirements.txt

After installation, you'll need to set up authentication (see below).

Authentication

Option 1: User Token (Recommended)

A User Token uses your personal Slack permissions and can access all channels you're a member of.

  1. Go to https://api.slack.com/apps
  2. Create a new app (or use existing)
  3. Navigate to "OAuth & Permissions"
  4. Add the following User Token Scopes:
    - channels:history - View messages in public channels
    - channels:read - View basic channel info
    - groups:history - View messages in private channels
    - groups:read - View basic private channel info
    - im:history - View messages in direct messages
    - im:read - View basic DM info
    - mpim:history - View messages in group DMs
    - mpim:read - View basic group DM info
    - users:read - View user information
    - search:read - Search messages
  5. Install the app to your workspace
  6. Copy the "User OAuth Token" (starts with xoxp-)

Option 2: Bot Token

A Bot Token is more limited but easier to set up for team-wide access.

  1. Follow steps 1-2 above
  2. Add Bot Token Scopes instead (same list but in bot section)
  3. Install the app
  4. Copy the "Bot User OAuth Token" (starts with xoxb-)
  5. Invite the bot to channels you want to read: /invite @YourBotName

Configure Environment

Create a .env file:```bash
cp .env.example .env


Edit `.env` and add your token:```bash
# Use one of these:
SLACK_USER_TOKEN=xoxp-your-user-token-here
# OR
SLACK_BOT_TOKEN=xoxb-your-bot-token-here

Configuration for Claude Code

Add this server to Claude Code by editing your ~/.claude.json file:

Using PyPI Package (Recommended)```json

{
"mcpServers": {
"slack": {
"command": "uvx",
"args": ["slack-mcp-server-v2"],
"env": {
"SLACK_USER_TOKEN": "xoxp-your-user-token-here",
"SLACK_WORKSPACE_URL": "https://your-workspace.slack.com"
}
}
}
}


### Using Local Installation

If you installed from source:```json
{
  "mcpServers": {
    "slack": {
      "command": "python",
      "args": ["/path/to/slack-mcp-server/server.py"],
      "env": {
        "SLACK_USER_TOKEN": "xoxp-your-user-token-here",
        "SLACK_WORKSPACE_URL": "https://your-workspace.slack.com"
      }
    }
  }
}

Using Bot Token

If you prefer to use a bot token instead of a user token:```json
{
"mcpServers": {
"slack": {
"command": "uvx",
"args": ["slack-mcp-server-v2"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here",
"SLACK_WORKSPACE_URL": "https://your-workspace.slack.com"
}
}
}
}


**Note**: Remember to invite your bot to channels: `/invite @YourBotName`

### Verify Installation

Restart Claude Code and verify the server is running:```bash
claude mcp list

You should see slack in the list of active MCP servers.

Available Tools

This server provides 7 MCP tools for interacting with Slack:

📬 read_channel_messages

Retrieve recent messages from any Slack channel with flexible time filtering.

Parameters:

Name Type Required Default Description
channel_id string ✅ - Slack channel ID (e.g., C1234567890)
lookback_hours number ❌ 24 Hours to look back from now
limit number ❌ 100 Max messages to retrieve (max: 1000)

Natural Language Examples:
- "Show me messages from the #general channel in the last 24 hours"
- "Read the last 48 hours of messages from channel C1234567890"
- "Get the most recent 50 messages from C070PDRHQS1"

Returns: Formatted messages with timestamps, user mentions, thread indicators, reactions, and permalinks.


💬 read_thread_messages

Read all messages in a conversation thread, including the parent message and all replies.

Parameters:

Name Type Required Description
channel_id string ✅ Channel ID where the thread exists
thread_ts string ✅ Thread timestamp (the ts field of the parent message)

Natural Language Examples:
- "Read the full thread with timestamp 1699564800.123456 in channel C1234567890"
- "Show me all replies to message ts 1699564800.123456"

Returns: Complete thread with parent message and all replies, formatted with timestamps and reactions.


📋 get_channel_info

Get detailed metadata about a Slack channel.

Parameters:

Name Type Required Description
channel_id string ✅ Slack channel ID

Natural Language Examples:
- "Get info about channel C1234567890"
- "Show me details for the #engineering channel"

Returns: Channel name, ID, creation date, member count, privacy status, topic, and purpose.


👤 get_user_info

Look up detailed profile information for any Slack user.

Parameters:

Name Type Required Description
user_id string ✅ Slack user ID (e.g., U1234567)

Natural Language Examples:
- "Get info about user U1234567"
- "Show me details for @john.doe"

Returns: User's real name, display name, email, title, status, timezone, and admin/bot flags.


📑 list_my_channels

List all channels you're a member of, with support for different channel types.

Parameters:

Name Type Required Default Description
types string ❌ public_channel,private_channel Comma-separated channel types

Supported Types:
- public_channel - Public channels
- private_channel - Private channels
- mpim - Group direct messages
- im - Direct messages

Natural Language Examples:
- "List all my channels"
- "Show me all private channels I'm in"
- "List all my DMs"

Returns: Channel names, IDs, member counts, and privacy indicators.


🔍 search_my_conversations

Search for messages across all conversations where you're mentioned or involved.

Parameters:

Name Type Required Default Description
query string ✅ - Search terms
count number ❌ 20 Number of results (max: 100)

Natural Language Examples:
- "Search my conversations for 'deployment'"
- "Find messages mentioning 'bug fix' in the last week"
- "Search for messages about 'Q4 planning'"

Returns: Matching messages with channel names, user info, timestamps, and permalinks.


🔗 get_message_permalink

Generate a permanent, shareable link to a specific Slack message.

Parameters:

Name Type Required Description
channel_id string ✅ Channel ID
message_ts string ✅ Message timestamp

Natural Language Examples:
- "Get permalink for message 1699564800.123456 in channel C1234567890"
- "Generate a link to this message"

Returns: Permanent URL that works even if the workspace's URL changes.

Usage Examples

Once configured in Claude Code, you can interact with your Slack workspace using natural language. Here are some example queries:

Reading Messages```

👤 "Show me the latest messages from #engineering"
🤖 [Claude fetches and displays recent messages with timestamps, users, and links]

👤 "What were the last 100 messages in the #product-updates channel from the past week?"
🤖 [Claude retrieves messages from the last 168 hours with limit of 100]


### Following Threads```
👤 "Read the full thread that starts at timestamp 1699564800.123456 in channel C1234567890"
🤖 [Claude displays the entire conversation thread with all replies]

Discovery & Search```

👤 "List all channels I'm a member of"
🤖 [Claude shows all your public and private channels with member counts]

👤 "Search my Slack conversations for 'quarterly review'"
🤖 [Claude searches across all your messages and shows matches with context]

👤 "Find mentions of 'production deployment' in my conversations"
🤖 [Claude uses Slack search to find relevant messages]


### Getting Context```
👤 "Get info about channel C1234567890"
🤖 [Claude shows channel name, topic, member count, etc.]

👤 "Who is user U1234567?"
🤖 [Claude displays user profile with email, title, timezone]

👤 "Get me a permanent link to message 1699564800.123456 in #general"
🤖 [Claude generates a shareable permalink]

Practical Workflows

Catch up on a project:```
👤 "Show me all messages from #project-alpha in the last 3 days"


**Find that important decision:**```
👤 "Search for messages about 'API migration decision'"

Get onboarding context:```
👤 "List all channels I'm in and show me the purpose of each"


## Finding Channel IDs

### Method 1: From Slack URL
When you're in a channel, the URL looks like:```
https://your-workspace.slack.com/archives/C1234567890/p1234567890

The part after /archives/ is the channel ID: C1234567890

Method 2: Using the MCP Server

Ask Claude:```
List all my channels


### Method 3: Right-click in Slack
1. Right-click on the channel name
2. Click "Copy link"
3. Extract the channel ID from the URL

## Requirements

- **Python**: 3.10 or higher
- **Slack Workspace**: Admin access to create and configure a Slack app
- **Claude Code**: Latest version with MCP support
- **Operating System**: macOS, Linux, or Windows with WSL

## Troubleshooting

### "Missing required scopes" Error

Your Slack app needs the proper OAuth scopes configured.

**Solution:**
1. Go to https://api.slack.com/apps and select your app
2. Navigate to "OAuth & Permissions"
3. Ensure you've added all required scopes listed in the Authentication section
4. Reinstall the app to your workspace
5. Copy the new token

### "Channel not found" Error

**For Bot Tokens:**```bash
# Invite the bot to the channel first
/invite @YourBotName

For User Tokens:
- Verify you're a member of the channel
- Check the channel ID is correct (see "Finding Channel IDs" section)

"Not authenticated" Error

Check your configuration:```bash

Verify token is set correctly (check ~/.claude.json)

cat ~/.claude.json | grep -A 5 "slack"

Ensure no extra whitespace

echo "$SLACK_USER_TOKEN" | wc -c


**Common issues:**
- Token has expired or been revoked
- Extra spaces or newlines in the token string
- Wrong token type (user vs bot)
- Token not properly quoted in JSON

### MCP Server Not Running

**Verify server is loaded:**```bash
# List all MCP servers
claude mcp list

# Check if slack server is running
claude mcp list | grep slack

Check logs for errors:```bash

View recent MCP server logs

tail -f ~/.claude/debug/*.log

Filter for slack-related errors

tail -f ~/.claude/debug/*.log | grep -i slack


**Common solutions:**
1. Restart Claude Code completely
2. Check `~/.claude.json` syntax is valid JSON
3. Verify Python version: `python --version` (must be 3.10+)
4. Test the server manually: `python server.py` (if installed from source)

### SSL Certificate Errors

If you're behind a corporate proxy (like Zscaler):```bash
# Set SSL certificate environment variable
export SSL_CERT_FILE=/path/to/your/ca-bundle.pem
export REQUESTS_CA_BUNDLE=/path/to/your/ca-bundle.pem

# Then reinstall
pip install slack-mcp-server-v2

Rate Limiting

Slack API has rate limits. If you hit them:
- Reduce the limit parameter in read_channel_messages
- Increase lookback_hours to fetch fewer messages
- Wait a few minutes before retrying

Rate limit indicators:```
Error: ratelimited


**Solution:** The server will automatically handle rate limits, but you may need to wait.

## Security & Privacy

### Token Security

- **Never commit tokens to version control** - The `.env` file is gitignored by default
- **Revoke compromised tokens immediately** at https://api.slack.com/apps
- **Use environment variables** in production, never hardcode tokens
- **Rotate tokens periodically** as part of security best practices

### Data Access

**User Tokens:**
- Have access to everything you can see in Slack
- Use your personal permissions
- See all channels you're a member of
- More convenient for personal use

**Bot Tokens:**
- Limited to channels where the bot is invited
- Separate from personal identity
- Better for team/shared setups
- More granular control

### Corporate Environments

If you're using this in a corporate environment:
- Check with your IT/Security team before creating Slack apps
- Be aware of data retention and compliance policies
- Consider using bot tokens for audit trails
- SSL certificate configuration may be required (see Troubleshooting)

## Limitations

- **Read-only**: This server only reads data, it cannot post messages or modify content
- **Rate limits**: Subject to Slack's API rate limits (Tier 3: ~50 requests per minute)
- **Token scope**: Can only access channels/conversations the token has permission to see
- **Message history**: Limited to Slack workspace's message retention policy

## Contributing

Contributions are welcome! Here's how you can help:

### Reporting Issues

Found a bug or have a feature request?
1. Check existing issues at https://github.com/stevenvo/slack-mcp-server/issues
2. Create a new issue with:
   - Clear description of the problem/feature
   - Steps to reproduce (for bugs)
   - Expected vs actual behavior
   - Your environment (Python version, OS, Claude Code version)

### Pull Requests

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Make your changes
4. Test thoroughly
5. Commit with clear messages: `git commit -m "Add amazing feature"`
6. Push to your fork: `git push origin feature/amazing-feature`
7. Open a Pull Request

### Development Setup```bash
# Clone your fork
git clone https://github.com/YOUR_USERNAME/slack-mcp-server.git
cd slack-mcp-server

# Install in development mode
pip install -e .

# Make changes and test
python server.py

Changelog

v0.1.0 (2025-01-06)

  • Initial release
  • 7 core tools for reading Slack conversations
  • Support for user and bot tokens
  • Published to PyPI and MCP registry
  • Comprehensive documentation

Roadmap

Potential future enhancements:
- [ ] Support for Slack Enterprise Grid
- [ ] Message filtering by user or reactions
- [ ] Export conversations to different formats
- [ ] Support for Slack Connect channels
- [ ] Caching to reduce API calls
- [ ] Webhook support for real-time updates

Suggestions welcome in GitHub Issues!

Related Projects

  • Model Context Protocol - The MCP specification
  • MCP Registry - Browse more MCP servers
  • Slack SDK for Python - The underlying library
  • Claude Code - AI assistant with MCP support

Support

  • Documentation: You're reading it!
  • Issues: https://github.com/stevenvo/slack-mcp-server/issues
  • Discussions: https://github.com/stevenvo/slack-mcp-server/discussions
  • Slack API Docs: https://api.slack.com/docs

License

MIT License - see LICENSE file for details.

Copyright (c) 2025 Steven Vo


Made with ❤️ for the MCP community

If you find this useful, please ⭐ star the repository on GitHub!

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Slack MCP Server Ab7d0313 怎么安装?

在客户端按下面的安装命令接入:pip install slack-mcp-server-v2。装完在客户端配置里引用同一个包或端点。

Slack MCP Server Ab7d0313 怎么在 Claude 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Slack MCP Server Ab7d0313 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Slack MCP Server Ab7d0313 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

Slack MCP Server Ab7d0313 支持哪些客户端?

资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Slack MCP Server Ab7d0313 能提供哪些能力?

资料显示能力标签包括 Slack、对话管理、Python、Claude。具体工具清单以官方文档为准。

Slack MCP Server Ab7d0313 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Slack MCP Server Ab7d0313 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。