
NextJS MCP Server + Descope Auth
A Streamable HTTP Model Context Protocol (MCP) server secured by Descope Auth and hosted on Vercel.
Getting Started
- Clone the repository and install dependencies with
pnpm install
- Set up environment variables in
.env
:- DESCOPE_PROJECT_ID
- DESCOPE_BASE_URL (optional)
- Run the development server with
pnpm run dev
- Connect your MCP Client (Claude, Cursor, etc.) to
http://localhost:3000/api/mcp
Key Features
- 🔐Session Validation: Uses Descope Node SDK to validate JWT tokens and extract user context
- 🛠️Echo Tool: Simple example tool demonstrating MCP integration that returns "Hello, world!"
- 🔑API Key Management: Use Descope's Outbound Applications to securely manage API keys and OAuth tokens for your MCP tools.