Better Auth MCP Server
Provides authentication provider configuration and integration setup for Apple Sign-In
Provides database adapter configuration for Drizzle ORM integration with Better Auth
Provides framework-specific authentication setup guides and integration examples for Expo applications
Provides authentication provider configuration and integration setup for Facebook Login
Provides authentication provider configuration and integration setup for GitHub OAuth
Provides authentication provider configuration and integration setup for Google Sign-In
Provides database adapter configuration for MongoDB integration with Better Auth
Provides database adapter configuration for MySQL integration with Better Auth
Provides framework-specific authentication setup guides and integration examples for Next.js applications
Provides framework-specific authentication setup guides and integration examples for Nuxt applications
Provides database adapter configuration for PostgreSQL integration with Better Auth
Provides database adapter configuration for Prisma ORM integration with Better Auth
Provides framework-specific authentication setup guides and integration examples for Remix applications
Provides database adapter configuration for SQLite integration with Better Auth
Provides framework-specific authentication setup guides and integration examples for SvelteKit applications
Generates TypeScript authentication configuration code with type-safe schemas and validation
Provides plugin configuration and setup for WebAuthn/FIDO2 passwordless authentication and passkeys
Uses Zod for validation of authentication configurations and schema definitions
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Better Auth MCP Server generate a Next.js auth config with Google and GitHub providers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Install via Smithery (Recommended)
npx -y @smithery/cli install @dabhivijay2478/auth --client claudeManual Setup
git clone <repository-url>
cd better-auth-mcp-server
npm install
npm run buildUpdate 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 pluginsget_feature_details– Get details for a specific feature or pluginsearch_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
Clone repo
Install dependencies:
npm installBuild:
npm run buildUpdate
src/index.tswith 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
Available Tools
6 toolsget_auth_examplesB
Get usage examples and code snippets for Better Auth features
Inputs: featureName (required), framework.
get_feature_detailsB
Get detailed information about a specific Better Auth plugin or feature
Inputs: featureName (required).
get_integration_guideC
Get integration guide for a specific framework or platform
Inputs: framework (required).
get_llms_contextC
Get Better Auth LLMs.txt content for comprehensive context
Inputs: no named parameters.
list_better_auth_featuresB
Get a list of all available Better Auth plugins and features organized by category
Inputs: category.
search_better_authC
Search Better Auth documentation by keyword
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Every tool has a clearly distinct purpose with no ambiguity: list_better_auth_features provides a categorized overview, get_feature_details offers in-depth information on specific items, get_integration_guide focuses on framework/platform integration, get_auth_examples supplies code snippets, get_llms_context delivers comprehensive context via LLMs.txt, and search_better_auth enables keyword-based documentation search. The descriptions clearly differentiate each tool's scope.
All tool names follow a consistent verb_noun pattern with snake_case: get_auth_examples, get_feature_details, get_integration_guide, get_llms_context, list_better_auth_features, and search_better_auth. The naming is predictable and readable throughout, using 'get' for retrieval operations, 'list' for listing, and 'search' for searching, with no deviations in style.
With 6 tools, the count is well-scoped for a documentation and feature exploration server. Each tool earns its place by covering distinct aspects like listing, detailing, integrating, providing examples, offering context, and searching, without being too sparse or bloated. This aligns with typical server scopes of 3-15 tools.
The tool surface is nearly complete for a documentation server, covering core workflows: listing features, getting details, integration guides, examples, context, and search. A minor gap exists in the lack of update or interactive tools (e.g., for modifying or testing configurations), but agents can effectively navigate and retrieve information with the provided tools.
Related MCP Connectors
Backend for vibe coders. Connect Butterbase to any MCP-compatible AI coding tool and provision a full backend automatically — database, authentication, file storage, edge functions, and real-time — from a natural language prompt. No SQL, no configuration, no backend knowledge required. Free to start at butterbase.ai.
Manage DocsBot agents, knowledge sources, conversations, reporting, and teams with OAuth.
Gemmein docs, API reference, error explainers and a live integration check for coding agents.
Provides access to Avalara developer documentation, integration guides, and code examples
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.322 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides 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
- AlicenseNot gradedqualityDmaintenanceProvides real-time, up-to-date documentation for major LLM providers (OpenAI, Anthropic, Google Gemini) to prevent hallucinations and outdated code patterns in AI agents.22 npm6MIT
- AlicenseAqualityDmaintenanceProvides AI assistants with up-to-date documentation for popular libraries and frameworks, enabling them to generate more accurate code using less common or newly released libraries.519 npm36MIT