0.0.5 • Published 7 months ago
@microagents/server-slack v0.0.5
Slack MCP Server
An MCP server implementation that enables Claude to interact with Slack workspaces through the Slack API.
Installation
npm install @microagents/server-slack
# or
yarn add @microagents/server-slack
Usage
Direct Execution
# Set your API tokens and run
SLACK_BOT_TOKEN=xoxb-your-token SLACK_TEAM_ID=T0123456 npx @microagents/server-slack
With Claude Desktop
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"slack": {
"command": "npx",
"args": ["@microagents/server-slack"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_TEAM_ID": "T0123456"
}
}
}
}
Setup
Create a Slack App:
- Go to Slack API: Applications
- Click "Create New App" and choose "From scratch"
- Name your app and select your workspace
Add Bot Scopes:
- Navigate to "OAuth & Permissions"
- Under "Scopes", add these Bot Token Scopes:
channels:history
channels:read
chat:write
reactions:write
users:read
Install the App:
- Click "Install to Workspace"
- Authorize the requested permissions
Get Credentials:
- Copy the "Bot User OAuth Token" (starts with
xoxb-
) - Get your Team ID from your Slack URL or workspace settings
- Copy the "Bot User OAuth Token" (starts with
Features
- Channel Management: List channels and retrieve channel history
- Messaging: Send messages to channels and threads
- Reactions: Add emoji reactions to messages
- User Information: Get user details and profiles
Tools
listChannels
List all channels in the workspace.
Inputs:
types
(string, optional): Types of channels to include (public, private, mpim, im)excludeArchived
(boolean, optional): Whether to exclude archived channels
getChannelHistory
Get message history from a channel.
Inputs:
channelId
(string): ID of the channellimit
(number, optional): Number of messages to retrieveoldest
(string, optional): Start of time range (timestamp)latest
(string, optional): End of time range (timestamp)
postMessage
Send a message to a channel or thread.
Inputs:
channelId
(string): ID of the channeltext
(string): Message textthreadTs
(string, optional): Thread timestamp to reply to
addReaction
Add an emoji reaction to a message.
Inputs:
channelId
(string): ID of the channeltimestamp
(string): Timestamp of the messagename
(string): Name of the emoji
getUserInfo
Get information about a user.
Inputs:
userId
(string): ID of the user
License
MIT
Credits
Based on the original MCP server by the Model Context Protocol team.