You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This is an MCP (Model Context Protocol) OAuth 2.1 server implementation built with Next.js 15, providing secure authentication for MCP clients. The application serves as an OAuth authorization server that enables MCP clients to authenticate users and access protected MCP resources.
8
+
9
+
## Core Architecture
10
+
11
+
### Authentication Flow
12
+
-**NextAuth.js**: Handles user authentication via Google OAuth provider
13
+
-**OAuth 2.1 Server**: Custom implementation with PKCE support for MCP client authorization
14
+
-**Database**: PostgreSQL with Prisma ORM storing OAuth clients, tokens, and user sessions
15
+
-**MCP Integration**: Uses `@vercel/mcp-adapter` for MCP protocol handling
16
+
17
+
### Key Components
18
+
-`app/auth.ts`: NextAuth configuration with Google provider and Prisma adapter
19
+
-`app/api/oauth/`: OAuth 2.1 server endpoints (register, token, authorize)
20
+
-`app/mcp/[transport]/route.ts`: MCP server with authentication middleware
21
+
-`prisma/schema.prisma`: Database schema for OAuth entities and NextAuth models
0 commit comments