Better Auth MCP Server
better-auth-mcp-server MCP 서버
인증 관리를 위한 MCP 서버
엔터프라이즈급 인증 솔루션 제공:
🔐 AES-256 암호화를 통한 안전한 자격 증명 관리
⚙️ 다중 프로토콜 인증(OAuth2, SAML, LDAP)
🛡️ 실시간 위협 탐지 및 예방
특징
핵심 도구
analyze_project- 인증 설정 권장 사항을 위한 프로젝트 구조 분석setup_better_auth- 프로젝트 ID 및 API 키로 인증 공급자 구성analyze_current_auth- 기존 auth.js/next-auth 구현 감지generate_migration_plan- 단계별 마이그레이션 경로 생성
테스트 및 보안
test_auth_flows- 로그인/등록/재설정/2fa 흐름 검증test_security- OWASP에 맞춰 보안 검사를 실행합니다.analyze_logs- 인증 시스템 로그에서 문제를 검토합니다.monitor_auth_flows- 실시간 인증 모니터링
사용 가능한 리소스
better-auth://config- 현재 Better-Auth 구성 설정better-auth://logs- 인증 시스템 로그
Related MCP server: Secure MCP Server
개발
복제하고 설치하세요:
지엑스피1
서버를 빌드하세요:
npm run build자동 재빌드를 사용한 개발의 경우:
npm run watch구성
환경 변수
# 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보안 모범 사례
API 키 관리
환경 변수에 API 키 저장
키를 정기적으로 회전하세요
환경마다 다른 키를 사용하세요
접근 제어
속도 제한 구현
IP 허용 목록 구성
최소 권한 원칙 사용
모니터링
감사 로깅 활성화
인증 실패 모니터링
의심스러운 활동에 대한 알림을 설정하세요
설치
Smithery를 통해 설치
Smithery를 통해 Claude Desktop용 Better Auth MCP Server를 자동으로 설치하려면:
npx -y @smithery/cli install @nahmanmate/better-auth-mcp-server --client claudeClaude Desktop과 함께 사용하려면 서버 구성을 추가하세요.
MacOS의 경우: ~/Library/Application Support/Claude/claude_desktop_config.json 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": []
}
}
}디버깅
MCP 서버는 stdio를 통해 통신하므로 디버깅이 어려울 수 있습니다. 패키지 스크립트로 제공되는 MCP Inspector를 사용하는 것이 좋습니다.
npm run inspector검사기는 브라우저에서 디버깅 도구에 액세스할 수 있는 URL을 제공합니다.
사용 예
프로젝트 설정
// 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']
});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'
});
Available Tools
8 toolsanalyze_current_authC
Detect and analyze existing auth.js/next-auth implementation
Inputs: projectPath (required).
analyze_logsC
Analyze Better-Auth logs for issues
Inputs: timeRange (required).
analyze_projectC
Analyze project structure and dependencies to recommend Better-Auth setup approach
Inputs: projectPath (required).
generate_migration_planB
Create step-by-step migration plan from existing auth to Better-Auth
Inputs: projectPath (required), currentAuthType (required).
monitor_auth_flowsC
Real-time monitoring of authentication processes
Inputs: duration (required).
setup_better_authC
Install and configure Better-Auth in the project
Inputs: projectPath (required), config (required).
test_auth_flowsC
Test authentication workflows
Inputs: flows (required).
test_securityC
Run security tests on Better-Auth setup
Inputs: tests (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes, but there is some overlap between analyze_current_auth, analyze_project, and analyze_logs, which all involve analysis and could potentially be confused for similar tasks. However, their descriptions clarify specific focuses (existing implementation, project structure, logs), reducing ambiguity.
All tool names follow a consistent verb_noun pattern with snake_case, such as analyze_current_auth, setup_better_auth, and test_auth_flows. This predictability makes it easy for agents to understand and select tools based on their naming conventions.
With 8 tools, the server is well-scoped for its purpose of migrating to and managing Better-Auth. Each tool serves a clear role in the migration and monitoring process, from analysis and setup to testing and monitoring, without being overly sparse or bloated.
The tool set covers key aspects of migration (analysis, setup, testing, monitoring) but lacks explicit tools for updating or deleting configurations, which might be needed for ongoing maintenance. However, core workflows are well-covered, allowing agents to handle most migration tasks effectively.
Maintenance
Related MCP Connectors
One MCP endpoint for your company's tools, with per-person sign-in, policy and audit.
OAuth account tools, image/video generation (Pro), Studio handoffs. No local vault access.
Hash passwords with bcrypt and issue/verify JWT session tokens over A2A + MCP.
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Related MCP Servers
- AlicenseBqualityDmaintenanceEnterprise-grade authentication solution that provides secure credential management with encryption, multi-protocol authentication (OAuth2, SAML, LDAP), and real-time threat detection for applications.81AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceProvides an enterprise-grade Model Context Protocol implementation with advanced security features including multi-factor authentication, encryption, and RBAC. Enables secure tool management and context handling for production deployments with comprehensive monitoring and high availability.60 npm2AGPL 3.0
- FlicenseNot gradedqualityCmaintenanceCentralized credential management for servers, websites, and APIs with HashiCorp Vault integration. Provides authentication, authorization, and audit logging for secure access to secrets.2-
- AlicenseAqualityCmaintenanceEnables AI agents to securely manage local credentials, obtain short-lived tokens for authenticated API access, and audit every use by purpose.9MIT