Slack Message Skill
Send messages to Slack channels using incoming webhooks.
Prerequisites
You need a Slack Incoming Webhook URL. To get one:
- Go to your Slack workspace's App Directory
- Search for "Incoming Webhooks" and add it
- Choose a channel and copy the webhook URL
- Either set
SLACK_WEBHOOK_URLenvironment variable or pass it as a parameter
Available Scripts
post.py- Post a message to Slack
How to Use
Basic Usage
execute_skill_script("slack-message", "post.py", {
"message": "Hello from Skills MCP!"
})
With Webhook URL
execute_skill_script("slack-message", "post.py", {
"webhook_url": "https://hooks.slack.com/services/...",
"message": "Deployment completed successfully! ✅"
})
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
message |
string | Yes | The message text to post |
webhook_url |
string | No | Slack webhook URL (or set SLACK_WEBHOOK_URL env var) |
channel |
string | No | Override the default channel |
username |
string | No | Override the bot username |
Example Response
Success:
{
"status": "success",
"message": "Message posted to Slack successfully",
"timestamp": "2024-12-30T12:00:00"
}
Error (no webhook):
{
"status": "error",
"message": "No webhook_url provided and SLACK_WEBHOOK_URL not set"
}
Security Notes
- Never commit webhook URLs to version control
- Use environment variables for sensitive credentials
- Webhook URLs should be treated as secrets