Cursor does not refresh OAuth tokens for MCP Servers. In fact, it appears that Cursor is not requesting the OAuth refresh token from the MCP server. This leads to all MCP servers failing ~15min after being added with common token time-outs.
Steps to Reproduce
Add an MCP Server that uses DCR/OAuth - I recommend an MCP Gateway from Arcade (MCP Gateways | Arcade Docs)
Authenticate and call some tools
Wait 15 min
See that tool calls have failed, and cursor reports an error on the MCP connection (“needs authentication”). Reconnecting will succeed, but then time out again in ~15 minutes.
Expected Behavior
MCP Clients implementing OAuth must request refresh tokens, and update the client’s token periodically.
Operating System
MacOS
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Thanks for raising this. This is a known limitation for Cursor (not supporting refresh tokens). I’ve added this thread to the internal ticket we have tracking requests.
We’ve confirmed in our logs that cursor’s MCP client is advertising that it does support refresh_token, this is the registration metadata is sent with Dynamic Client Registration (DCR)
Looked into it a bit more after reading your post. From what I can tell, Cursor does store the refresh token when received, but doesn’t currently use it to refresh expired access tokens on the client side. So when an access token expires, users have to re-authenticate rather than having it silently refreshed.
So it kind of supports refresh tokens but not in a very helpful way. Your point about advertising support for it in grant_types is valid and I’ll pass it on to the team.
Would your tool treat Cursor differently if it doesn’t advertise it (offer a longer-lasting initial token? something else?)
I think you should continue to advertise that you accept tokens, otherwise a number of MCP servers won’t be able to connect, even though you don’t do the refresh yet. You’ll go from ~15 min of usability to 0! In our case, we won’t issue a “forever” token if you don’t support refresh, we just won’t connect over OAuth.
If it was clear that Cursor doesn’t support token refresh, we likely probably advise our users not to use DCR, and direct them to connect via an alternative authorization mechanism using long-lived API Keys in the headers:
We are facing this issue with our MCP Server connection to Atlassian. We need to disable/enable it (or restart Cursor) whenever the OAuth token is expired. Not a great experience being that the token expires about every 20 minutes. Please provide refresh functionality for MCP Servers in Cursor. Thanks!