mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-08 04:19:25 +00:00
95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
---
|
||
title: Introduction
|
||
description: Introduction to Better Auth.
|
||
---
|
||
|
||
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. It provides a wide range of features out of the box and allows you to extend it with plugins. Here are some of the features:
|
||
|
||
<Features/>
|
||
|
||
...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](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).
|
||
|
||
<AddToCursor />
|
||
|
||
#### CLI Options
|
||
|
||
Use the Better Auth CLI to easily add the MCP server to your preferred client:
|
||
|
||
<Tabs items={["Cursor", "Claude Code", "Open Code", "Manual"]}>
|
||
<Tab value="Cursor">
|
||
```bash title="terminal"
|
||
pnpm @better-auth/cli mcp --cursor
|
||
```
|
||
</Tab>
|
||
<Tab value="Claude Code">
|
||
```bash title="terminal"
|
||
pnpm @better-auth/cli mcp --claude-code
|
||
```
|
||
</Tab>
|
||
<Tab value="Open Code">
|
||
```bash title="terminal"
|
||
pnpm @better-auth/cli mcp --open-code
|
||
```
|
||
</Tab>
|
||
<Tab value="Manual">
|
||
```bash title="terminal"
|
||
pnpm @better-auth/cli mcp --manual
|
||
```
|
||
</Tab>
|
||
</Tabs>
|
||
|
||
#### Manual Configuration
|
||
|
||
Alternatively, you can manually configure the MCP server for each client:
|
||
|
||
<Tabs items={["Claude Code", "Open Code", "Manual"]}>
|
||
<Tab value="Claude Code">
|
||
```bash title="terminal"
|
||
claude mcp add --transport http better-auth https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp
|
||
```
|
||
</Tab>
|
||
<Tab value="Open Code">
|
||
```json title="opencode.json"
|
||
{
|
||
"$schema": "https://opencode.ai/config.json",
|
||
"mcp": {
|
||
"Better Auth": {
|
||
"type": "remote",
|
||
"url": "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp",
|
||
"enabled": true,
|
||
}
|
||
}
|
||
}
|
||
```
|
||
</Tab>
|
||
<Tab value="Manual">
|
||
```json title="mcp.json"
|
||
{
|
||
"Better Auth": {
|
||
"url": "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp"
|
||
}
|
||
}
|
||
```
|
||
</Tab>
|
||
</Tabs>
|
||
|
||
<Callout>
|
||
We provide a first‑party MCP, powered by [Chonkie](https://chonkie.ai). You can alternatively use [`context7`](https://context7.com/) and other MCP providers.
|
||
</Callout>
|