@rui.branco/sentry-mcp 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +47 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -167,7 +167,7 @@ function cleanIssueData(issue) {
167
167
  }
168
168
 
169
169
  function cleanEventData(event) {
170
- const skip = new Set(["_meta", "groupID", "eventID", "sdk", "dist", "fingerprints"]);
170
+ const skip = new Set(["_meta", "groupID", "dist", "fingerprints"]);
171
171
  const cleaned = {};
172
172
  for (const [k, v] of Object.entries(event)) {
173
173
  if (!skip.has(k) && v != null && v !== "") cleaned[k] = v;
@@ -609,6 +609,26 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
609
609
  required: ["version"],
610
610
  },
611
611
  },
612
+ {
613
+ name: "sentry_list_events",
614
+ description:
615
+ "List events for a Sentry issue. Returns event IDs, timestamps, user info, and message/title for each occurrence.",
616
+ inputSchema: {
617
+ type: "object",
618
+ properties: {
619
+ issueId: {
620
+ type: "string",
621
+ description: "Sentry issue ID (numeric).",
622
+ },
623
+ instance: {
624
+ type: "string",
625
+ description:
626
+ "Instance name (for multi-instance setups). Uses default instance if omitted.",
627
+ },
628
+ },
629
+ required: ["issueId"],
630
+ },
631
+ },
612
632
  {
613
633
  name: "sentry_list_instances",
614
634
  description:
@@ -1013,6 +1033,32 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1013
1033
  content: [{ type: "text", text: lines.join("\n") }],
1014
1034
  };
1015
1035
 
1036
+ } else if (name === "sentry_list_events") {
1037
+ const inst = getInstanceByName(args.instance);
1038
+ if (!inst) throw new Error("No Sentry instance configured. Run: sentry-mcp setup");
1039
+ const data = await fetchSentry(
1040
+ `/api/0/organizations/${encodeURIComponent(inst.orgSlug)}/issues/${encodeURIComponent(args.issueId)}/events/`,
1041
+ inst,
1042
+ );
1043
+ if (!data || !data.length) {
1044
+ return {
1045
+ content: [{ type: "text", text: `No events found for issue ${args.issueId}.` }],
1046
+ };
1047
+ }
1048
+ const lines = data.map((e) => {
1049
+ const user = e.user ? `${e.user.username || e.user.email || e.user.id || "unknown"}` : "N/A";
1050
+ const title = e.title || e.message || "";
1051
+ return `- **${e.eventID || e.id}** | ${e.dateCreated || "N/A"} | User: ${user} | ${title}`;
1052
+ });
1053
+ return {
1054
+ content: [
1055
+ {
1056
+ type: "text",
1057
+ text: `Found ${data.length} event(s) for issue ${args.issueId}:\n\n${lines.join("\n")}`,
1058
+ },
1059
+ ],
1060
+ };
1061
+
1016
1062
  } else if (name === "sentry_list_instances") {
1017
1063
  if (!instances.length) {
1018
1064
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rui.branco/sentry-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Sentry MCP server for any MCP-compatible AI client (Claude Code, Codex, Antigravity, Cursor, etc.) - fetch issues, search errors, resolve/ignore issues, get stack traces and breadcrumbs",
5
5
  "main": "index.js",
6
6
  "bin": {