Skip to content

Conversation

@krjoseph
Copy link

@krjoseph krjoseph commented Oct 6, 2025

Description

Though we allow users to provide their own OAuth tokens for authentication (BringYourOwnAccessToken), having to set ATLASSIAN_OAUTH_CLOUD_ID limits the MCP server to a single Jira instance. This PR attempts to automatically discover the cloud-id based on the provided OAuth token.

Fixes: #

Changes

  • When ATLASSIAN_OAUTH_CLOUD_ID is not set, use the accessible-resources endpoint (CLOUD_ID_URL) to find the accessible cloud-IDs for the user
  • Use existing get_cloud_id (earlier _get_cloud_id) to discover the cloud-id for the provided OAuth token
  • Retains the existing logic within get_cloud_id to use cloud-id of the first resource returned by the accessible-resources endpoint (CLOUD_ID_URL)

Testing

  • Unit tests added/updated
  • Integration tests passed
  • Manual checks performed: [briefly describe]

Checklist

  • Code follows project style guidelines (linting passes).
  • Tests added/updated for changes.
  • All tests pass locally.
  • Documentation updated (if needed).

nszceta added a commit to nszceta/mcp-atlassian that referenced this pull request Oct 16, 2025
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity for 14 days. It will be closed if no further activity occurs. Please leave a comment or remove the 'stale' label if you believe this PR is still relevant. Thank you for your contributions!

@github-actions github-actions bot added the stale label Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants