Skip to content

[Bug] InvalidTargetError during OAuth token exchange with new Atlassian authv2 endpoint #261

@krisvandebroek

Description

@krisvandebroek

Bug Description

When trying to connect to Atlassian's new authv2 MCP endpoint (which becomes mandatory on May 27, 2026), the OAuth authorization flow fails during the final token exchange with an InvalidTargetError: Incorrect resource parameters fatal error.

Steps to Reproduce

Run the following command using the latest version of mcp-remote:
npx --clear-cache -y mcp-remote@latest https://mcp.atlassian.com/v1/mcp/authv2

  1. The browser opens automatically and successfully prompts for consent.
  2. The auth code is successfully received locally (Auth code received, resolving promise).
  3. The process crashes immediately after Completing authorization....

Error Logs

[26089] Completing authorization...
[26089] Authorization error: InvalidTargetError: Incorrect resource parameters
    at parseErrorResponse (file:///.../mcp-remote/dist/chunk-65X3S4HB.js:18528:12)
    at async executeTokenRequest (file:///.../mcp-remote/dist/chunk-65X3S4HB.js:18884:11)
...
[26089] Fatal error: InvalidTargetError: Incorrect resource parameters

### Info

- New endpoint: https://mcp.atlassian.com/v1/mcp/authv2
- New auth server discovery: https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2
- Atlassian Developer Changelog: https://developer.atlassian.com/changelog/#CHANGE-3170

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions