https://github.com/andrelandgraf/neon-auth-mcp-oauth
PoC of an MCP server in a Next.js app with Neon Auth and custom OAuth flow for MCP.
https://github.com/andrelandgraf/neon-auth-mcp-oauth
Last synced: 5 months ago
JSON representation
PoC of an MCP server in a Next.js app with Neon Auth and custom OAuth flow for MCP.
- Host: GitHub
- URL: https://github.com/andrelandgraf/neon-auth-mcp-oauth
- Owner: andrelandgraf
- Created: 2025-06-04T05:35:27.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-06T09:10:23.000Z (5 months ago)
- Last Synced: 2025-06-16T23:45:57.359Z (5 months ago)
- Language: TypeScript
- Homepage: https://neon-auth-mcp-oauth.vercel.app
- Size: 7.52 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - **neon-auth-mcp-oauth** - PoC of an MCP server in a Next.js app with Neon Auth and custom OAuth flow for MCP. `typescript` `mcp` `server` `auth` `oauth` `npm install andrelandgraf/neon-auth-mcp-oauth` (🌐 Web Development)
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.:
```json
{
"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
1. Set up Neon and Neon Auth.
2. Deploy to Vercel and set up Redis Upstash via the Vercel Upstash Integration.
## Environment
Create a `.env` file. Review [./lib/config.ts](./lib/config.ts) for a full list of required .env variables.
## Development
- Run the MCP Inspector for debugging:
```bash
npm run playground
```
- Paste `http://localhost:3000/api/v1/mcp` in the MCP Inspector MCP Server URL field.
- Run the application
```bash
npm run dev
```