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 in workflows like Smithery, CrewAI, or MCP Inspector.
slack-mcp/
├── server.py # Main MCP tool server with multiple tools
├── utils/
│ └── slack.py # Contains reusable Slack API functions
├── .env # Store your SLACK_TOKEN safely here
├── smithery.yaml # Configuration for Smithery deployment
├── README.md # This file
├── video_demo.mp4 # Optional recorded demo
└── requirements.txt # Python dependencies
Fetches the most recent messages from a given Slack channel.
- Inputs:
channel_id
,limit
- Returns: Formatted recent messages.
Fetches messages from a specific user within a channel.
- Inputs:
channel_id
,username
,limit
- Returns: Messages sent by the user.
Summarizes the last N messages from a channel using a connected LLM.
- Inputs:
channel_id
,limit
- Returns: AI-generated summary.
Groups recent channel messages by sender.
-
Inputs:
channel_id
,limit
-
Returns: A grouped format like:
@user1: - Message 1 - Message 2 @user2: - Message A
- Go to: https://api.slack.com/apps
- Click Create New App > From Scratch
- Give it a name and choose your workspace
In OAuth & Permissions, under Bot Token Scopes
, add:
channels:read
channels:history
users:read
chat:write
(optional for sending messages)
- Click Install App to Workspace
- Authorize permissions
- Copy the Bot User OAuth Token (starts with
xoxb-...
)
Create a .env
file:
SLACK_TOKEN=xoxb-your-token-here
If you change scopes later:
- Revisit OAuth & Permissions
- Click Reinstall App to apply new scopes
- Run the server:
python server.py
- Use MCP Inspector to call tools and test output
- Push your code to GitHub
- Deploy your MCP to Smithery
- Use the "Run tool" tab to test individual tools
You can connect these tools via Smithery to Claude workflows for real-time Slack insights and summaries.
Install dependencies with:
pip install -r requirements.txt
Or manually:
pip install fastmcp httpx python-dotenv
SLACK_TOKEN=xoxb-123-your-token
Never commit this file publicly.
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.
Check out video_demo.mp4
for a walkthrough of tool usage in MCP Inspector and Smithery.
- FastMCP by Model Context Protocol
- Smithery.ai for deploying and testing MCPs
- Slack Web API Docs: https://api.slack.com/
Grouped Slack Messages:
@bakar:
- Just pushed latest PR
- Working on the backend API
@hamza:
- Updated Figma designs
- Fixed navbar bug
Let me know if you want to add badges, GitHub Actions, or convert this into a proper mkdocs
site!