Self-Hosted OAuth Authentication Library for MCP Servers
Self-Hosted OAuth Authentication Library for MCP Servers
Hey HN, The latest MCP spec ( https://modelcontextprotocol.io/specification/2025-06-18/bas... ) requires MCP Servers implement OAuth for authenticating users and authorizing access to tools and resources. I spent way too long wiring up OAuth to build a ChatGPT connector and decided to wrap the pain into a library: @mcpauth/auth. What it is: - Self-hosted OAuth server, built for Model-Context-Protocol - Single authenticateUser() hook, so you plug in whatever session logic you already have (NextAuth, Auth.js, plain cookies, JWT, you name it) - Adapters: Next.js and Express; stores: Drizzle or Prisma - ISC licensed, no calls home Quick start is ~5 min: npm i @mcpauth/auth, add two route handlers, set three env vars. Live demo: https://mcpauth-nextjs.vercel.app/ If you’re building an MCP server or any internal AI tool that needs proper OAuth, I’d love feedback — especially on edge cases or new functionality. Repo: https://github.com/mcpauth/mcpauth
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Open-source MCP servers for self-hosted homelab AI
MCP Mesh – one endpoint for all your MCP servers (OSS self-hosted)
SplatIt. Self-hosted game servers for Splatoon on Wii U
Instanote – self-hosted pinboard
Mob – Self Hosted Polling
Mob – Self Hosted Polling
Self-Hosted Literate K3s Cluster
A Self-Hosted Podcatcher
Self hosted x86-64 assembler
Self-hosted Thunderclap