Skip to main content
Glama

Better Auth MCP Server

by nahmanmate

Servidor MCP de mejor autenticación

Servidor MCP para la gestión de autenticación

Solución de autenticación de nivel empresarial que proporciona:

  • 🔐 Gestión segura de credenciales con cifrado AES-256
  • ⚙️ Autenticación multiprotocolo (OAuth2, SAML, LDAP)
  • 🛡️ Detección y prevención de amenazas en tiempo real

Características

Herramientas principales

  • analyze_project : analiza la estructura del proyecto para obtener recomendaciones de configuración de autenticación.
  • setup_better_auth : configura proveedores de autenticación con el ID del proyecto y la clave API
  • analyze_current_auth : detecta implementaciones existentes de auth.js/next-auth
  • generate_migration_plan - Crear una ruta de migración paso a paso

Pruebas y seguridad

  • test_auth_flows - Validar flujos de inicio de sesión/registro/reinicio/2fa
  • test_security - Ejecutar comprobaciones de seguridad alineadas con OWASP
  • analyze_logs : revisa los registros del sistema de autenticación para detectar problemas.
  • monitor_auth_flows - Monitoreo de autenticación en tiempo real

Recursos disponibles

  • better-auth://config : configuración actual de Better-Auth
  • better-auth://logs - Registros del sistema de autenticación

Desarrollo

Clonar e instalar:

git clone https://github.com/better-auth-mcp-server/better-auth-mcp-server.git cd better-auth-mcp-server npm install

Construir el servidor:

npm run build

Para desarrollo con reconstrucción automática:

npm run watch

Configuración

Variables de entorno

# Required BETTER_AUTH_PROJECT_ID=your-project-id BETTER_AUTH_API_KEY=your-api-key # Optional BETTER_AUTH_ENV=development|staging|production LOG_LEVEL=info|debug|error

Mejores prácticas de seguridad

  1. Gestión de claves API
    • Almacenar claves API en variables de entorno
    • Gire las llaves regularmente
    • Utilice claves diferentes por entorno
  2. Control de acceso
    • Implementar limitación de velocidad
    • Configurar listas de permitidos de IP
    • Utilice el principio del mínimo privilegio
  3. Escucha
    • Habilitar el registro de auditoría
    • Monitorear fallos de autenticación
    • Configurar alertas para actividades sospechosas

Instalación

Instalación mediante herrería

Para instalar Better Auth MCP Server para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @nahmanmate/better-auth-mcp-server --client claude

Para utilizar con Claude Desktop, agregue la configuración del servidor:

En MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json En Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "better-auth-mcp-server": { "command": "node", "args": ["/path/to/better-auth-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [] } } }

Depuración

Dado que los servidores MCP se comunican a través de stdio, la depuración puede ser complicada. Recomendamos usar el Inspector MCP , disponible como script de paquete:

npm run inspector

El Inspector proporcionará una URL para acceder a las herramientas de depuración en su navegador.

Ejemplos de uso

Configuración del proyecto

// Initialize Better-Auth in your project await mcp.useTool('setup_better_auth', { projectPath: './my-next-app', config: { projectId: process.env.BETTER_AUTH_PROJECT_ID, apiKey: process.env.BETTER_AUTH_API_KEY } }); // Test core authentication flows await mcp.useTool('test_auth_flows', { flows: ['login', 'register', '2fa'] });

Migración desde Auth.js/NextAuth

// Analyze current auth implementation await mcp.useTool('analyze_current_auth', { projectPath: './my-next-app' }); // Generate migration steps await mcp.useTool('generate_migration_plan', { projectPath: './my-next-app', currentAuthType: 'next-auth' });
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Permite la gestión de autenticación de nivel empresarial con manejo seguro de credenciales y soporte para autenticación multiprotocolo, completo con herramientas para analizar, configurar y probar sistemas de autenticación.

  1. Características
    1. Herramientas principales
    2. Pruebas y seguridad
    3. Recursos disponibles
  2. Desarrollo
    1. Configuración
      1. Variables de entorno
      2. Mejores prácticas de seguridad
    2. Instalación
      1. Instalación mediante herrería
      2. Depuración
    3. Ejemplos de uso
      1. Configuración del proyecto
      2. Migración desde Auth.js/NextAuth

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      Facilitates authentication with GitHub using OAuth protocol, allowing secure access and interaction with GitHub repositories and services.
      Last updated -
      4
      Python
      • Apple
      • Linux
    • A
      security
      A
      license
      A
      quality
      Enterprise-grade authentication solution that provides secure credential management with encryption, multi-protocol authentication (OAuth2, SAML, LDAP), and real-time threat detection for applications.
      Last updated -
      8
      AGPL 3.0
    • -
      security
      F
      license
      -
      quality
      Run your own MCP server for over 2,500 apps and APIs. * Run your own MCP server for over 2,500 APIs * Manage servers for your users, in your own app. * Connect accounts, configure params, and make API requests, all via tools * Fully-managed OAuth and credential storage )
      Last updated -
      198
      10,139
      JavaScript
      • Linux
      • Apple
    • -
      security
      A
      license
      -
      quality
      A comprehensive system that helps organizations track, manage, and respond to security vulnerabilities effectively through features like vulnerability tracking, user management, support tickets, API key management, and SSL certificate management.
      Last updated -
      Python
      MIT License

    View all related MCP servers

    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/nahmanmate/better-auth-mcp-server'

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