Sentry MCP Server + Slack MCP Server

Beginner20 minutes
Use Cases

Common Use Cases

  • New error alerts
  • Error spike detection
  • Release regression alerts
  • Error assignment notifications
Before You Begin

Prerequisites

  • Sentry project with DSN configured
  • Slack workspace
  • Application with Sentry SDK installed
Walkthrough

Step-by-Step Guide

1

Connect Sentry MCP Server

Configure with your Sentry auth token and organization slug.

2

Configure Slack MCP Server

Set up with a bot token that has permissions to post to your alerting channels.

3

Define Alert Rules

Set up rules for when to alert: new issues, regression, error spikes.

async function checkErrors() {
  const issues = await sentry.listIssues({ query: "is:unresolved firstSeen:-1h" });
  for (const issue of issues) {
    if (issue.count > 10) {
      await slack.sendMessage({
        channel: "#errors",
        text: `🔴 *${issue.title}*\nOccurrences: ${issue.count} | Users affected: ${issue.userCount}\n<${issue.permalink}|View in Sentry>`
      });
    }
  }
}
4

Add Context

Include stack traces, affected users, and recent deployments in the Slack message for faster debugging.

5

Set Up Deduplication

Track alerted issues to avoid sending duplicate notifications for the same error.

Examples

Code Examples

typescript
Rich Error Alert
async function formatErrorAlert(issue) {
  const latestEvent = await sentry.getLatestEvent({ issueId: issue.id });
  return [
    `🔴 *${issue.title}*`,
    `File: \`${latestEvent.culprit}\``,
    `Count: ${issue.count} | Users: ${issue.userCount}`,
    `First seen: ${issue.firstSeen}`,
    `<${issue.permalink}|View in Sentry>`
  ].join("\n");
}
Help

Troubleshooting

How do I reduce alert noise?+
Can I route errors to different channels?+

Quick Info

DifficultyBeginner
Time Estimate20 minutes
Tools
Sentry MCP ServerSlack MCP Server

Need Integration Help?

Our team can implement this integration for you.

Get in Touch