slack-mcp-user
v1.0.0
Published
Slack MCP server using User OAuth Token — post and read messages as yourself
Maintainers
Readme
Slack MCP Server
Slack MCP server that uses User OAuth Token (xoxp-) to send and read messages as yourself.
Depends only on @modelcontextprotocol/sdk — no third-party Slack libraries.
Features
- Channel name resolution: No need to look up IDs — just use
#generalordev_team - User name resolution:
<@U123>in messages is automatically resolved to display names - Thread auto-expansion: Replies are fetched in parallel and displayed inline
- Message links: Each message includes a direct Slack URL
- @mention resolution:
@usernamein posts is automatically converted to<@ID> - Token persistence: OAuth token is stored in
~/.config/slack-mcp/token.json— authenticate once, use forever
Quick Start (npx)
No git clone needed. Just configure your MCP client:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "slack-mcp-user"],
"env": {
"SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
"SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}On first launch, a browser window opens for Slack OAuth. After granting access, the token is persisted and subsequent launches require no interaction.
Alternative: Pass token directly
If you already have a User Token (e.g., for non-interactive environments):
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "slack-mcp-user"],
"env": {
"SLACK_USER_TOKEN": "xoxp-your-token-here"
}
}
}
}Token Resolution Order
SLACK_USER_TOKENenvironment variable (explicit, highest priority)~/.config/slack-mcp/token.json(persisted from OAuth).envfile in the project directory (local development fallback)- None found → OAuth flow is triggered (requires
SLACK_CLIENT_IDandSLACK_CLIENT_SECRET)
Slack App Setup
- Go to https://api.slack.com/apps and click "Create New App"
- Select "From an app manifest"
- Choose your workspace
- Paste the following manifest:
{
"display_information": {
"name": "slack-mcp"
},
"oauth_config": {
"redirect_urls": [
"http://localhost:3000/callback"
],
"scopes": {
"user": [
"bookmarks:read",
"channels:history",
"channels:read",
"channels:write",
"chat:write",
"dnd:read",
"emoji:read",
"files:read",
"files:write",
"groups:history",
"groups:read",
"groups:write",
"identify",
"im:history",
"im:read",
"im:write",
"links:read",
"lists:read",
"lists:write",
"mpim:history",
"mpim:read",
"mpim:write",
"pins:read",
"pins:write",
"reactions:read",
"reactions:write",
"reminders:read",
"reminders:write",
"search:read",
"stars:read",
"stars:write",
"team:read",
"usergroups:read",
"users:read",
"users:read.email",
"users.profile:read",
"users.profile:write"
]
}
},
"settings": {
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}- After creation, note the Client ID and Client Secret from the Basic Information page
Tools (40+)
Reading
| Tool | Description |
|------|-------------|
| slack_list_channels | List channels (public/private/DM/group DM) |
| slack_get_channel_history | Get channel history (name-based lookup, thread expansion) |
| slack_get_channel_info | Channel details (created, purpose, member count) |
| slack_get_channel_members | Channel members (username, email, title) |
| slack_get_thread | Get thread replies |
| slack_get_pins | Pinned messages (with thread expansion) |
| slack_get_bookmarks | Channel bookmarks |
| slack_get_unread | Unread channel summary |
| slack_search_messages | Search messages (Slack search syntax) |
| slack_list_files | Search files (by channel/user/type) |
| slack_get_reactions | Get reactions on a message |
Writing
| Tool | Description |
|------|-------------|
| slack_post_message | Post message (as yourself, thread replies supported) |
| slack_send_dm | Send DM (username lookup) |
| slack_schedule_message | Schedule a message |
| slack_list_scheduled_messages | List scheduled messages |
| slack_cancel_scheduled_message | Cancel scheduled message |
| slack_update_message | Edit a message |
| slack_delete_message | Delete a message |
| slack_upload_file | Upload a file |
Reactions & Pins
| Tool | Description |
|------|-------------|
| slack_add_reaction | Add reaction |
| slack_remove_reaction | Remove reaction |
| slack_add_pin | Pin a message |
| slack_remove_pin | Unpin a message |
Users & Groups
| Tool | Description |
|------|-------------|
| slack_list_users | All workspace users |
| slack_get_user_info | User profile details |
| slack_find_user | Search users (name/email partial match) |
| slack_get_presence | Online status |
| slack_get_dnd | DND (Do Not Disturb) status |
| slack_list_usergroups | User groups (@team mentions) |
| slack_get_usergroup_members | Group members |
Channel Management
| Tool | Description |
|------|-------------|
| slack_create_channel | Create channel |
| slack_invite_to_channel | Invite to channel |
| slack_set_topic | Update topic |
| slack_archive_channel | Archive channel |
| slack_mark_read | Mark as read |
Status, Reminders & More
| Tool | Description |
|------|-------------|
| slack_set_status | Change your Slack status |
| slack_add_reminder | Set a reminder |
| slack_list_reminders | List reminders |
| slack_list_emoji | Custom emoji list |
| slack_list_saved / slack_remove_saved | Saved items |
| slack_get_lists / slack_create_list / ... | Slack Lists (TODO) |
MCP Client Examples
Kiro
~/.kiro/settings/mcp.json:
"slack": {
"command": "npx",
"args": ["-y", "slack-mcp-user"],
"env": {
"SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
"SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
},
"disabled": false
}Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["-y", "slack-mcp-user"],
"env": {
"SLACK_CLIENT_ID": "YOUR_CLIENT_ID",
"SLACK_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}Troubleshooting
| Symptom | Fix |
|---------|-----|
| token_revoked | Token expired. Re-run OAuth or set SLACK_USER_TOKEN |
| missing_scope | Add required User Token Scopes in api.slack.com, then re-authenticate |
| channel_not_found | Check channel ID. Private channels need groups:read scope |
| not_in_channel | Ensure you're a member of the channel |
| spawn node ENOENT | Use the full path to node (e.g., /opt/homebrew/bin/node) |
Security
- User Token operates with your account's permissions
- Token is stored in
~/.config/slack-mcp/token.jsonwith600permissions (owner-only) - No secrets are hardcoded in the source code
- Client ID/Secret are passed via environment variables
License
MIT
