Introduction | Better Auth

ID: 1402https://www.better-auth.com/docs
Source

Introduction

Better Auth is a framework‑agnostic, universal authentication and authorization framework for TypeScript.
It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities.
Whether you need 2FA, passkey, multi‑tenancy, multi‑session support, or even enterprise features like SSO, creating your own IDP, it lets you focus on building your application instead of reinventing the wheel.

Features

Better Auth aims to be the most comprehensive auth library. Below are some of the key features it offers:

FeatureDescription
Framework AgnosticSupport for most popular frameworks
Email & PasswordBuilt‑in support for secure email and password authentication
Account & Session ManagementManage user accounts and sessions with ease
Built‑In Rate LimiterBuilt‑in rate limiter with custom rules
Automatic Database ManagementAutomatic database management and migrations
Social Sign‑onMultiple social sign‑on providers
Organization & Access ControlManage organizations and access control
Two Factor AuthenticationSecure your users with two factor authentication
Plugin EcosystemEven more capabilities with plugins

…and much more!


AI tooling

LLMs.txt

Better Auth exposes an LLMs.txt that helps AI models understand how to integrate and interact with your authentication system.
See it at https://better-auth.com/llms.txt.

MCP

Better Auth provides an MCP server so you can use it with any AI model that supports the Model Context Protocol (MCP).

CLI Options

Use the Better Auth CLI to easily add the MCP server to your preferred client:

# Cursor
npx @better-auth/cli mcp --cursor

# Claude Code
npx @better-auth/cli mcp --claude-code

# Open Code
npx @better-auth/cli mcp --open-code

# Manual
npx @better-auth/cli mcp --manual