fix: restore Atlassian MCP OAuth by removing stale Passport dependency#1068
Merged
Conversation
The atlassian-dynamic Passport strategy was registered in config/passport.ts but passportConfig(passport) and passport.initialize() were intentionally commented out in commit 0ae736e when the AAI JWT/API-key auth system was integrated. This caused a hard 500 'Unknown authentication strategy' error on every Atlassian OAuth callback. - Inline token exchange directly in atlassianAuthCallback controller using the existing exchangeCodeForTokens, createCompleteCredentialData, and clearPendingRegistration utilities from utils/index.ts - Remove passport.authenticate() middleware from the callback route - Remove the dead GET / root route and authenticate controller method - Remove the atlassian-dynamic CustomStrategy from config/passport.ts along with its now-unused passport-custom and mcp-metadata imports
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… cloudId errors The Atlassian Remote MCP server requires a cloudId parameter for almost all Jira/Confluence tool calls. Without knowing the cloudId upfront, the LLM would pass null and receive a -32602 validation error, requiring a self-correcting get_accessible_resources round-trip before it could proceed. Fix: during getTools() initialization, invoke get_accessible_resources using its own MCPTool instance (no new MCP SDK imports needed), parse the cloud resource list, then append a cloudId hint to the description of every tool that declares a cloudId parameter in its zod schema. Single site: '[cloudId for this Atlassian site: "8ca3c755..." (lastrev)]' Multi-site: '[Available Atlassian cloudIds: "8ca3c755..." -> lastrev, ...]' Falls back silently if the pre-fetch fails, so no regression on errors.
ct3685
added a commit
that referenced
this pull request
May 15, 2026
## 🚀 Release: Staging to Production **Release Date:** 2026-05-15 ### Changes in this release - fix: add missing KeyboardArrowDownIcon import (7d7216e) - feat: collapsible template banner with count pill, green/amber theming, always-green badge (#1074) (99e0c8b) - feat: turn template banner green when all chatflows are up to date (#1073) (7314af5) - fix: reload page after bulk chatflow update and show in-progress state (#1072) (5ca478d) - fix: preserve workspaceId in bulkUpdateChatflows + optional template name sync (#1071) (3e166d6) - chore: update dependencies for improved compatibility and functionality (#1070) (6451d83) - fix: restore Atlassian MCP OAuth by removing stale Passport dependency (#1068) (00bae11) --- *This PR is automatically created/updated when commits are pushed to staging.* *Merging this PR will trigger the release workflow to create a new GitHub release.* --------- Co-authored-by: Cameron Taylor <50385537+ct3685@users.noreply.github.com> Co-authored-by: Cameron Taylor <cameron@lastrev.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Commit 1 — fix: Atlassian MCP OAuth 500 error
0ae736e41intentionally disabled Passport.js session infrastructure when the AAI JWT/API-key auth system was integrated. Theatlassian-dynamicPassport strategy was left in place but never ran because Passport was never initialized — causing a hard500: Unknown authentication strategy "atlassian-dynamic"on every OAuth callback.exchangeCodeForTokens,createCompleteCredentialData,clearPendingRegistrationfromutils/index.ts.GET /api/v1/atlassian-auth/root route andauthenticatecontroller method (both solely calledpassport.authenticate(...)) are gone.Commit 2 — feat: pre-fetch cloudId context to prevent null cloudId errors (global fix for all Atlassian actions)
cloudIdparameter for almost every Jira/Confluence tool call (add_comment_to_jira_issue,search_jira_issues,create_jira_issue,write:confluence-content, etc.). Without upfront knowledge of it, the LLM would passnull, receive a-32602validation error, then self-correct by callingget_accessible_resourcesbefore retrying — one wasted round-trip on every first call.getTools()initialization, the node invokesget_accessible_resourcesusing its ownMCPToolinstance (no new MCP SDK imports), parses the cloud resource list, then iterates every tool returned by the MCP server and appends a cloudId hint to the description of any tool that declares acloudIdparameter in its zod schema. This covers all current and future Atlassian MCP tools automatically — no per-action changes needed.[cloudId for this Atlassian site: "8ca3c755..." (lastrev — https://lastrev.atlassian.net)][Available Atlassian cloudIds: "8ca3c755..." → lastrev, "f08c36cd..." → lastrev-new]1.0 → 1.1.Files changed
packages/server/src/controllers/atlassian-auth/index.tsauthenticatemethodpackages/server/src/routes/atlassian-auth/index.tspackages/server/src/config/passport.tsatlassian-dynamicCustomStrategy and its unused importspackages/components/nodes/tools/MCP/Atlassian/AtlassianMcp.tsfetchCloudResources+enrichToolsWithCloudContext; bumped version to 1.1OAuth callback flow (unchanged behavior)
GET /api/v1/atlassian-auth/mcp-initialize→ registers dynamic OAuth client, returnssessionId,client_id,authorization_endpoint,redirect_uri,scope/api/v1/atlassian-auth/callback?code=...&state=<sessionId>AUTH_SUCCESSto openerTest plan
pnpm dev)get_accessible_resourcesround-triprefreshStoredCredentialTokenspath unchanged)Target branch
staging