@digitalpine/slack-api-mcp
v1.3.0
Published
Slack API MCP server providing comprehensive Slack operations (messaging, reactions, channels, users, file uploads)
Readme
Slack API MCP Server
Comprehensive Slack operations MCP server built with xmcp. Provides 12 tools for Slack messaging, channel management, user info, and file uploads.
Tools
- post_message - Post messages to channels/threads (Block Kit only)
- update_message - Edit existing messages (Block Kit only)
- delete_message - Delete messages
- add_reaction - Add emoji reactions
- pin_message - Pin messages to channels
- get_channel_context - Fetch message history with user name resolution
- get_user_info - Get user information
- list_channels - List accessible channels
- upload_snippet - Upload text files/snippets (code, logs, etc.)
- get_image_from_slack - Download images from Slack
- create_channel - Create new Slack channels
- invite_users - Invite users to channels
Features
- Block Kit enforcement: post_message and update_message only accept Block Kit blocks
- Compact formatting: Optional 60-90% size reduction for API responses
- Smart caching: 5min TTL cache for users/channels with LRU eviction
Environment Variables
# Required
SLACK_BOT_TOKEN=xoxb-your-bot-tokenCopy .env.example to .env and fill in your credentials.
Installation
# Clone repository
git clone https://github.com/yourusername/slack-api-mcp.git
cd slack-api-mcp
# Install dependencies
pnpm install
# Build server
pnpm buildDevelopment
# Install dependencies
pnpm install
# Build server
pnpm build
# Start server (STDIO transport)
pnpm start:stdioUsage
Add to .mcp.json:
{
"mcpServers": {
"slack-api": {
"command": "node",
"args": ["/absolute/path/to/slack-api-mcp/dist/stdio.js"],
"env": {
"SLACK_BOT_TOKEN": "${SLACK_BOT_TOKEN}"
}
}
}
}Or use .mcp.json in your project root:
{
"mcpServers": {
"slack-api": {
"command": "node",
"args": ["./dist/stdio.js"],
"env": {
"SLACK_BOT_TOKEN": "${SLACK_BOT_TOKEN}"
}
}
}
}Architecture
Built with xmcp framework:
- Tools auto-discovered from
src/tools/directory - Shared utilities in
src/lib/: caching, formatting, Slack client singleton - STDIO transport for Claude Code integration
License
MIT
