
Slack Mcp Server
io.github.stevenvo由 GitHub 帳號 stevenvo 發布v0.1.0更新於 Oct 24, 2026
Read Slack conversations, threads, user info, and search messages from your MCP client.
概覽
一個本機 MCP 伺服器,讓助理讀取 Slack 工作區的頻道訊息、討論串、使用者資料和搜尋結果。
- 可以做什麼
- 依時間範圍和數量上限讀取頻道近期訊息,並讀取包含所有回覆和表情回應的討論串。列出你所在的頻道,包括公開頻道、私人頻道、私訊和群組私訊,並取得頻道主題、用途和成員數等中繼資料。查詢使用者資料,包括姓名、電子郵件、職稱、狀態和時區。搜尋你被提及或參與的對話。為指定訊息產生永久連結。
- 適用情境
- 適合讓助理掌握專案頻道動態、閱讀討論串、透過搜尋找回過去的決定,或在不離開對話用戶端的情況下了解人員和頻道背景。它僅供讀取,因此適合調查和摘要,不適合發文或管理 Slack。
- 執行需求
- 以 Python 套件形式在本機執行(需 Python 3.10 或以上版本),可透過 pip 或 uvx 安裝。需要一個設定好所列 OAuth 權限範圍的 Slack 應用程式,以及使用者權杖(SLACK_USER_TOKEN)或機器人權杖(SLACK_BOT_TOKEN),並需設定 SLACK_WORKSPACE_URL 以產生訊息連結。使用機器人權杖時需將機器人邀請進各頻道。需要連線至 Slack API 的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Slack Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Slack MCP Server
[PyPI] [Python Version] [License: MIT]
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:
Option 2: Install from Source
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.
- Go to https://api.slack.com/apps
- Create a new app (or use existing)
- Navigate to "OAuth & Permissions"
- Add the following User Token Scopes:
channels:history- View messages in public channelschannels:read- View basic channel infogroups:history- View messages in private channelsgroups:read- View basic private channel infoim:history- View messages in direct messagesim:read- View basic DM infompim:history- View messages in group DMsmpim:read- View basic group DM infousers:read- View user informationsearch:read- Search messages
- Install the app to your workspace
- 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.
- Follow steps 1-2 above
- Add Bot Token Scopes instead (same list but in bot section)
- Install the app
- Copy the "Bot User OAuth Token" (starts with
xoxb-) - Invite the bot to channels you want to read:
/invite @YourBotName
Configure Environment
Create a .env file:
Edit .env and add your token:
Configuration for Claude Code
Add this server to Claude Code by editing your ~/.claude.json file:
Using PyPI Package (Recommended)
Using Local Installation
If you installed from source:
Using Bot Token
If you prefer to use a bot token instead of a user token:
Note: Remember to invite your bot to channels: /invite @YourBotName
Verify Installation
Restart Claude Code and verify the server is running:
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:
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:
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:
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:
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:
Supported Types:
public_channel- Public channelsprivate_channel- Private channelsmpim- Group direct messagesim- 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:
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:
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
Following Threads
Discovery & Search
Getting Context
Practical Workflows
Catch up on a project:
Find that important decision:
Get onboarding context:
Finding Channel IDs
Method 1: From Slack URL
When you're in a channel, the URL looks like:
The part after /archives/ is the channel ID: C1234567890
Method 2: Using the MCP Server
Ask Claude:
Method 3: Right-click in Slack
- Right-click on the channel name
- Click "Copy link"
- 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:
- Go to https://api.slack.com/apps and select your app
- Navigate to "OAuth & Permissions"
- Ensure you've added all required scopes listed in the Authentication section
- Reinstall the app to your workspace
- Copy the new token
"Channel not found" Error
For Bot Tokens:
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:
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:
Check logs for errors:
Common solutions:
- Restart Claude Code completely
- Check
~/.claude.jsonsyntax is valid JSON - Verify Python version:
python --version(must be 3.10+) - Test the server manually:
python server.py(if installed from source)
SSL Certificate Errors
If you're behind a corporate proxy (like Zscaler):
Rate Limiting
Slack API has rate limits. If you hit them:
- Reduce the
limitparameter inread_channel_messages - Increase
lookback_hoursto fetch fewer messages - Wait a few minutes before retrying
Rate limit indicators:
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
.envfile 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?
- Check existing issues at https://github.com/stevenvo/slack-mcp-server/issues
- 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
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly
- Commit with clear messages:
git commit -m "Add amazing feature" - Push to your fork:
git push origin feature/amazing-feature - Open a Pull Request
Development Setup
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!
來源:README.md,提交 f11488b
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分