Neon Auth MCP OAuth
LocalAbout Neon Auth MCP OAuth
Neon Auth MCP OAuth is a proof-of-concept MCP server built with Next.js, Neon, Upstash Redis, and Neon Auth. It demonstrates a custom OAuth flow for developers testing MCP authentication.
Key features
- 01Custom MCP OAuth flow
- 02Next.js application
- 03Neon Auth integration
- 04Upstash Redis integration
- 05MCP Inspector debugging
Use cases
- 01Testing OAuth for an MCP server
- 02Trying authentication in Cursor or Windsurf
- 03Debugging a local MCP endpoint
MCP support
It provides an MCP endpoint for clients such as Cursor, Windsurf, and Claude Desktop. The project demonstrates a custom OAuth flow for MCP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README
Neon Auth MCP OAuth
PoC implementation of a custom MCP OAuth flow with Next.js, Neon, Upstash Redis, and Neon Auth.
You can try it out by adding the following MCP config to Cursor, Windsurf, Claude Desktop, etc.:
{
"mcpServers": {
"echo": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://neon-auth-mcp-oauth.vercel.app/api/v1/mcp"
]
}
}
}
Replace the example URL with http://localhost:3000/api/v1/mcp to try our the development server.
Note: Run rm -rf ~/.mcp-auth if you are running into issues. MCP auth is still flaky in my experience and resetting the stored auth state of the mcp-remote package helps.
Setup
- Set up Neon and Neon Auth.
- Deploy to Vercel and set up Redis Upstash via the Vercel Upstash Integration.
Environment
Create a .env file. Review ./lib/config.ts for a full list of required .env variables.
Development
- Run the MCP Inspector for debugging:
npm run playground
-
Paste
http://localhost:3000/api/v1/mcpin the MCP Inspector MCP Server URL field. -
Run the application
npm run dev
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.