The provided refresh token is invalid or has expired

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

I have a connection to Atlassian’s MCP server that was working with Cursor Automations for a few days, but now is stuck in the failing state. I have logged out and back in, deleted the MCP server, etc but it’s stuck. I’m unable to use these automations now as their purpose is to leverage information in Jira.

Steps to Reproduce

  1. Connect to Atlassian
  2. Wait a couple days
  3. Refresh token error appears

I just need to look at any Automation using it, such as https://cursor.com/automations/d03952b9-fe56-4140-956d-c4da3b846c69. I can also see the inability to access Atlassian in the model output.

Expected Behavior

The refresh token should work or at the absolute minimum, I should be able to reset the state and reconnect manually until the bug around refresh tokens not working is fixed.

Operating System

MacOS

Version Information

Using cursor.com/automations

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known issue: refresh tokens for OAuth MCP servers, especially Atlassian where tokens expire quickly, don’t refresh automatically in Automations, and the UI doesn’t let you reset state and re-auth.

This was already fixed in the IDE, but the issue still remains in Automations on the web. The team is aware, and I’ve shared your report again to help with prioritization. No ETA yet, but we’re tracking it.

Let me know if there’s anything else.

Hey thanks Dean. Does that mean there’s a way for me to fix these via the IDE when they expire? Or do OAuth connections for Automations permanently break once the first access token expires?

Unfortunately, right now the IDE fix for refresh tokens doesn’t apply to Automations. Automations uses a separate flow, so we can’t fix it via the IDE either.

What’s happening today is this: once the access token expires in Automations, the OAuth connection gets stuck in a dead state. The Disconnect button doesn’t show up, and you can’t reset or reconnect. That’s the root cause.

The team is aware, but there’s no workaround for Automations at the moment. I’ve shared your case for prioritization, especially since this is blocking a team of 89 users.

I’ll post an update here as soon as we have one.

Hey - you should be able to disconnect / reconnect failed MCPs from the Automations UI now.

We will continue to make improvements to the OAuth flow to make it more seamless, thanks for the reports!

1 Like

Are you sure that refresh tokens are fixed in UI?

I see this in logs:

2026-03-17 16:04:37.386 [info] Using redirect URL

2026-03-17 16:04:37.646 [info] Saving tokens

2026-03-17 16:04:37.649 [info] OAuth authorization completed

So I cannot even tell if refresh token was stored or not :sweat_smile:
and after original token expires I’m back to “401“

This is my Cursor version

Version: 2.6.19 (Universal)
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Also debug logs don’t reveal much so it’s very hard to debug what’s going on

P.S. I’m using PKCE Oauth

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.