Skip to main content
Glama
dabhivijay2478

Better Auth MCP Server

Better Auth MCP Server

A modern Model Context Protocol (MCP) server for the Better Auth authentication framework.
This server provides developer-friendly tools, searchable documentation, ready-to-use integrations, and configuration generators for authentication providers, database adapters, and plugins.


✨ Highlights

  • πŸ“š Full Documentation Access – categorized, searchable, and framework-specific examples

  • πŸ” Authentication Providers – Email/Password, Google, GitHub, Apple, Microsoft, Facebook, and more

  • πŸ—„οΈ Database Adapters – PostgreSQL, MySQL, SQLite, MongoDB, Prisma, Drizzle

  • πŸ”§ Plugins & Extensions – OTP, Magic Link, 2FA, Passkey, Organization Management, API Tokens

  • βš™οΈ Smart Tools – Config generation, validation, migration guides, and framework integration

  • πŸ”’ Security Built-in – CSRF protection, secure cookies, rate limiting, WebAuthn/Passkeys, 2FA


Related MCP server: MCP Developer Server

πŸš€ Quick Start

npx -y @smithery/cli install @dabhivijay2478/auth --client claude

Manual Setup

git clone <repository-url>
cd better-auth-mcp-server
npm install
npm run build

Update claude_desktop_config.json:

{
  "mcpServers": {
    "better-auth": {
      "command": "node",
      "args": ["path/to/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

πŸ› οΈ Core Tools

Documentation

  • list_better_auth_features – List all available features and plugins

  • get_feature_details – Get details for a specific feature or plugin

  • search_better_auth – Search Better Auth documentation

Integrations

  • get_integration_guide – Framework-specific setup (Next.js, Nuxt, Remix, SvelteKit, Expo, etc.)

  • get_auth_examples – Code snippets and usage examples

Advanced Context

  • target_llms_context – Access Better Auth LLMs.txt for comprehensive context


πŸ“¦ Usage Examples

1. Generate a Complete Auth Config

const setup = await generate_auth_config({
  providers: ["email-password", "google", "github"],
  adapter: "postgresql",
  plugins: ["magic-link", "two-factor"],
  framework: "nextjs"
});

console.log(setup.serverConfig);

2. Get Provider Config

const google = await get_auth_provider_config({ provider_name: "google" });
console.log(google.setupSteps);

3. Validate Config

const validation = await validate_auth_setup({
  config: "your auth.ts config here",
  framework: "nextjs"
});
console.log(validation);

πŸ” Security Features

  • CSRF Protection – Safe request handling

  • Session Security – Rotation, expiration, validation

  • Passkeys & WebAuthn – FIDO2 support

  • Two-Factor Auth – TOTP, backup codes

  • Rate Limiting – Prevent abuse

  • Password Security – Strong hashing and validation


πŸ—οΈ Architecture

  • Language: TypeScript (ES2022 target)

  • Validation: Zod schemas

  • Protocol: Model Context Protocol (MCP)

  • Code Generation: Production-ready configs and migration scripts

  • Error Handling: Detailed and recoverable


🀝 Contributing

  1. Clone repo

  2. Install dependencies: npm install

  3. Build: npm run build

  4. Update src/index.ts with new features

When Better Auth adds features:

  • Extend AUTH_PROVIDERS, DATABASE_ADAPTERS, PLUGINS

  • Add documentation mappings

  • Write tool handlers

  • Test thoroughly


πŸ“„ License

MIT License – see LICENSE file


πŸ”— Resources


Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables interaction with AIApp BaaS authentication system through keyword-based document search and automatic generation of framework-specific client code. Supports React, Next.js, Vue, and Vanilla JS with TypeScript integration and automatic project ID injection.
    3
    8
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Provides instant access to 700+ programming documentation sources and creates isolated Docker containers for safe code testing and experimentation. Combines comprehensive documentation lookup with containerized development environments for enhanced development workflows.
    AGPL 3.0
  • A
    license
    A
    quality
    B
    maintenance
    Build on the Flarelink stack β€” Cloudflare auth (better-auth + KV sessions), D1, and R2 β€” from AI coding tools. Provides copy-paste code patterns and scaffolding that need no account, plus project-management tools (list/query your projects, D1 databases, and R2 buckets) gated by a Flarelink API key.
    11
    63
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Get up-to-date, version-specific documentation and code examples from official sources directly in…

  • Search PayU docs, browse the payment integration catalog, and fetch production-ready code.

  • Comprehensive PostgreSQL documentation and best practices, including ecosystem tools

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dabhivijay2478/better-auth-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server