CLI for MCP Gateway authentication on SSH/headless servers using OAuth 2.0 Device Flow
npm install mcp-gateway-authCLI for MCP Gateway authentication on SSH/headless servers.
Uses OAuth 2.0 Device Authorization Grant (RFC 8628) - no local browser required.
``bash`
npm install -g mcp-gateway-auth
`bash`
mcp-auth login
1. Open the displayed URL on any device
2. Enter the code shown in terminal
3. All MCP services are automatically configured
``
mcp-auth login Authenticate via Device Flow
mcp-auth reconnect Refresh token (no browser needed)
mcp-auth status Show authentication status
mcp-auth token Print access token (for scripts)
mcp-auth logout Remove credentials
mcp-auth help Show help
mcp-auth --version Show version
After mcp-auth login, your .mcp.json is configured with:
| Service | Description |
|---------|-------------|
| chrome | Chrome DevTools Protocol |
| playwright | Cross-browser automation |
| firefox | Firefox DevTools |
| selenium | Selenium WebDriver |
| http | HTTP client |
| state | Browser state management |
| proxy | Proxy rotation |
| captcha | CAPTCHA solving |
| screenshot | URL screenshots |
`bash`
claude mcp list
All services should show as connected.
Tokens are valid for 1 year. Refresh without re-authenticating:
`bash`
mcp-auth reconnect
| Variable | Default |
|----------|---------|
| MCP_GATEWAY_URL | https://mcp.server.oanor.com |
| Path | Description |
|------|-------------|
| ~/.mcp-gateway/credentials.json | Stored credentials |./.mcp.json` | MCP server configuration |
|
- Node.js 18+
- Documentation
- Device Authorization
MIT