clerk / clerk/mcp-express-example
Fails to authenticate in cursor
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Edit: Seems "Dynamic client registration" needs to be toggled on, however it still doesn't authenticate
https://github.com/user-attachments/assets/97ae9c66-f8f9-4075-886e-0017533262ee
Hi, I've tried this is a variety of tools (e.g. Claude@0.12.55, Cursor@ 1.99.3) but can't get it to work.
I add some extra logging. Seems like the first issue is there is no handler for /.well-known/oauth-protected-resource. But adding that and returing protectedResourceHandlerClerk doesn't work either.
HTTP server running at http://localhost:3000
HTTPS server running at https://localhost:3001
request: POST /mcp
mcpAuth: req.headers.authorization = undefined
await auth.getToken() = null
request: GET /.well-known/oauth-protected-resource
ANY request received: /.well-known/oauth-protected-resource
request: GET /.well-known/oauth-authorization-server
request: GET /mcp
ANY request received: /mcp
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with Cursor or Claude and trace the /mcp, /.well-known/oauth-protected-resource, and /.well-known/oauth-authorization-server requests shown in the issue. Inspect how the example handles these routes and Clerk authentication; done means the MCP client authenticates successfully without the missing-handler behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100