better-auth
MCP server from nahmanmate/better-auth-mcp-server
claude mcp add --transport stdio nahmanmate-better-auth-mcp-server node /path/to/better-auth-mcp-server/build/index.js \ --env LOG_LEVEL="info|debug|error" \ --env BETTER_AUTH_ENV="development|staging|production" \ --env BETTER_AUTH_API_KEY="your-api-key" \ --env BETTER_AUTH_PROJECT_ID="your-project-id"
How to use
The Better Auth MCP Server provides enterprise-grade authentication tooling that can manage credentials securely, support multiple authentication protocols (OAuth2, SAML, LDAP), and monitor authentication activity in real time. It exposes a collection of core tools such as analyze_project to assess auth setup, setup_better_auth to configure providers with your project ID and API key, analyze_current_auth to detect existing auth.js or NextAuth implementations, and generate_migration_plan to outline migration steps. Additional capabilities include test_auth_flows to validate login, registration, and 2FA flows; test_security to run OWASP-aligned checks; analyze_logs to review auth system logs; and monitor_auth_flows for real-time monitoring. You can also inspect resources via better-auth://config for current configuration and better-auth://logs for logs. These tools can be invoked from your application code using mcp.useTool with the appropriate tool name and parameters.
How to install
Prerequisites:
- Node.js and npm installed on your system.
- Access to the MCP server repository (clone or npm package).
Install from the repository or package registry:
-
Clone the repository: git clone https://github.com/better-auth-mcp-server/better-auth-mcp-server.git cd better-auth-mcp-server
-
Install dependencies: npm install
-
Build the server (production build): npm run build
-
Optional: Run in development mode with auto-rebuild (watch): npm run watch
-
If you prefer using Smithery for distribution/config (optional): npx -y @smithery/cli install @nahmanmate/better-auth-mcp-server --client claude
Configure your MCP client to point to the built server, for example by updating your Claude Desktop config to load the server: On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json
Example configuration snippet for Claude Desktop integration: { "mcpServers": { "better-auth-mcp-server": { "command": "node", "args": ["/path/to/better-auth-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [] } } }
Additional notes
Environment variables are required for proper operation and security:
- BETTER_AUTH_PROJECT_ID and BETTER_AUTH_API_KEY should be set to your project credentials and kept secret.
- BETTER_AUTH_ENV can help differentiate deployments (development, staging, production).
- LOG_LEVEL controls the verbosity of logs (info, debug, error). If debugging MCP servers, you can rely on the MCP Inspector tooling to inspect stdio communication and trace tool invocations. Ensure network access to authentication providers (OAuth2, SAML, LDAP) is allowed from where the MCP server runs. For production, rotate API keys regularly and enforce least privilege when configuring access controls. Common issues include misconfigured environment variables, incorrect index.js path after build, and firewall rules blocking provider endpoints. The provided examples show how to wire the server into Claude Desktop; adapt paths to your environment accordingly.
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.