You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow managing multiple Gmail accounts from a single server instance.
Each tool accepts an optional `account` parameter; omitting it uses
the default account for full backwards compatibility.
- Replace singleton OAuth2Client with per-account Gmail client map
- Add loadAllAccounts() to discover credentials-*.json files
- Add authenticate(accountName) for per-account auth flow
- Add `account` param to all 19 existing tool schemas
- Add list_accounts tool to show configured accounts
- Update README with multi-account usage docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This approach allows authentication flows to work properly in environments where localhost isn't accessible, such as containerized applications or cloud servers.
196
197
198
+
## Multi-Account Support
199
+
200
+
You can configure multiple Gmail accounts and switch between them using the optional `account` parameter on any tool.
201
+
202
+
### Authenticating Additional Accounts
203
+
204
+
```bash
205
+
# Authenticate your default account (same as before)
206
+
npx @gongrzhe/server-gmail-autoauth-mcp auth
207
+
208
+
# Authenticate a "work" account
209
+
npx @gongrzhe/server-gmail-autoauth-mcp auth work
210
+
211
+
# Authenticate a "personal" account
212
+
npx @gongrzhe/server-gmail-autoauth-mcp auth personal
213
+
214
+
# With custom callback URL for cloud environments
215
+
npx @gongrzhe/server-gmail-autoauth-mcp auth work https://gmail.example.com/oauth2callback
0 commit comments