You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP server accepts unauthenticated initialize, so Cursor never runs OAuth and every tool call fails with "Unauthorized" #14
The MagicPath MCP server at https://api.magicpath.ai/mcp returns HTTP 200 to initialize and tools/list from clients that have no access token. It only sends the 401 + WWW-Authenticate challenge on tools/call. Cursor runs its OAuth flow based on the connection-time 401, so it sees the server as connected and never prompts for login. Every tool call then fails with Unauthorized. Triggering MCP auth manually in Cursor reports "Successfully authenticated" but no browser login opens, and calls still fail.
The plugin README says: "Unauthenticated requests return 401 with a WWW-Authenticate challenge." The server does that for tools/call, but not for initialize.
Environment
Client: Cursor 3.22.12 (arm64, macOS 26.5)
Plugin: magicpath v0.7.0 from the Cursor public marketplace (commit 3cc4aeb0ff327877fa31fe3e7dd02193eb6a9e3f)
The protected-resource metadata is served correctly. It lists the authorization server https://api.magicpath.ai/ and the scopes magicpath:read and magicpath:write.
Expected
Per the MCP authorization spec and the plugin README, an initialize request without a valid bearer token should get HTTP 401 with the WWW-Authenticate / resource_metadata challenge. Clients would then discover the authorization server and run OAuth before the session starts.
Actual
initialize and tools/list succeed without a token. The challenge only comes on tools/call, after the client has already decided the server is connected. Cursor never starts OAuth, so the plugin can't be used.
Suggested fix
Require a valid bearer token on every request to /mcp, including initialize. Alternatively, return the 401 challenge on initialize whenever no Authorization header is present.
Activity