Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I have built an HTTP MCP server that uses WorkOS AuthKit OAuth based on the starter project GitHub - workos/mcp.shop: mcp.shop storefront/app for MCP Night (docs here)
Cursor connects, authenticates, and calls tools fine. However, when my access token expires, the subsequent tool call or interaction fails with 401 Unauthorized, and Cursor marks the MCP server as “Logged out” and I have to reauthenticate manually. This is very disruptive to my workflow.
The refresh logic is handled by WorkOS, and both GitHub Copilot (VSCode Insiders) and Gemini CLI handle this token refresh properly, making me think this is a Cursor issue. Notably Claude Code has a similar problem: (Issue 5706)
Here are my MCP logs from the Output tab. Any additional guidance on what [info] OAuth provider needs auth callback during connection refers to would be helpful. My current hypothesis from reading other threads is that Cursor only primarily supports the older specification where MCP and authorization server are one and the same.
2025-08-18 21:22:58.197 [info] Found 5 tools and 0 prompts
...
2025-08-18 21:26:24.067 [info] Handling CallTool action for tool 'my-tool'
2025-08-18 21:26:24.068 [info] Calling tool 'my-tool' with toolCallId: tool_2cdbb50f-1bb0-4988-98e4-5d122a846cc
2025-08-18 21:26:25.986 [info] OAuth provider needs auth callback during connection
2025-08-18 21:26:25.986 [error] Error calling tool 'my-tool': Unauthorized
Any additional help or documentation would be appreciated!
Steps to Reproduce
- Setup an HTTP MCP server with a separate authorization server (e.g. mcp.shop)
- Configure a short access token lifetime, e.g. 3 mins
- Add the MCP server to Cursor and authenticate
- Wait 3 minutes
- Get Cursor to call an MCP tool (or disable+reenable the server)
- Get an 401 Unauthorized error
Expected Behavior
Cursor should refresh the MCP Server access token using the provided refresh token
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor