You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the MCP to quickly generate Tickets and GitHub PRs. However, I can not link them through the MCP, and need to navigate to the Sentry issue and manually link them.
Reacted by David O'Donoghue, Alex, Maxence LEFEBVRE, Lukasz Lempart, Bill Dirks, Simon, Nick Bourque, Christopher-Marcel Esser, Alexandre Bonaventure Geissmann, Andreas Sander and 8 more
Ran into a related pain point: tried to associate user feedback with a Linear issue via MCP, but you can't modify external issues directly — you have to use the integration-platform endpoint (create-or-update-an-external-issue) instead. The current update_issue tool doesn't expose this. Would be great to have this covered as part of the broader linked-issue support.
Implementation Proposal: External Issue Linking via update_issue
Background
The integration platform endpoint for creating/updating external issue links is:
POST /api/0/sentry-app-installations/{uuid}/external-issues/
Body: { issueId: integer, webUrl: string, project: string, identifier: string }
Scope: event:write ← already required by update_issue
The uuid is a Sentry App installation UUID, not something users should see or manage. Resolving it automatically is the core design challenge here.
There's already a read path: getIssueExternalLinks in the API client hits /organizations/{org}/issues/{id}/external-issues/ and its output already shows up in get_issue_details. This proposal is purely the write side.
New Parameters on update_issue
Add four optional params, three of which are required together when linking:
externalIssueUrl: string // Full URL of the external issue (e.g. https://linear.app/team/issue/ENG-123)
externalIssueProject: string // The external system's project/team/key (e.g. "ENG")
externalIssueIdentifier: string // Unique ID in the external system (e.g. "ENG-123")
externalIssueServiceSlug?: string // Optional disambiguation hint (e.g. "linear", "jira") — only needed when URL inference is ambiguous
The three required-together params map directly to the endpoint body fields. externalIssueServiceSlug is NOT the UUID — it's a user-readable app slug used to disambiguate when multiple integrations might match.
Combining with existing params should work fine in a single call (e.g. mark resolved AND link to Linear). The issueId integer required by the endpoint is sourced from issue.id on the already-fetched issue object.
Validation Changes
The current guard — "at least one of status or assignedTo required" — needs to be extended to also accept external issue linking as a valid action:
consthasStatusUpdate=status!==undefined;consthasAssignmentUpdate=assignedTo!==undefined;consthasExternalLink=[externalIssueUrl,externalIssueProject,externalIssueIdentifier].some(Boolean);if(!hasStatusUpdate&&!hasAssignmentUpdate&&!hasExternalLink){thrownewUserInputError("At least one of ...");}// External fields are all-or-nothingif(hasExternalLink){if(!externalIssueUrl||!externalIssueProject||!externalIssueIdentifier){thrownewUserInputError(", , and must all be provided together");}// Also validate URL is parseable http/https}
UUID Resolution (the interesting part)
The handler fetches all installations for the org, then resolves to exactly one using URL inference and/or the optional slug hint. It never exposes UUIDs to the user.
Step 1 — URL-derived service tokens:
Maintain a small known-host mapping plus hostname label extraction:
Self-hosted instances (e.g. gitlab.acme.com) are handled by extracting the leftmost hostname label if it matches a known service name.
Step 2 — Match against installations:
GET/api/0/organizations/{org}/sentry-app-installations/→[{ uuid,app: { slug, name }}, ...]
Matching is conservative — always prefer exact app.slug match. If externalIssueServiceSlug is provided, use it as the primary filter; URL tokens are the fallback.
Resolution outcomes:
Exactly one match → proceed
Zero matches → UserInputError listing installed apps by name/slug (no UUIDs) with instructions to install the integration or pass externalIssueServiceSlug
Multiple matches → UserInputError listing the ambiguous app names/slugs with instructions to use externalIssueServiceSlug
Multiple matches, same slug → UserInputError saying the ambiguity cannot be resolved without administrative intervention (we will never arbitrarily pick one)
Critical: installation resolution must happen before any mutation. If resolution fails, neither the PATCH /issues/{id}/ call nor the external issue POST fires.
The installationUuid param on the client method is intentionally kept internal — it never surfaces in the tool layer as a user-facing param.
Execution Order in Handler
1. Validate all params
2. Fetch current issue (already done today)
3. If external link params present:
a. Fetch installations → resolve UUID (fail here if ambiguous/missing)
4. Perform existing issue update if status/assignedTo/ignore needed
5. POST external issue link if requested
6. Post reason comment if provided
7. Return combined output
This means unresolvable linking aborts before any mutation, which is the safe behavior. The failure case for step 5 (link POST fails after update succeeds) must be reported clearly as a partial success — "Issue was updated, but external issue linking failed: " — rather than masking the error or implying full success.
thanks for your patience, this is finally live! You can now link and unlink existing tickets with link_issue and unlink_issue. Supports Jira, GitHub issues and PRs, Linear, GitLab, Bitbucket, Azure DevOps, and compatible Sentry Apps.
Give it a try and let us know how it works for you!
Activity
[-]Add option to link JIRA and GitHub issues[/-][+]Add action to link JIRA and GitHub issues[/+]oddgames-david commentedon Jun 28, 2025
Linear also please (all integrations)
wookasz commentedon Mar 9, 2026
This functionality would be fantastic.
SimonMacIntyre commentedon Apr 15, 2026
This is a big point of friction for me, would love to see it implemented!
otemnov commentedon May 28, 2026
really need this!
sentry-junior commentedon May 28, 2026
Ran into a related pain point: tried to associate user feedback with a Linear issue via MCP, but you can't modify external issues directly — you have to use the integration-platform endpoint (create-or-update-an-external-issue) instead. The current
update_issuetool doesn't expose this. Would be great to have this covered as part of the broader linked-issue support.Action taken on behalf of Nick Meisenheimer.
sentry-junior commentedon May 28, 2026
Implementation Proposal: External Issue Linking via
update_issueBackground
The integration platform endpoint for creating/updating external issue links is:
The
uuidis a Sentry App installation UUID, not something users should see or manage. Resolving it automatically is the core design challenge here.There's already a read path:
getIssueExternalLinksin the API client hits/organizations/{org}/issues/{id}/external-issues/and its output already shows up inget_issue_details. This proposal is purely the write side.New Parameters on
update_issueAdd four optional params, three of which are required together when linking:
The three required-together params map directly to the endpoint body fields.
externalIssueServiceSlugis NOT the UUID — it's a user-readable app slug used to disambiguate when multiple integrations might match.Combining with existing params should work fine in a single call (e.g. mark resolved AND link to Linear). The
issueIdinteger required by the endpoint is sourced fromissue.idon the already-fetched issue object.Validation Changes
The current guard — "at least one of
statusorassignedTorequired" — needs to be extended to also accept external issue linking as a valid action:UUID Resolution (the interesting part)
The handler fetches all installations for the org, then resolves to exactly one using URL inference and/or the optional slug hint. It never exposes UUIDs to the user.
Step 1 — URL-derived service tokens:
Maintain a small known-host mapping plus hostname label extraction:
Self-hosted instances (e.g.
gitlab.acme.com) are handled by extracting the leftmost hostname label if it matches a known service name.Step 2 — Match against installations:
Matching is conservative — always prefer exact
app.slugmatch. IfexternalIssueServiceSlugis provided, use it as the primary filter; URL tokens are the fallback.Resolution outcomes:
UserInputErrorlisting installed apps by name/slug (no UUIDs) with instructions to install the integration or passexternalIssueServiceSlugUserInputErrorlisting the ambiguous app names/slugs with instructions to useexternalIssueServiceSlugUserInputErrorsaying the ambiguity cannot be resolved without administrative intervention (we will never arbitrarily pick one)Critical: installation resolution must happen before any mutation. If resolution fails, neither the
PATCH /issues/{id}/call nor the external issuePOSTfires.API Client Additions
New schema (in
schema.ts):Reuse existing
ExternalIssueSchemafor the POST response.New client methods (in
client.ts):The
installationUuidparam on the client method is intentionally kept internal — it never surfaces in the tool layer as a user-facing param.Execution Order in Handler
This means unresolvable linking aborts before any mutation, which is the safe behavior. The failure case for step 5 (link POST fails after update succeeds) must be reported clearly as a partial success — "Issue was updated, but external issue linking failed: " — rather than masking the error or implying full success.
Output Changes
Extend the "## Changes Made" section:
Uses response fields
displayName,serviceType,webUrl. Falls back toexternalIssueIdentifierifdisplayNameis absent.Mock / Test Coverage Needed
New mocks (in
mcp-server-mocks):GET /api/0/organizations/:org/sentry-app-installations/POST /api/0/sentry-app-installations/:uuid/external-issues/Unit tests for
update_issue:UserInputErrorexternalIssueServiceSlugalone →UserInputErrorupdateIssueandcreateExternalIssueLinkboth calledupdateIssueNOT called (fail-before-mutate verified)Resolver unit tests (can be a pure function, easy to test in isolation):
linear.app→ matcheslinearslugatlassian.net→ matchesjiraslugjira.company.com(self-hosted) → matchesjiraslugOut of Scope
DELETE /sentry-app-installations/{uuid}/external-issues/{id}/) — future workNo New Tool
This stays in
update_issue. No new tool registration needed.Action taken on behalf of David Cramer.
fix(issue): Mark partial link failures as errors
fix(issue): Support Jira Server domains with ports
fix(issue): Mark error tool result spans as failed
fix(issue): Avoid retry signal for partial update success
test(issue): Remove unused error result helper
fix(issue): Report comment-only updates clearly
feat(issue): Link external issues
fix(issue): Mark partial link failures as errors
fix(issue): Support Jira Server domains with ports
fix(issue): Mark error tool result spans as failed
fix(issue): Avoid retry signal for partial update success
test(issue): Remove unused error result helper
fix(issue): Report comment-only updates clearly
feat(issue): link and unlink external issues (#1027)
betegon commentedon Sep 28, 2026
Hey everyone!
thanks for your patience, this is finally live! You can now link and unlink existing tickets with
link_issueandunlink_issue. Supports Jira, GitHub issues and PRs, Linear, GitLab, Bitbucket, Azure DevOps, and compatible Sentry Apps.Give it a try and let us know how it works for you!