-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathslack.yaml
More file actions
183 lines (167 loc) · 8.24 KB
/
slack.yaml
File metadata and controls
183 lines (167 loc) · 8.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Slack
shortDescription: Send messages, manage channels, search history, and handle threads in Slack workspaces
description: |




A Model Context Protocol (MCP) server for Slack integration, providing comprehensive workspace management capabilities through a modern API interface.
## Features
- **Channel Management**: List, search, and interact with Slack channels
- **Message Operations**: Send messages, search history, and manage threads
- **User Management**: List, search, and send direct messages to users
- **Advanced Search**: Powerful query-based message and channel filtering
- **Thread Support**: Full thread management for both channels and DMs
- **Markdown Support**: Automatic conversion of markdown to Slack format
- **Typing Indicators**: Send typing events to channels and threads
## What you'll need to connect
**Slack Bot Token**: You'll need to create a Slack app and get a bot token
### How to create a Slack app and get your bot token:
1. **Go to Slack API Console**
- Visit [api.slack.com/apps](https://api.slack.com/apps)
- Click "Create New App"
- Choose "From scratch"
- Enter your app name and select your workspace
2. **Configure Bot Token Scopes**
- Go to "OAuth & Permissions" in the left sidebar
- Under "Scopes" > "Bot Token Scopes", add these permissions:
- `channels:history` - Read channel messages
- `channels:read` - View basic channel info
- `channels:write.invite` - Invite users to public channels
- `chat:write` - Send messages
- `groups:history` - Read private channel messages
- `groups:read` - View private channels
- `groups:write.invites` - Invite users to private channels
- `im:history` - Read direct messages
- `im:read` - View direct messages
- `im:write` - Send direct messages
- `mpim:history` - Read group DMs
- `mpim:read` - View group DMs
- `mpim:write` - Send group DMs
- `users:read` - View users in workspace
- `assistant:write` - Send typing indicators
Note: You can configure the app to use the User Oauth token instead of the Bot token. The MCP server will use your user token to act as the user in your slack workspace. When doing this, you need to add User token Scopes to the app instead.
If you are using the User Oauth token, you can add `search:read` to the User token Scopes to add ability to search messages in your workspace.
3. **Install the App**
- Go to "Install App" in the left sidebar
- Click "Install to Workspace" to install this app into the workspace where you created this app
- Authorize the app
4. **Get Your Bot Token**
- After installation, go back to "OAuth & Permissions"
- Copy the "Bot User OAuth Token" (starts with `xoxb-`)
- This is your `SLACK_BOT_TOKEN`
5. **Environment Variable**
- Set `SLACK_BOT_TOKEN` to your bot token value
Note: You can also use the User Oauth token instead of the Bot token. The MCP server will use your user token to act as the user in your slack workspace.
Note: If you are using the bot token, make sure the Bot is added to the slack channel if you want to send or get messages from the channel.
metadata:
categories: Communication
allow-multiple: "true"
icon: https://img.icons8.com/?size=100&id=4n94I13nDTyw&format=png&color=000000
repoURL: https://github.com/obot-platform/slack-mcp
runtime: containerized
containerizedConfig:
image: ghcr.io/obot-platform/slack-mcp:latest
port: 3000
path: "/mcp"
env:
- key: SLACK_BOT_TOKEN
name: Slack Bot Token
required: true
sensitive: true
description: Your Slack Bot Token for your slack APP that is installed in the workspace
toolPreview:
- name: add_user_to_channel
description: Add a user to a channel in the Slack workspace.
params:
channelId: The ID of the channel to add the user to
userId: The ID of the user to add to the channel
- name: list_channels
description: List all channels in the Slack workspace. Returns the name and ID for each channel.
params: {}
- name: search_channels
description: Search for channels in the Slack workspace.
params:
query: The search query for channels
- name: get_channel_history
description: Get the chat history for a channel in the Slack workspace.
params:
channelId: The ID of the channel to get the history for
limit: "The number of messages to return (default: 10)"
- name: get_channel_history_by_time
description: Get the chat history for a channel in the Slack workspace within a specific time range.
params:
channelId: The ID of the channel to get the history for
limit: "The maximum number of messages to return (default: 10)"
start: The start time in RFC 3339 format
end: The end time in RFC 3339 format
- name: get_thread_history
description: Get the chat history for a particular thread.
params:
channelId: The ID of the channel containing the thread
threadId: The ID of the thread to get the history for
limit: "The number of messages to return (default: 10)"
- name: get_thread_history_from_link
description: Get the chat history for a particular thread from a Slack message link.
params:
messageLink: The link to the first Slack message in the thread
limit: "The number of messages to return (default: 10)"
- name: search_messages
description: Search for messages in the Slack workspace.
params:
query: The search query
sortByTime: "Sort by timestamp rather than score (default: false)"
- name: send_message
description: Send a message to a channel in the Slack workspace.
params:
channelId: The ID of the channel to send the message to
text: The text to send (supports markdown)
- name: send_message_in_thread
description: Send a message in a thread in the Slack workspace.
params:
channelId: The ID of the channel containing the thread
threadId: The ID of the thread to send the message to
text: The text to send (supports markdown)
- name: list_users
description: List all users in the Slack workspace.
params: {}
- name: search_users
description: Search for users in the Slack workspace.
params:
query: The search query for users
- name: send_dm
description: Send a direct message to a user.
params:
userIds: Comma-separated list of user IDs to send the message to
text: The text to send (supports markdown)
- name: send_dm_in_thread
description: Send a message in a thread in a direct message conversation.
params:
userIds: Comma-separated list of user IDs for the conversation
threadId: The ID of the thread to send the message to
text: The text to send (supports markdown)
- name: get_message_link
description: Get the permalink for a message.
params:
channelId: The ID of the channel containing the message
messageId: The ID of the message
- name: get_dm_history
description: Get the chat history for a direct message conversation.
params:
userIds: Comma-separated list of user IDs for the conversation
limit: "The number of messages to return (default: 10)"
- name: get_dm_thread_history
description: Get the chat history for a thread in a direct message conversation.
params:
userIds: Comma-separated list of user IDs for the conversation
threadId: The ID of the thread to get the history for
limit: "The number of messages to return (default: 10)"
- name: user_context
description: Get information about the logged in user.
params: {}
- name: send_typing_event
description: Send a typing event to a channel in the Slack workspace.
params:
channelId: The ID of the channel to send the typing event to
threadId: The ID of the thread to send the typing event to (optional)
status: The status to set the typing event that shows in the slack thread