@n24q02m/better-email-mcp 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -10
- package/bin/cli.mjs +67 -142
- package/build/src/auth/email-auth-provider.d.ts +8 -1
- package/build/src/auth/email-auth-provider.d.ts.map +1 -1
- package/build/src/auth/email-auth-provider.js +13 -11
- package/build/src/auth/email-auth-provider.js.map +1 -1
- package/build/src/auth/per-user-credential-store.d.ts +5 -0
- package/build/src/auth/per-user-credential-store.d.ts.map +1 -1
- package/build/src/auth/per-user-credential-store.js +51 -27
- package/build/src/auth/per-user-credential-store.js.map +1 -1
- package/build/src/relay-setup.d.ts.map +1 -1
- package/build/src/relay-setup.js +3 -3
- package/build/src/relay-setup.js.map +1 -1
- package/build/src/tools/composite/messages.js +7 -2
- package/build/src/tools/composite/messages.js.map +1 -1
- package/build/src/tools/helpers/imap-client.d.ts.map +1 -1
- package/build/src/tools/helpers/imap-client.js +63 -39
- package/build/src/tools/helpers/imap-client.js.map +1 -1
- package/build/src/tools/helpers/oauth2.d.ts.map +1 -1
- package/build/src/tools/helpers/oauth2.js +7 -4
- package/build/src/tools/helpers/oauth2.js.map +1 -1
- package/build/src/transports/http.d.ts.map +1 -1
- package/build/src/transports/http.js +105 -134
- package/build/src/transports/http.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -46,12 +46,6 @@ Via marketplace (includes skills: /inbox-review, /follow-up):
|
|
|
46
46
|
|
|
47
47
|
Set credentials in `~/.claude/settings.local.json` or shell profile. See [Prerequisites](#mcp-server).
|
|
48
48
|
|
|
49
|
-
### Gemini CLI Extension
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
gemini extensions install https://github.com/n24q02m/better-email-mcp
|
|
53
|
-
```
|
|
54
|
-
|
|
55
49
|
### Codex CLI
|
|
56
50
|
|
|
57
51
|
Add to `~/.codex/config.toml`:
|
|
@@ -126,22 +120,64 @@ Configure `EMAIL_CREDENTIALS` in `~/.claude/settings.local.json` or your shell p
|
|
|
126
120
|
|
|
127
121
|
## Zero-Config Setup
|
|
128
122
|
|
|
129
|
-
No environment variables needed. On first start, the server opens a setup page
|
|
123
|
+
No environment variables needed. On first start, the server opens a relay setup page:
|
|
130
124
|
|
|
131
125
|
1. Start the server (via plugin, `npx`, or Docker)
|
|
132
|
-
2. A setup URL appears -- open it in any browser
|
|
133
|
-
3.
|
|
126
|
+
2. A setup URL appears -- open it in any browser (relay: `https://better-email-mcp.n24q02m.com`)
|
|
127
|
+
3. Enter your credentials in `email:app-password` format (comma-separated for multi-account)
|
|
134
128
|
4. Credentials are encrypted and stored locally
|
|
135
129
|
|
|
136
130
|
Your credentials never leave your machine. The relay server only sees encrypted data.
|
|
137
131
|
|
|
138
132
|
For CI/automation, you can still use environment variables (see below).
|
|
139
133
|
|
|
134
|
+
## Remote (HTTP Mode)
|
|
135
|
+
|
|
136
|
+
Run as a multi-user HTTP server with OAuth 2.1 authentication:
|
|
137
|
+
|
|
138
|
+
```jsonc
|
|
139
|
+
{
|
|
140
|
+
"mcpServers": {
|
|
141
|
+
"better-email": {
|
|
142
|
+
"type": "http",
|
|
143
|
+
"url": "https://better-email-mcp.n24q02m.com/mcp"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Self-Hosting (HTTP Mode)
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
docker run -p 8080:8080 \
|
|
153
|
+
-e TRANSPORT_MODE=http \
|
|
154
|
+
-e PUBLIC_URL=https://your-domain.com \
|
|
155
|
+
-e DCR_SERVER_SECRET=$(openssl rand -hex 32) \
|
|
156
|
+
n24q02m/better-email-mcp:latest
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Users provide their own email credentials through the OAuth flow. No server-side `EMAIL_CREDENTIALS` needed.
|
|
160
|
+
|
|
161
|
+
## Outlook OAuth Device Code
|
|
162
|
+
|
|
163
|
+
Outlook, Hotmail, and Live accounts use OAuth2 automatically. On first use with an Outlook account:
|
|
164
|
+
|
|
165
|
+
1. The server prints a device code and a Microsoft login URL
|
|
166
|
+
2. Open the URL in a browser and enter the code
|
|
167
|
+
3. Sign in and authorize the app
|
|
168
|
+
4. Tokens are saved locally at `~/.better-email-mcp/tokens.json`
|
|
169
|
+
|
|
170
|
+
No App Password is needed for Outlook accounts.
|
|
171
|
+
|
|
140
172
|
## Configuration
|
|
141
173
|
|
|
142
174
|
| Variable | Required | Default | Description |
|
|
143
175
|
|:---------|:---------|:--------|:------------|
|
|
144
|
-
| `EMAIL_CREDENTIALS` | Yes | - | Email credentials (`user@gmail.com:app-password`, comma-separated for multi-account) |
|
|
176
|
+
| `EMAIL_CREDENTIALS` | Yes (stdio) | - | Email credentials (`user@gmail.com:app-password`, comma-separated for multi-account) |
|
|
177
|
+
| `TRANSPORT_MODE` | No | `stdio` | Set to `http` for remote mode |
|
|
178
|
+
| `PUBLIC_URL` | Yes (http) | - | Server's public URL for OAuth redirects |
|
|
179
|
+
| `DCR_SERVER_SECRET` | Yes (http) | - | HMAC secret for stateless client registration |
|
|
180
|
+
| `PORT` | No | `8080` | Server port |
|
|
145
181
|
| `OUTLOOK_CLIENT_ID` | No | - | Custom Azure AD client ID for self-hosted Outlook OAuth2 |
|
|
146
182
|
|
|
147
183
|
### Multiple Accounts
|