auth-mcp
Fast, low-latency MCP server for authentication services, enabling AI agents like LM Studio and Claude Desktop to perform user authentication operations such as sign-in, sign-up, OTP verification, and token management.
README
Auth MCP Server
Fast, low-latency MCP server for authentication services
Optimized for real-time AI agent integration with LM Studio, Claude Desktop, and more.
🚀 Quick Start
# 1. Clone the repository
git clone https://github.com/wattlesol/auth-mcp.git
cd auth-mcp
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env with your API URLs
# 4. Test the server
./test-mcp-stdio.sh
# 5. Configure your AI agent (see Configuration section below)
✨ Features
- ⚡ Low Latency - Direct stdio communication (< 10ms)
- 🔧 18 Dynamic Tools - Auto-loaded from Swagger/OpenAPI spec
- 🤖 AI Agent Ready - Works with LM Studio, Claude Desktop, etc.
- 🐳 Docker Support - Optional containerized deployment
- 📚 Complete Docs - Comprehensive guides and examples
📋 Configuration
For LM Studio
{
"mcpServers": {
"auth-mcp": {
"command": "node",
"args": ["/absolute/path/to/auth-mcp/auth-mcp"],
"env": {
"AUTH_API_BASE_URL": "https://your-auth-api.example.com",
"SWAGGER_URL": "https://your-auth-api.example.com/api-json"
}
}
}
}
For Claude Desktop
Same configuration as above. Add to:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
For Qwen Coding Agent
Configuration is in .qwen/settings.json (see QWEN-SETUP.md for details)
🎯 Available Tools (18 Total)
The server dynamically loads tools from your Swagger/OpenAPI specification. Example tools:
Authentication & Sign In:
post_api_auth_signin- Sign in with email/passwordpost_api_auth_staff_signin- Staff sign in (branch-aware)post_api_auth_signup- Create new user accountpost_api_auth_signout- Sign out current user
User Info & Profile:
get_api_auth_me- Get current user informationput_api_auth_profile- Update user profile
OTP & Verification:
post_api_auth_otp_send- Send OTP to emailpost_api_auth_otp_verify- Verify OTP codepost_api_auth_verify_email- Verify email with OTPpost_api_auth_verify_phone- Verify phone with OTP
Password Management:
post_api_auth_forgot_request- Request password resetpost_api_auth_change_password- Change password
Token & Health:
post_api_auth_refresh_token- Refresh JWT tokenget_api_health- Health check endpoint
📚 Documentation
| Document | Description |
|---|---|
| docs/COPY-PASTE-CONFIG.txt | 📋 Ready-to-use configurations |
| docs/QUICK-SETUP.md | 🚀 Get started in 3 steps |
| docs/CONFIGURATION-GUIDE.md | 🔧 Detailed setup guide |
| docs/SUMMARY.md | 📖 Complete project overview |
| docs/README-MCP.md | 📘 MCP protocol details |
🧪 Testing
# Run automated tests
./test-mcp-stdio.sh
# Manual test
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node auth-mcp
🏗️ Architecture
AI Agent (LM Studio/Claude)
↓ stdio (JSON-RPC)
Auth MCP Server (Node.js)
↓ HTTPS
Backend Auth API (Swagger)
📊 Performance
- Latency: < 10ms (stdio communication)
- Startup: ~2 seconds (loads Swagger spec)
- Memory: ~50MB (Node.js + dependencies)
- Protocol: MCP 2024-11-05
🐳 Docker Deployment
# Build
docker build -f Dockerfile.mcp -t auth-mcp-stdio .
# Run
docker run --rm -i --env-file .env auth-mcp-stdio
🔧 Environment Variables
Copy .env.example to .env and configure:
AUTH_API_BASE_URL=https://your-auth-api.example.com
SWAGGER_URL=https://your-auth-api.example.com/api-json
AUTH_API_TIMEOUT=5000
🛠️ Development
# Install dependencies
npm install
# Run HTTP server (legacy)
npm start
# Run MCP server (stdio)
npm run mcp
# Run tests
npm test
📦 Project Structure
├── auth-mcp # Main launcher script
├── src/
│ ├── mcp-stdio-server.js # MCP server (stdio)
│ ├── api-client.js # Auth API client
│ ├── swagger-client.js # Swagger API client
│ └── swagger-tools-analyzer.js # Tool generator
├── config/
│ ├── lm-studio-config.json # LM Studio config
│ ├── claude-desktop-config.json # Claude Desktop config
│ └── mcp-config-docker.json # Docker config
├── docs/ # Documentation
├── test/ # Test files
├── .env.example # Example environment variables
└── package.json # Dependencies
🤝 Contributing
This is a production-ready MCP server. Feel free to:
- Add more tools
- Improve error handling
- Add monitoring/metrics
- Extend documentation
📄 License
ISC
🆘 Support & Troubleshooting
Issues? Check these guides:
- QWEN-SETUP.md - Qwen Coding Agent setup & troubleshooting
- QWEN-TOOLS-FIX.md - Tools not showing? Read this
- docs/QUICK-SETUP.md - Quick troubleshooting
- docs/CONFIGURATION-GUIDE.md - Detailed help
Enable Debug Mode:
MCP_DEBUG=true node auth-mcp
🎉 Success!
You now have a production-ready MCP server for AI agents!
Next Steps:
- Configure your AI agent with the settings above
- Test with: "Can you list the available authentication tools?"
- Start using the tools in your AI conversations!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。