slack
Spring AI를 활용한 Slack MCP 서버입니다.
claude mcp add --transport stdio kjyy08-slack-mcp-server java -Dfile.encoding=UTF-8 -jar JAR_PATH \ --env SLACK_BOT_TOKEN="xoxb-your-bot-token" \ --env SLACK_CHANNEL_ID="your-channel-id"
How to use
This MCP server provides Slack integration tools built with Spring AI to interact with Slack channels. It supports sending messages to channels (with partial Markdown), querying channel history with paging support, uploading files either from a absolute path or via Base64 data, and scheduling messages to be sent at a future time. You can access these tools through the MCP server exposed by the Slack MCP module and configure authentication using a Slack bot token and target channel ID. Typical workflows include sending alerts or notifications, retrieving recent messages for audits, uploading resources or logs, and scheduling time-specific messages for reminders or status updates.
How to install
Prerequisites:
- Java 11+ and a JDK compatible with the project
- Gradle or the project’s build setup
- Access to Slack workspace with a Bot Token (xoxb- token) and a target channel
- Build the project
./gradlew build
- Locate the built JAR
- After a successful build, find the jar under build/libs (e.g., slack-mcp-server.jar).
- Run the MCP server Option A: Run directly with the JAR and environment variables (example)
export SLACK_BOT_TOKEN=xoxb-your-bot-token
export SLACK_CHANNEL_ID=your-channel-id
java -Dfile.encoding=UTF-8 -jar path/to/slack-mcp-server.jar
Option B: If using Claude Desktop (as shown in the README)
- Create a claude_desktop_config.json with the following content:
{
"mcpServers": {
"slack-mcp": {
"command": "java",
"args": [
"-Dfile.encoding=UTF-8",
"-jar",
"path/to/slack-mcp-server.jar"
],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token",
"SLACK_CHANNEL_ID": "your-channel-id"
}
}
}
}
- Replace the jar path and environment values accordingly, then launch via Claude Desktop.
Additional notes
Notes and tips:
- Ensure the Slack bot token has the necessary scopes (e.g., chat:write, channels:history, files:write) for the requested operations.
- For file uploads, absolute file paths are recommended to avoid path resolution issues; base64 uploads may consume more API tokens for large files.
- Slack API rate limits apply; implement paging when retrieving history to avoid hitting limits.
- When scheduling messages, specify the correct timezone and timestamp to ensure timely delivery.
- If you encounter jar signing or encoding issues, confirm Java version compatibility and rebuild with the appropriate JDK.
- Keep SLACK_CHANNEL_ID and SLACK_BOT_TOKEN secure; do not commit them to version control.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
spring-ai
From Java Dev to AI Engineer: Spring AI Fast Track
mcp-zap
A Spring Boot application exposing OWASP ZAP as an MCP (Model Context Protocol) server. It lets any MCP‑compatible AI agent (e.g., Claude Desktop, Cursor) orchestrate ZAP actions—spider, active scan, import OpenAPI specs, and generate reports.
mcp -with-spring-ai
Build your own mcp server with spring ai
javaConf
🔌 MCP Server providing Java Conference data (CFP, dates, and more) using Spring Boot/AI by parsing GitHub Markdown.
spring-demo -sse
A Spring Boot demo project for implementing Server-Sent Events (SSE) with an MCP (Message Control Protocol) server. Explore real-time data streaming and event-driven architecture in Java using this hands-on example.