better-auth
MCP server from dabhivijay2478/better-auth-mcp-server
claude mcp add --transport stdio dabhivijay2478-better-auth-mcp-server node path/to/dist/index.js \ --env NODE_ENV="production"
How to use
The Better Auth MCP Server exposes a modern, MCP-compliant interface for configuring and exploring authentication providers, database adapters, and plugins used by the Better Auth framework. With this server, you can generate complete auth configurations, fetch provider and plugin details, browse integration guides, and view usage examples tailored to your framework (e.g., Next.js, Nuxt, Remix, SvelteKit). Core tools include list_better_auth_features to surface available features, get_feature_details for deep dives into a specific provider or plugin, search_better_auth to quickly locate relevant docs, and get_auth_examples for practical code snippets. This combination makes it easy to scaffold secure, production-ready auth setups and keep documentation synchronized with available capabilities.
To use these capabilities, run the MCP server (as configured in mcp_config) and invoke the tooling endpoints or handlers provided by the server. Typical workflows involve generating a complete auth config for your stack (providers, adapter, plugins), retrieving a provider-specific setup flow, or pulling framework-specific integration steps to implement in your frontend or backend. The server is designed to be framework-agnostic, offering structured docs and examples you can adapt to your project.
How to install
Prerequisites:
- Node.js (LTS) and npm installed
- Git installed
- Basic familiarity with MCP (Model Context Protocol) and your chosen framework
Installation steps:
- Clone the repository or install via the Smithery CLI (as recommended):
# Option A: Smithery (recommended)
npx -y @smithery/cli install @dabhivijay2478/auth --client claude
- If installing manually from source, clone and install dependencies:
git clone <repository-url>
cd better-auth-mcp-server
npm install
- Build the project (if required by the project setup):
npm run build
- Run the server (as configured in mcp_config):
# If using the provided dist entry point
node path/to/dist/index.js
- Update your claude desktop configuration to reference the MCP server, for example:
{
"mcpServers": {
"better-auth": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
}
Prerequisites recap: ensure your environment has Node.js and npm installed, and that any database adapters or providers you plan to use are accessible and properly configured in your environment.
Additional notes
Tips and common considerations:
- Environment variables: NODE_ENV, database URLs, and provider credentials may be required by your setup. Use a dedicated environment file or secret manager in production.
- If you upgrade Better Auth features, remember to update AUTH_PROVIDERS, DATABASE_ADAPTERS, and PLUGINS mappings in your configuration and re-generate docs/configs as needed.
- When migrating configurations, validate generated setups with validate_auth_setup for your target framework.
- Ensure network access to your database and any external authentication providers (OAuth, etc.) configured for your MCP server.
- For production deployments, consider enabling CSRF protection, secure cookies, and rate limiting as described in the security features of Better Auth.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.