@mindstone/mcp-server-microsoft-mail 0.1.0 → 0.1.1
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/CHANGELOG.md +7 -0
- package/README.md +95 -9
- package/package.json +3 -3
- package/server.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.1] - 2026-05-19
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
- Rewrote `README.md` to follow the structure in [`docs/CONNECTOR_README_GUIDE.md`](../../docs/CONNECTOR_README_GUIDE.md): added an npm-version badge, an italic positioning line, the `## Status` block with hyperlinked evidence and `Hosts tested` / `Machine-readable` rows, a `## Why this exists` section, an `## Example interaction` block, `## Host configuration examples` (Claude Desktop / Cursor and local development), the `(12)` tool count in the `## Tools` heading, and a `## Security notes` section.
|
|
14
|
+
- Added the connector to the table in the repo-root `README.md`.
|
|
15
|
+
|
|
9
16
|
### Planned
|
|
10
17
|
- Migrate to `@mindstone/mcp-server-microsoft-shared` from its npm-registry version once `0.1.0` of the shared package is published; the `0.1.0` cohort port currently consumes the shared package as a packed `file:` dependency.
|
|
11
18
|
- Tighten Zod validation of Microsoft Graph response payloads in `0.2.0` or later.
|
package/README.md
CHANGED
|
@@ -1,18 +1,52 @@
|
|
|
1
1
|
# @mindstone/mcp-server-microsoft-mail
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@mindstone/mcp-server-microsoft-mail)
|
|
3
4
|
[](./LICENSE)
|
|
4
5
|
|
|
5
6
|
Microsoft 365 Outlook Mail MCP server — list, search, read, send, reply, forward, draft, move, and delete email via the Microsoft Graph API.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
*Cohort-style Microsoft 365 mail MCP. Host owns the OAuth flow, this server reads per-account tokens off disk, and each tool fails closed with a structured `auth_required` envelope so the host can drive reauth.*
|
|
8
9
|
|
|
9
10
|
## Status
|
|
10
11
|
|
|
11
|
-
- **Version:** [0.1.
|
|
12
|
+
- **Version:** [0.1.1](./CHANGELOG.md) · [npm](https://www.npmjs.com/package/@mindstone/mcp-server-microsoft-mail)
|
|
12
13
|
- **Auth:** OAuth (host-orchestrated) ([`MS_CLIENT_ID`](./server.json))
|
|
13
|
-
- **Tools:** 12 (
|
|
14
|
+
- **Tools:** [12](./src/tools.ts) (messages, folders, drafts)
|
|
14
15
|
- **Surface:** cloud-api
|
|
15
|
-
- **
|
|
16
|
+
- **Hosts tested:** Mindstone Rebel
|
|
17
|
+
- **Machine-readable:** [`STATUS.json`](./STATUS.json)
|
|
18
|
+
- **Shared library:** [`@mindstone/mcp-server-microsoft-shared`](https://www.npmjs.com/package/@mindstone/mcp-server-microsoft-shared)
|
|
19
|
+
|
|
20
|
+
## Why this exists
|
|
21
|
+
|
|
22
|
+
When we ported this in May 2026, Microsoft's own [Graph MCP](https://github.com/microsoft/mcp) lineup did not yet ship a stand-alone Outlook Mail server, and the community options at the time each ran their own browser-callback server during OAuth — which our host application already does, with credentials it has already negotiated for the rest of the cohort. We pulled the bundled connector out of MindstoneRebel as a 1:1 port so the same five-connector Microsoft 365 cohort (mail, calendar, files, teams, SharePoint) shares a single OAuth surface, a single shared-library package for token persistence, request timeouts, and the structured `auth_required` envelope the host already knows how to recover from. This connector owns the cohort's authentication tool (`authenticate_microsoft_account`); the other four connectors reuse the credentials it negotiates.
|
|
23
|
+
|
|
24
|
+
## Example interaction
|
|
25
|
+
|
|
26
|
+
> "List my five most recent unread emails from Alice and reply to the latest one with 'thanks, will read tonight'."
|
|
27
|
+
|
|
28
|
+
Tools the host calls:
|
|
29
|
+
1. `search_emails` — `from:alice@example.com isRead:false`, top 5.
|
|
30
|
+
2. `reply_to_email` — sends a reply on the top-result message ID with the supplied body.
|
|
31
|
+
|
|
32
|
+
Response (trimmed):
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"matches": [
|
|
37
|
+
{
|
|
38
|
+
"id": "AAMkAD...",
|
|
39
|
+
"subject": "Q3 planning",
|
|
40
|
+
"from": "alice@example.com",
|
|
41
|
+
"receivedDateTime": "2026-05-19T09:14:11Z"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"reply": {
|
|
45
|
+
"id": "AAMkAD...",
|
|
46
|
+
"isDraft": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
16
50
|
|
|
17
51
|
## Requirements
|
|
18
52
|
|
|
@@ -22,19 +56,26 @@ Host-orchestrated OAuth, per-account credentials on disk, and a structured `auth
|
|
|
22
56
|
|
|
23
57
|
## Quick Start
|
|
24
58
|
|
|
59
|
+
### Install & build
|
|
60
|
+
|
|
25
61
|
```bash
|
|
26
62
|
cd <path-to-repo>/connectors/microsoft-mail
|
|
27
63
|
npm install
|
|
28
64
|
npm run build
|
|
29
|
-
node dist/index.js
|
|
30
65
|
```
|
|
31
66
|
|
|
32
|
-
|
|
67
|
+
### npx (once published)
|
|
33
68
|
|
|
34
69
|
```bash
|
|
35
70
|
npx -y @mindstone/mcp-server-microsoft-mail
|
|
36
71
|
```
|
|
37
72
|
|
|
73
|
+
### Local
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
node dist/index.js
|
|
77
|
+
```
|
|
78
|
+
|
|
38
79
|
## Configuration
|
|
39
80
|
|
|
40
81
|
This server runs alongside a host application that owns the Microsoft 365 OAuth flow. The host writes credentials to disk; this server reads them.
|
|
@@ -55,7 +96,45 @@ This server runs alongside a host application that owns the Microsoft 365 OAuth
|
|
|
55
96
|
| `MICROSOFT_REQUEST_TIMEOUT_MS` | Override the upstream Microsoft Graph request timeout (max `300000` ms). | `60000` |
|
|
56
97
|
| `MICROSOFT_DISABLE_REFRESH` | Set to `1` to disable token refresh on this surface. Tools fail closed with the structured `auth_required` response so the host can drive reauth. Cloud surfaces set this to `1`. | unset |
|
|
57
98
|
|
|
58
|
-
##
|
|
99
|
+
## Host configuration examples
|
|
100
|
+
|
|
101
|
+
### Claude Desktop / Cursor
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"Microsoft365Mail": {
|
|
107
|
+
"command": "npx",
|
|
108
|
+
"args": ["-y", "@mindstone/mcp-server-microsoft-mail"],
|
|
109
|
+
"env": {
|
|
110
|
+
"MS_CLIENT_ID": "your-entra-application-client-id",
|
|
111
|
+
"MS_CONFIG_DIR": "/absolute/path/to/microsoft-config"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Until the host has written `${MS_CONFIG_DIR}/credentials/<account>.token.json` and `${MS_CONFIG_DIR}/accounts.json`, every tool call returns the structured `auth_required` response (the host's MCP service recognises this shape and dispatches to its registered Microsoft 365 OAuth orchestrator).
|
|
119
|
+
|
|
120
|
+
### Local development (no npm publish needed)
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"mcpServers": {
|
|
125
|
+
"Microsoft365Mail": {
|
|
126
|
+
"command": "node",
|
|
127
|
+
"args": ["<path-to-repo>/connectors/microsoft-mail/dist/index.js"],
|
|
128
|
+
"env": {
|
|
129
|
+
"MS_CLIENT_ID": "your-entra-application-client-id",
|
|
130
|
+
"MS_CONFIG_DIR": "/absolute/path/to/microsoft-config"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Tools (12)
|
|
59
138
|
|
|
60
139
|
| Tool | Description |
|
|
61
140
|
| ---- | ----------- |
|
|
@@ -72,6 +151,13 @@ This server runs alongside a host application that owns the Microsoft 365 OAuth
|
|
|
72
151
|
| `create_reply_draft` | Save a draft reply to an existing email. |
|
|
73
152
|
| `create_draft` | Save a new standalone draft email. |
|
|
74
153
|
|
|
75
|
-
##
|
|
154
|
+
## Security notes
|
|
155
|
+
|
|
156
|
+
- Token files are written by the host with mode `0600`; this server reads them via the cohort-shared library, which fails closed on malformed files.
|
|
157
|
+
- `MICROSOFT_DISABLE_REFRESH=1` is the default on cloud surfaces so the desktop session remains the sole refresh-token authority and avoids racing for single-use refresh tokens.
|
|
158
|
+
- Successful tool responses drop the OSS-only `ok:true` wrapper to match the bundled `successResult` shape; manual validation/business errors return `isError:true` with a `{ ok:false, error, action_required, next_step }` payload so the host's recovery layer can act on them.
|
|
159
|
+
- Per-tool Graph calls run under a composed caller + cohort timeout signal via `.options({signal})` plus a `Promise.race` wrapper for defence-in-depth.
|
|
160
|
+
|
|
161
|
+
## Licence
|
|
76
162
|
|
|
77
|
-
[FSL-1.1-MIT](./LICENSE) — Functional Source License,
|
|
163
|
+
[FSL-1.1-MIT](./LICENSE) — Functional Source License, Version 1.1, with MIT future licence. Free for non-competing use; relicenses to MIT on the converter date in `LICENSE`.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindstone/mcp-server-microsoft-mail",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"mcpName": "io.github.mindstone/mcp-server-microsoft-mail",
|
|
5
|
-
"description": "Microsoft 365 Outlook
|
|
5
|
+
"description": "Microsoft 365 Outlook mail via Graph: read, search, send, reply, forward, draft, move, delete.",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"security:internal-refs": "node scripts/check-internal-refs.mjs"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@mindstone/mcp-server-microsoft-shared": "
|
|
39
|
+
"@mindstone/mcp-server-microsoft-shared": "0.1.0",
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
41
41
|
"zod": "^3.23.0"
|
|
42
42
|
},
|
package/server.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.mindstone/mcp-server-microsoft-mail",
|
|
4
4
|
"title": "Microsoft 365 Mail",
|
|
5
|
-
"description": "Microsoft 365 Outlook
|
|
6
|
-
"version": "0.1.
|
|
5
|
+
"description": "Microsoft 365 Outlook mail via Graph: read, search, send, reply, forward, draft, move, delete.",
|
|
6
|
+
"version": "0.1.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/mindstone/mcp-servers",
|
|
9
9
|
"source": "github",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
16
|
"identifier": "@mindstone/mcp-server-microsoft-mail",
|
|
17
|
-
"version": "0.1.
|
|
17
|
+
"version": "0.1.1",
|
|
18
18
|
"runtimeHint": "npx",
|
|
19
19
|
"transport": {
|
|
20
20
|
"type": "stdio"
|