A minimal example of an MCP server endpoint using Next.js and Clerk for authentication.
- Run
npm i
to install dependencies - Create a Clerk application and make sure you have been opted in to the OAuth beta flag (contact
[email protected]
or reach out to a contact at Clerk if you have one) - Put your API keys in an
.env.local
file in the project - Run
npm run dev
to start the app
To test in cursor, add the following config to your mcp config file:
"mcp-clerk-next": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:3000/mcp", "--allow-http"]
}
Examples of other clients coming soon!