Slack MCP Server
Enables complete Slack integration through natural language in Cursor IDE, supporting message sending, channel management, direct messaging, user lookup, reactions, and message search using the Slack API.
README
π Slack MCP Server
FastMCPλ₯Ό μ¬μ©ν μμ ν Slack ν΅ν© MCP μλ²μ λλ€. Cursor IDEμμ Slack APIμ λͺ¨λ κΈ°λ₯μ μμ°μ΄λ‘ μ¬μ©ν μ μκ² ν΄μ€λλ€.
π λͺ©μ°¨
- νΉμ§
- μꡬμ¬ν
- λΉ λ₯Έ μ€μΉ
- μλ μ€μΉ
- μ¬μ©λ²
- μ¬μ© κ°λ₯ν λꡬ
- νλ‘μ νΈ κ΅¬μ‘°
- κ°λ°μ κ°μ΄λ
- λ¬Έμ ν΄κ²°
- λΌμ΄μ μ€
β¨ νΉμ§
νμ κΈ°λ₯ (κ³Όμ μꡬμ¬ν)
- β λ©μμ§ μ μ‘: μ±λμ λ©μμ§ μ μ‘
- β μ±λ λͺ©λ‘ μ‘°ν: μ κ·Ό κ°λ₯ν λͺ¨λ μ±λ μ‘°ν
- β μ±λ νμ€ν 리 μ‘°ν: μ§μ λ μ±λμ λ©μμ§ νμ€ν 리
- β λ€μ΄λ νΈ λ©μμ§: 1:1 λ©μμ§ μ μ‘
μΆκ° κΈ°λ₯
- β μ¬μ©μ λͺ©λ‘ μ‘°ν: μν¬μ€νμ΄μ€ μ¬μ©μ μ 보
- β λ°μ μΆκ°: λ©μμ§μ μ΄λͺ¨μ§ λ°μ μΆκ°
- β λ©μμ§ κ²μ: ν€μλ κΈ°λ° λ©μμ§ κ²μ
- β μ°κ²° ν μ€νΈ: API μ°κ²° μν νμΈ
κΈ°μ μ νΉμ§
- π FastMCP κΈ°λ°: μ΅μ MCP νλ μμν¬ μ¬μ©
- β‘ λΉλκΈ° μ²λ¦¬: aiohttpλ₯Ό μ΄μ©ν κ³ μ±λ₯ API νΈμΆ
- π‘οΈ μμ ν μλ¬ μ²λ¦¬: μμΈν μ€λ₯ λ©μμ§μ 볡ꡬ κ°λ₯ν μμΈ μ²λ¦¬
- π νμ ννΈ: μμ ν νμ μμ μ±
- π§ͺ ν¬κ΄μ ν μ€νΈ: μλνλ ν μ€νΈ μ€μνΈ
- π λ‘κΉ : ꡬ쑰νλ λ‘κΉ μμ€ν
- π§ μλ μ€μΉ: μν΄λ¦ μ€μΉ μ€ν¬λ¦½νΈ
π μꡬμ¬ν
- Python 3.8+
- pip (ν¨ν€μ§ κ΄λ¦¬μ)
- Cursor IDE (MCP ν΄λΌμ΄μΈνΈ)
- Slack Bot Token (xoxb-λ‘ μμ)
Slack Bot κΆν
Slack μ±μ λ€μ κΆνμ΄ νμν©λλ€:
Bot Token Scopes:
- channels:history # μ±λ λ©μμ§ μ½κΈ°
- channels:read # μ±λ μ 보 μ‘°ν
- chat:write # λ©μμ§ μ μ‘
- groups:history # λΉκ³΅κ° κ·Έλ£Ή λ©μμ§ μ½κΈ°
- groups:read # λΉκ³΅κ° κ·Έλ£Ή μ 보 μ‘°ν
- im:history # DM λ©μμ§ μ½κΈ°
- im:read # DM μ 보 μ‘°ν
- im:write # DM μ μ‘
- mpim:history # λ©ν°νν° DM λ©μμ§ μ½κΈ°
- mpim:read # λ©ν°νν° DM μ 보 μ‘°ν
- mpim:write # λ©ν°νν° DM μ μ‘
- reactions:write # λ°μ μΆκ°
- search:read # λ©μμ§ κ²μ
- users:read # μ¬μ©μ μ 보 μ‘°ν
π λΉ λ₯Έ μ€μΉ
1. μλ μ€μΉ (κΆμ₯)
cd slack-mcp
python install.py
μ€μΉ μ€ν¬λ¦½νΈκ° λ€μμ μλμΌλ‘ μ²λ¦¬ν©λλ€:
- ν¨ν€μ§ μ€μΉ
- νκ²½ λ³μ μ€μ
- Cursor MCP μ€μ μ λ°μ΄νΈ
- μ€μΉ ν μ€νΈ μ€ν
2. Cursor μ¬μμ
μ€μΉ μλ£ ν Cursorλ₯Ό μ¬μμνλ©΄ Slack MCP λꡬλ₯Ό μ¬μ©ν μ μμ΅λλ€.
π§ μλ μ€μΉ
1. μ μ₯μ ν΄λ‘
git clone <repository-url>
cd slack-mcp
2. ν¨ν€μ§ μ€μΉ
pip install -r requirements.txt
3. νκ²½ λ³μ μ€μ
.env νμΌ μμ±:
# Slack Bot Token (xoxb-λ‘ μμνλ ν ν°)
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
# μ νμ : λ‘κ·Έ λ 벨 μ€μ
LOG_LEVEL=INFO
4. Cursor MCP μ€μ
~/.cursor/mcp.json νμΌμ λ€μ μΆκ°:
{
"mcpServers": {
"slack": {
"command": "python",
"args": ["/path/to/slack-mcp/slack_mcp_server.py"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-bot-token-here"
}
}
}
}
5. ν μ€νΈ μ€ν
python test_slack_mcp.py
π μ¬μ©λ²
Cursorμμ μ μ±ν μ μμνκ³ λ€μκ³Ό κ°μ΄ μμ°μ΄λ‘ Slack κΈ°λ₯μ μ¬μ©ν μ μμ΅λλ€:
λ©μμ§ μ μ‘
#general μ±λμ "μλ
νμΈμ!"λΌλ λ©μμ§λ₯Ό 보λ΄μ£ΌμΈμ
μ±λ μ 보 μ‘°ν
μ¬μ© κ°λ₯ν Slack μ±λ λͺ©λ‘μ 보μ¬μ£ΌμΈμ
λ©μμ§ νμ€ν 리
#general μ±λμ μ΅κ·Ό λ©μμ§ 10κ°λ₯Ό κ°μ Έμμ£ΌμΈμ
λ€μ΄λ νΈ λ©μμ§
μ¬μ©μ U1234567890μκ² "νμ μ€λΉ μλ£"λΌλ DMμ 보λ΄μ£ΌμΈμ
λ©μμ§ κ²μ
"νλ‘μ νΈ"λΌλ ν€μλκ° ν¬ν¨λ λ©μμ§λ₯Ό κ²μν΄μ£ΌμΈμ
π οΈ μ¬μ© κ°λ₯ν λꡬ
| λꡬ | μ€λͺ | νλΌλ―Έν° |
|---|---|---|
send_slack_message |
μ±λμ λ©μμ§ μ μ‘ | channel, text |
get_slack_channels |
μ±λ λͺ©λ‘ μ‘°ν | μμ |
get_slack_channel_history |
μ±λ νμ€ν 리 μ‘°ν | channel_id, limit |
send_slack_direct_message |
λ€μ΄λ νΈ λ©μμ§ μ μ‘ | user_id, text |
get_slack_users |
μ¬μ©μ λͺ©λ‘ μ‘°ν | μμ |
add_slack_reaction |
λ©μμ§μ λ°μ μΆκ° | channel, timestamp, name |
search_slack_messages |
λ©μμ§ κ²μ | query, count |
test_slack_connection |
μ°κ²° ν μ€νΈ | μμ |
π νλ‘μ νΈ κ΅¬μ‘°
slack-mcp/
βββ π README.md # μ΄ νμΌ
βββ π requirements.txt # Python ν¨ν€μ§ μμ‘΄μ±
βββ π slack_api.py # Slack API ν΄λΌμ΄μΈνΈ
βββ π slack_mcp_server.py # FastMCP μλ² κ΅¬ν
βββ π test_slack_mcp.py # ν
μ€νΈ μ€ν¬λ¦½νΈ
βββ π install.py # μλ μ€μΉ μ€ν¬λ¦½νΈ
βββ π mcp_config.json # MCP μ€μ ν
νλ¦Ώ
βββ π env_example.txt # νκ²½ λ³μ ν
νλ¦Ώ
βββ π .gitignore # Git 무μ νμΌ
π¨βπ» κ°λ°μ κ°μ΄λ
κ°λ° νκ²½ μ€μ
# κ°λ° λͺ¨λλ‘ ν¨ν€μ§ μ€μΉ
pip install -r requirements.txt
# νκ²½ λ³μ μ€μ
cp env_example.txt .env
# .env νμΌμ νΈμ§νμ¬ μ€μ ν ν° μ
λ ₯
# ν
μ€νΈ μ€ν
python test_slack_mcp.py
μλ‘μ΄ λꡬ μΆκ°
slack_api.pyμ API λ©μλ μΆκ°slack_mcp_server.pyμ MCP λꡬ λ°μ½λ μ΄ν° μΆκ°test_slack_mcp.pyμ ν μ€νΈ μΌμ΄μ€ μΆκ°
λ‘κΉ
μλ²λ λ€μ μμΉμ λ‘κ·Έλ₯Ό κΈ°λ‘ν©λλ€:
- μ½μ μΆλ ₯: μ€μκ° λ‘κ·Έ νμΈ
- νμΌ λ‘κ·Έ:
slack_mcp.log
λλ²κΉ
# μμΈ λ‘κ·Έμ ν¨κ» ν
μ€νΈ μ€ν
LOG_LEVEL=DEBUG python test_slack_mcp.py
# μλ² μ§μ μ€ν (λλ²κΉ
μ©)
python slack_mcp_server.py
π λ¬Έμ ν΄κ²°
μμ£Ό λ°μνλ λ¬Έμ
1. "SLACK_BOT_TOKEN νκ²½ λ³μκ° μ€μ λμ§ μμμ΅λλ€"
ν΄κ²°μ± :
.envνμΌμ μ¬λ°λ₯Έ ν ν°μ΄ μλμ§ νμΈ- ν ν°μ΄
xoxb-λ‘ μμνλμ§ νμΈ
2. "invalid_auth" μλ¬
ν΄κ²°μ± :
- Slack Bot Tokenμ΄ μ ν¨νμ§ νμΈ
- ν ν°μ΄ μ¬λ°λ₯Έ μν¬μ€νμ΄μ€μ©μΈμ§ νμΈ
- νμν κΆνμ΄ λͺ¨λ λΆμ¬λμλμ§ νμΈ
3. "channel_not_found" μλ¬
ν΄κ²°μ± :
- μ±λ IDκ° μ¬λ°λ₯Έμ§ νμΈ
- λ΄μ΄ ν΄λΉ μ±λμ μΆκ°λμλμ§ νμΈ
- κ³΅κ° μ±λμΈμ§ λλ λ΄μ΄ μ΄λλμλμ§ νμΈ
4. Cursorμμ MCP λκ΅¬κ° λ³΄μ΄μ§ μμ
ν΄κ²°μ± :
- Cursorλ₯Ό μμ ν μ¬μμ
~/.cursor/mcp.jsonμ€μ νμΌ νμΈ- νμΌ κ²½λ‘κ° μ¬λ°λ₯Έμ§ νμΈ
λ‘κ·Έ νμΈ
# μλ² λ‘κ·Έ νμΈ
tail -f slack_mcp.log
# ν
μ€νΈ λ‘κ·Έμ ν¨κ» μ€ν
python test_slack_mcp.py 2>&1 | tee debug.log
μλ μ°κ²° ν μ€νΈ
# Pythonμμ μ§μ ν
μ€νΈ
python -c "
import asyncio
from slack_api import get_slack_client
import os
from dotenv import load_dotenv
load_dotenv()
token = os.getenv('SLACK_BOT_TOKEN')
client = get_slack_client(token)
async def test():
result = await client.test_connection()
print(result)
asyncio.run(test())
"
π κ³Όμ μꡬμ¬ν λλΉ νν©
| μꡬμ¬ν | μν | ꡬν μμΉ |
|---|---|---|
| νμ κΈ°λ₯ | ||
| λ©μμ§ μ μ‘ | β μλ£ | send_slack_message |
| μ±λ λͺ©λ‘ μ‘°ν | β μλ£ | get_slack_channels |
| μ±λ νμ€ν 리 μ‘°ν | β μλ£ | get_slack_channel_history |
| λ€μ΄λ νΈ λ©μμ§ | β μλ£ | send_slack_direct_message |
| μ ν κΈ°λ₯ | ||
| μ¬μ©μ λͺ©λ‘ μ‘°ν | β μλ£ | get_slack_users |
| λ°μ μΆκ° | β μλ£ | add_slack_reaction |
| λ©μμ§ κ²μ | β μλ£ | search_slack_messages |
| κΈ°μ μꡬμ¬ν | ||
| FastMCP μ¬μ© | β μλ£ | slack_mcp_server.py |
| μλ¬ μ²λ¦¬ | β μλ£ | λͺ¨λ λꡬμ try-catch |
| νμ ννΈ | β μλ£ | λͺ¨λ ν¨μμ νμ ννΈ |
| λ‘κΉ | β μλ£ | ꡬ쑰νλ λ‘κΉ μμ€ν |
| ν μ€νΈ | β μλ£ | test_slack_mcp.py |
| λ¬Έμν | β μλ£ | μ΄ README λ° μ½λ μ£Όμ |
π μΆκ° ꡬν μ¬ν
κ³Όμ μꡬμ¬νμ λμ΄μ λ€μ κΈ°λ₯λ€μ μΆκ°λ‘ ꡬννμ΅λλ€:
- π μλ μ€μΉ μμ€ν : μν΄λ¦ μ€μΉ μ€ν¬λ¦½νΈ
- π§ͺ ν¬κ΄μ ν μ€νΈ: λͺ¨λ κΈ°λ₯μ λν μλνλ ν μ€νΈ
- π μμΈν μλ΅ ν¬λ§·ν : ꡬ쑰νλ μ±κ³΅/μ€ν¨ μλ΅
- β‘ λΉλκΈ° HTTP ν΄λΌμ΄μΈνΈ: κ³ μ±λ₯ aiohttp μ¬μ©
- π‘οΈ μΈμ κ΄λ¦¬: HTTP μΈμ μ¬μ¬μ©μΌλ‘ μ±λ₯ μ΅μ ν
- π§ κ°λ°μ λꡬ: λλ²κΉ λ° λ¬Έμ ν΄κ²° λꡬ
- π μμ ν νλ‘μ νΈ κ΅¬μ‘°: μμ° μ€λΉ μλ£λ μ½λ ꡬ쑰
π λΌμ΄μ μ€
MIT License - μμΈν λ΄μ©μ LICENSE νμΌμ μ°Έμ‘°νμΈμ.
π μμνκΈ°
# 1. νλ‘μ νΈ ν΄λ‘
git clone <repository-url>
cd slack-mcp
# 2. μλ μ€μΉ μ€ν
python install.py
# 3. Cursor μ¬μμ
# μ΄μ Cursorμμ Slack MCP λꡬλ₯Ό μ¬μ©ν μ μμ΅λλ€!
λ¬Έμ κ° μμΌμλ©΄ Issuesμ λ³΄κ³ ν΄μ£ΌμΈμ.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.