Use Cases
Common Use Cases
- Notify team when PRs are opened or merged
- Post deployment status updates to channels
- Alert on critical CI/CD failures
- Weekly repository activity digests
Before You Begin
Prerequisites
- GitHub personal access token
- Slack Bot token with channel permissions
- Node.js 18+ installed
Walkthrough
Step-by-Step Guide
1
Install MCP Servers
Install both the GitHub and Slack MCP server packages.
npm install @modelcontextprotocol/server-github @modelcontextprotocol/server-slack2
Configure Authentication
Set up environment variables for both services.
GITHUB_TOKEN=ghp_your_token
SLACK_BOT_TOKEN=xoxb-your-token3
Create the Integration Agent
Build an agent that monitors GitHub events and posts to Slack.
4
Test the Integration
Create a test PR and verify Slack notification arrives.
Examples
Code Examples
javascript
PR Notification Agent
async function notifyPR(event) {
const pr = await github.tool("get_pull_request", {
repo: event.repo, pr: event.number
});
await slack.tool("send_message", {
channel: "#engineering",
text: `New PR: ${pr.title} by ${pr.author}\n${pr.url}`
});
}Help
Troubleshooting
Slack messages not appearing?+
GitHub webhook not triggering?+
Quick Info
DifficultyBeginner
Time Estimate2-3 hours
Tools
GitHubSlack