LogoMCP Auth

Overview

Introduction and feature overview for @mcpauth/auth

Welcome to @mcpauth/auth

A full-featured, self-hosted OAuth 2.0 server purpose-built for the Model-Context-Protocol (MCP) ecosystem.

Why @mcpauth/auth?

Self-HostedOwn your data and authentication flow. No SaaS vendor lock-in.
MCP-ReadyRequired by modern MCP clients (e.g. ChatGPT) for secure tool access.
Plugs Into Existing AuthUse the authenticateUser callback to bridge any cookie, session or token system.
Framework AdaptersOfficial Next.js and Express adapters – more coming.
Database StoresWorks with Prisma & Drizzle out-of-the-box.
Extensible & OSS100 % open-source. Request or build new adapters & stores.

Live Demo

Check out the live demo of @mcpauth/auth in action, deployed on Vercel:

mcpauth-nextjs.vercel.app

The source code for this demo is available in the apps/nextjs directory of the GitHub repository.

Quick Install

npm install @mcpauth/auth

Ready to dive in? Start with Installation below or jump directly to an adapter guide.