Enables LLMs to interact with Slack workspaces by listing channels and posting messages using OAuth 2.0 authentication.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Slack MCP Serverpost 'Meeting starts in 5 minutes' to the #general channel"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Slack MCP Server
A Model Context Protocol (MCP) server that enables LLMs to interact with Slack workspaces through OAuth 2.0 authentication.
Features
š OAuth 2.0 Authentication: Secure Slack OAuth flow with automatic token management
š FastMCP Framework: Built with the official MCP SDK's FastMCP framework
š¾ Token Persistence: Tokens are saved locally or in DynamoDB for cloud deployments
š± Slack Integration: Post messages and list channels in Slack workspaces
š Dynamic Client Registration: Supports VSCode MCP extension and other clients
āļø GitHub + App Runner: Deploy directly from GitHub with AWS App Runner
Prerequisites
Python 3.11+
Slack App with OAuth 2.0 configured
uv (Python package manager)
Quick Start
1. Slack App Configuration
Create a new Slack App at https://api.slack.com/apps
Add OAuth Scopes in "OAuth & Permissions":
chat:write- Post messageschannels:read- List channels
Add Redirect URLs:
Local:
http://localhost:8080/slack/callbackProduction:
https://your-domain.com/slack/callback
Copy the Client ID and Client Secret
2. Installation
3. Configuration
Create a .env file:
4. Run the Server
Usage
With VSCode MCP Extension
Install the MCP extension for VSCode
Connect to the server URL:
http://localhost:8080/mcp/The OAuth flow will start automatically when you first use a tool
With Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Available Tools
list_channels: Get a list of Slack channels
Returns: Dictionary mapping channel names to IDspost_message: Post a message to a Slack channel
Args: - channel_id: Channel ID (required) - text: Message text (required) Returns: Success/failure messageget_auth_status: Check authentication status
Returns: Current authentication state and session info
Authentication Flow
When a tool is first used, the OAuth flow automatically starts
A browser window opens for Slack authorization
After authorization, the token is saved for future use
Subsequent requests use the cached token
Authentication
The server uses FastMCP's built-in OAuth 2.0 support with dynamic client registration. This allows compatibility with various MCP clients including VSCode's MCP extension.
Token Management
OAuth tokens are mapped between MCP tokens and Slack tokens internally
Tokens are persisted locally in memory (or DynamoDB in cloud)
OAuth flow starts automatically when tools are first used
Dynamic client registration supported for VSCode and other clients
Port Configuration
The server uses a single port:
8080: MCP server endpoint (includes health check and OAuth callback routes)
AWS App Runner Deployment (ECR-based)
The project uses ECR-based deployment with AWS App Runner for production:
App Runner provides:
Deployment from ECR with pre-built Docker images
Built-in HTTPS with automatic certificates
Manual deployment control (auto-deploy disabled by default)
Auto-scaling and simplified management
Avoids Python 3.11 build issues with App Runner's source code deployment
Project Structure
Development
Testing
Debugging
Enable debug logging by checking server.log:
Troubleshooting
Port Already in Use
OAuth Errors
bad_redirect_uri: Ensure the redirect URL in Slack app matches exactly:
Must include the full path:
http://localhost:8080/slack/callbackPort must be 8080 (MCP server port)
invalid_client_id: Verify SLACK_CLIENT_ID in .env
Token not found: Complete OAuth by authorizing in browser
Security Considerations
OAuth tokens are mapped between MCP tokens and Slack tokens
Tokens stored in memory locally, DynamoDB in production
Dynamic client registration supports various MCP clients
OAuth callbacks use HTTPS in production (App Runner)
Contributing
Fork the repository
Create a feature branch
Follow the guidelines in CLAUDE.md
Submit a pull request
License
MIT License - see LICENSE file for details