Provides tools for fetching and processing Slack messages, including retrieving recent messages from channels, getting messages from specific users, summarizing channel conversations, and grouping messages by sender
Slack-MCP
This project is a Multi-Tool MCP (Model Context Protocol) server for Slack automation using the FastMCP library. It allows you to fetch and process Slack messages using AI agents.This project is great example to learn and Build Understanding reagarding MCPs.
📂 Folder Structure
🚀 Tools in This MCP
1. get_recent_messages
Fetches the most recent messages from a given Slack channel.
- Inputs:
channel_id
,limit
- Returns: Formatted recent messages.
2. get_user_messages
Fetches messages from a specific user within a channel.
- Inputs:
channel_id
,username
,limit
- Returns: Messages sent by the user.
3. summarize_recent_messages
Summarizes the last N messages from a channel using a connected LLM.
- Inputs:
channel_id
,limit
- Returns: AI-generated summary.
4. group_messages_by_user
Groups recent channel messages by sender.
- Inputs:
channel_id
,limit
- Returns: A grouped format like:
🚪 Slack OAuth Setup & Token Generation
1. Create a Slack App
- Go to: https://api.slack.com/apps
- Click Create New App > From Scratch
- Give it a name and choose your workspace
2. Set OAuth Scopes
In OAuth & Permissions, under Bot Token Scopes
, add:
channels:read
channels:history
users:read
chat:write
(optional for sending messages)
3. Install to Workspace
- Click Install App to Workspace
- Authorize permissions
- Copy the Bot User OAuth Token (starts with
xoxb-...
)
4. Save the Token
Create a .env
file:
If you change scopes later:
- Revisit OAuth & Permissions
- Click Reinstall App to apply new scopes
✨ Testing the Tools
On MCP Inspector (Local)
- Run the server:
- Use MCP Inspector to call tools and test output
On Smithery (Cloud)
- Push your code to GitHub
- Deploy your MCP to Smithery
- Use the "Run tool" tab to test individual tools
On Claude (Cloud Desktop)
You can connect these tools via Smithery to Claude workflows for real-time Slack insights and summaries.
🚜 Requirements
Install dependencies with:
Or manually:
🔧 Environment File (.env)
🎉 Contributing
Pull requests are welcome. If you’d like to add new Slack tools (e.g., send_message
, track_reactions
, etc.), feel free to open an issue or PR.
📹 Video Demo On claude desktop:
https://github.com/user-attachments/assets/37d905a5-6382-40ce-9500-2dd744656546
🙏 Acknowledgments
- FastMCP by Model Context Protocol
- Smithery.ai for deploying and testing MCPs
- Slack Web API Docs: https://api.slack.com/
📊 Example Output
Grouped Slack Messages:
📊 Smithery.ai (Cloud Deployment)
Here is the URL go and checkout this mcp_server: Slack_MCP_Server
🧑💻 Author
Built by Abu Bakar Yasir — Computer Engineering @ COMSATS + AI Software Engineer | Full Stack Developer 🚀
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
fetch the latest channels messages chat
Related MCP Servers
- -securityAlicense-qualityFacilitates semantic analysis of chat conversations through vector embeddings and knowledge graphs, offering tools for semantic search, concept extraction, and conversation pattern analysis.Last updated -11PythonMIT License
- AsecurityFlicenseAqualitySummarizes your chat messages.Last updated -11,009TypeScript
- AsecurityFlicenseAqualityEnables interaction with the Twitch API, allowing users to retrieve comprehensive information about channels, streams, games, and more, with additional support for searching and accessing chat elements like emotes and badges.Last updated -1431TypeScript
- -securityFlicense-qualityFetch Pokémon data from PokéAPILast updated -Python