How to implement a mcp server with auth, and trigger cursor login?

I was very excited to see the release of cursor 1.0, and it supports one-click login authentication after configuring the mcp server.

I want to know how to implement such an mcp server that can support authentication and trigger the login of the cursor, just like linear here:

"Linear": {
      "url": "https://mcp.linear.app/sse"
    }

I hope someone can give me a github repository for learning. Thank you very much

1 Like

interested in this too. would very good to have a little more information or guidance for MCP server developers on how to achieve the same support.

by i random i found that neon server has oauth and it is opensource so can refernce theirs implementation. hope it helped GitHub - neondatabase-labs/mcp-server-neon: MCP server for interacting with Neon Management API and databases

1 Like

Good find @da1z. Would like to track down a simpler example too.

1 Like

If I understand correctly, the OAuth flow in the Neon MCP server is currently based on this spec, which has since changed significantly in the latest draft version.

Previously, the MCP server acted as both the MCP server and the OAuth provider. In other words, the Neon MCP Client would communicate with the Neon MCP Server, which is responsible for handling /authorize, /callback, and redirecting to the Neon Authorization Server.

In the draft spec, this has been greatly simplified for MCP server developers. You can read more about these changes in this PR.

As for a working example that integrates with Cursor: I modified the official TypeScript MCP server SDK example a bit , and it worked perfectly! It runs a Streamable HTTP MCP server along with a dummy authorization server—both on localhost.

Edit: Message is split to 2 due to new user links limitation :slight_smile:

1 Like

Thanks for your reply!

The simple TS MCP-Server example with authorization you mentioned is this file?: typescript-sdk/src/examples at main · modelcontextprotocol/typescript-sdk · GitHub

@shays10

Yes, this one

2 Likes