Next.js logo+Descope logo

NextJS MCP Server + Descope Auth

A Streamable HTTP Model Context Protocol (MCP) server secured by Descope Auth and hosted on Vercel.

Getting Started

  1. Clone the repository and install dependencies with pnpm install
  2. Set up environment variables in .env:
    • DESCOPE_PROJECT_ID
    • DESCOPE_BASE_URL (optional)
  3. Run the development server with pnpm run dev
  4. 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.