---
title: "Managed Better Auth is now an OAuth provider, with MCP support"
description: "Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in."
url: "https://swe.quest/articles/managed-better-auth-is-now-an-oauth-provider-with-mcp-support-613f00a7521407ac"
canonical: "https://neon.com/blog/managed-better-auth-oauth-provider-mcp"
source: "Neon"
published: "2026-11-02"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["identity-auth","ai-agents","postgres"]
---

# Managed Better Auth is now an OAuth provider, with MCP support

A post on [Neon](https://swe.quest/sources/neon.md), published 2026-11-02, 5 min read, Announcement. Original: [https://neon.com/blog/managed-better-auth-oauth-provider-mcp](https://neon.com/blog/managed-better-auth-oauth-provider-mcp)

## Summary

Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in. Neon runs the discovery endpoints, JWKS, token issuance and refresh, and client onboarding via Client ID Metadata Documents or optional dynamic registration. You host the login and consent pages and the resource server, where the new @neon/oauth SDK checks token signature, issuer and audience, with adapters for Express, Hono, Next.js and node:http. OAuth configuration is per branch, and each branch gets its own issuer while sharing signing keys, so preview-branch tokens are rejected by production verifiers that pin the issuer.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- OAuth 2.x flows ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- PKCE
- Model Context Protocol basics

## Keywords

Neon, Better Auth, OAuth 2.1, MCP, @neon/oauth, Client ID Metadata Documents, Hono, PKCE

## Related posts

- [Every app needs an MCP server, and you can build it with Neon](https://swe.quest/articles/every-app-needs-an-mcp-server-and-you-can-build-it-with-neon-1a5ce4eab0583eca.md): Neon · 2026-11-25 · Easy · 11 min read · AI agents, Identity & auth, Serverless, PostgreSQL
  An MCP server lets users drive an app from AI assistants like ChatGPT, Claude and Cursor through tools the app defines, which keeps authorization and validation in app code instead of exposing the UI or raw database access.
- [Bringing MCP to the Cloud](https://swe.quest/articles/bringing-mcp-to-the-cloud-de1944b558e43ff0.md): Neon · 2025-04-11 · Medium · 8 min read · AI agents, Identity & auth, API design, JavaScript
  Neon moved its MCP server from a locally spawned stdio process authenticated by a long-lived API key to a hosted server at mcp.neon.tech, using SSE for server-to-client messages and HTTP POST to a /messages endpoint routed by an in-memory session map.
- [Solving the MCP Authentication Headache with Vercel & Better Auth](https://swe.quest/articles/solving-the-mcp-authentication-headache-with-vercel-better-auth-749640ed1439e99c.md): Neon · 2025-05-23 · Medium · 5 min read · Identity & auth, AI agents, TypeScript
  Remote MCP servers can authenticate users with OAuth instead of plaintext bearer tokens or UUIDs stored in a client's mcp.json, using Better Auth's MCP plugin together with Vercel's @vercel/mcp-adapter in a Next.js app.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.
- [Learnings from building our public MCP server](https://swe.quest/articles/learnings-from-building-our-public-mcp-server-4745c00cbf09b9ab.md): Wealthfront Engineering · 2026-11-02 · Medium · 8 min read · AI agents, Identity & auth, API design, Payments & fintech
  Wealthfront built a public MCP server so users can connect their cash and investing accounts to AI applications, using Streamable HTTP transport with synchronous calls only, all capabilities exposed as tools with per-tool scope enforcement, and OAuth for authentication.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
