@chrischall/microsoft-teams-mcp 0.6.2 → 0.8.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Microsoft Teams — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first)",
10
- "version": "0.6.2"
10
+ "version": "0.8.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "Microsoft Teams",
16
16
  "source": "./",
17
17
  "description": "MCP server for Microsoft Teams — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first), via your signed-in browser session",
18
- "version": "0.6.2",
18
+ "version": "0.8.0",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "microsoft-teams-mcp",
3
3
  "displayName": "Microsoft Teams",
4
- "version": "0.6.2",
4
+ "version": "0.8.0",
5
5
  "description": "Microsoft Teams for Claude — read any chat or channel, your unread messages, and their attachments, and send messages and reactions (each confirmed first), using your signed-in browser session",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/README.md CHANGED
@@ -27,19 +27,42 @@ ones the sidebar shows. To capture a token, an idle tab is not enough: click
27
27
  into any chat so Teams calls its chat service.
28
28
 
29
29
  **The Activity feed comes from the same API.** It is a chat-service
30
- conversation of its own (`48:notifications`), so `teams_get_activity` reads
30
+ conversation of its own (`48:notifications`), so `teams_list_activity` reads
31
31
  it like any chat — no Activity view (or any view) needs to be open, and
32
32
  nothing reads the page. The bridge is used for one thing only: capturing the
33
33
  token.
34
34
 
35
35
  By default nothing here marks anything read. Reading a chat through this
36
36
  server leaves your Teams unread badges exactly as they were — unless you ask
37
- for it: `teams_mark_read`, or `mark_read: true` on `teams_read_conversation`
38
- / `teams_get_unread`, moves your read marker forward. The writes —
37
+ for it: `teams_mark_read`, or `mark_read: true` on `teams_list_messages`
38
+ / `teams_list_unread_messages`, moves your read marker forward. The writes —
39
39
  `teams_send_message`, `teams_react` and marking read — go through the same
40
40
  chat-service API and change nothing until you confirm (see
41
41
  [Writes](#writes)).
42
42
 
43
+ ## Pairing
44
+
45
+ The bridge remembers a pairing only for the exact set of domains it approved,
46
+ and approving a grant replaces the stored list of header captures. So all of
47
+ this server's captures (chat service, SharePoint, Substrate search) declare the
48
+ **same** scope: the three domains `teams.cloud.microsoft`, `sharepoint.com` and
49
+ `substrate.office.com`, plus the chat-service and search captures and one
50
+ capture per SharePoint host the server has already captured from. Each capture
51
+ still reads only the one header it needs. The SharePoint hosts are remembered
52
+ in `~/.microsoft-teams-mcp/bridge-scope.json` (beside the SharePoint token
53
+ cache; not written with `TEAMS_TOKEN_CACHE=false`) once a capture from them
54
+ succeeds.
55
+
56
+ Up to 0.7, each capture declared only its own domain, so the bridge asked to
57
+ pair again (or to update its grants) whenever the server moved between chats,
58
+ search and files. Upgrading from 0.7 asks to pair **once** more, for the
59
+ combined scope; after that it stays paired.
60
+
61
+ If you run the bridge in more than one browser or browser profile, each one is a
62
+ different extension identity, and the server trusts only the one it paired
63
+ with. Keep the bridge enabled in the browser you pair with (or re-pair
64
+ deliberately with `FETCHPROXY_TRUST_NEW_EXTENSION=1` after switching browsers).
65
+
43
66
  ## SharePoint file download
44
67
 
45
68
  A **shared file** in a chat or channel is not in Teams' own object store
@@ -48,15 +71,15 @@ chat-service token. So `teams_get_attachment` captures a **separate SharePoint
48
71
  token** and fetches the file through SharePoint's `v2.1` shares API, then
49
72
  downloads the pre-signed link it returns (with no token attached).
50
73
 
51
- Two things follow from that, both one-time and additive — they do **not** change
52
- how the chat-service token is captured:
74
+ Two things follow from that:
53
75
 
54
- - **A one-time re-pair.** The SharePoint path declares a second trust scope,
55
- `sharepoint.com`, so the ContextMint Bridge grant has to cover it. If you
56
- paired `microsoft-teams-mcp` before this feature, revoke and re-pair it in the
57
- bridge popup once to add the SharePoint scope (a `not in declared set` error
58
- on a file download is this, nothing more). The chat-service capture is
59
- untouched — it still trusts only `teams.cloud.microsoft`.
76
+ - **One pairing covers it.** Every capture this server makes — chat service,
77
+ SharePoint and search — declares the same ContextMint Bridge scope: the domains
78
+ `teams.cloud.microsoft`, `sharepoint.com` and `substrate.office.com`, and the
79
+ same list of header captures. So approving `microsoft-teams-mcp` once covers
80
+ all three, and moving between chats, files and search never asks again (see
81
+ [Pairing](#pairing)). The first file from a new SharePoint host asks once to
82
+ grant that host's capture.
60
83
  - **Open the file once per SharePoint host.** The SharePoint token is captured
61
84
  from the browser's own request to the file's SharePoint host, is short-lived
62
85
  (~53 minutes), and is scoped to one host family. So the first file from a
@@ -76,10 +99,8 @@ Substrate does not accept the chat-service token either, so search captures a
76
99
  in `~/.microsoft-teams-mcp/substrate-token.json`. As with the other two, it is
77
100
  read only from the request header, never from page storage.
78
101
 
79
- - **A one-time re-pair.** The search path declares its own trust scope,
80
- `substrate.office.com`, which the ContextMint Bridge grant has to cover. If you
81
- paired `microsoft-teams-mcp` before this feature, revoke and re-pair it in the
82
- bridge popup once. The chat-service and SharePoint captures are untouched.
102
+ - **No separate pairing.** Search is part of the one bridge scope every capture
103
+ declares (see [Pairing](#pairing)), so the pairing that reads chats covers it.
83
104
  - **Run a search in Teams once.** The token is read off the Teams tab's own
84
105
  search request, so the first search may need you to type anything into the
85
106
  Teams search box and press Enter while the capture waits
@@ -169,14 +190,15 @@ Everything is optional — by default the token is captured from your browser.
169
190
  | `TEAMS_TOKEN_FILE` | Where the captured token is cached. Defaults to `~/.microsoft-teams-mcp/token.json`. |
170
191
  | `TEAMS_SUBSTRATE_TOKEN_FILE` | Where the captured Substrate search token is cached. Defaults to `~/.microsoft-teams-mcp/substrate-token.json`. `TEAMS_TOKEN_CACHE=false` keeps it in memory too. |
171
192
  | `TEAMS_SHAREPOINT_TOKEN_FILE` | Where the captured SharePoint tokens (one per host, used to download shared files) are cached. Defaults to `~/.microsoft-teams-mcp/sharepoint-tokens.json`. `TEAMS_TOKEN_CACHE=false` keeps them in memory too. |
172
- | `TEAMS_TIME_ZONE` | Default IANA time zone (e.g. `America/New_York`) for the `tz` argument of `teams_read_conversation` and `teams_get_unread`: each message then carries `time_local` (ISO 8601 with offset) next to its UTC `time`. Unset means no `time_local` unless `tz` is passed; a name `Intl` does not know is reported as an error. |
193
+ | `TEAMS_TIME_ZONE` | Default IANA time zone (e.g. `America/New_York`) for the `tz` argument of `teams_list_messages` and `teams_list_unread_messages`: each message then carries `time_local` (ISO 8601 with offset) next to its UTC `time`. Unset means no `time_local` unless `tz` is passed; a name `Intl` does not know is reported as an error. |
194
+ | `TEAMS_OUTPUT_DIR` | Folder `teams_export_messages` (and `teams_get_transcript` with `save`) writes into (each export gets its own timestamped subfolder). Defaults to `~/Downloads/microsoft-teams-mcp`. When set, a per-call `dest` must lie inside it; when unset, `dest` must be under `~/Downloads`, `~/Documents` or `~/Desktop`. |
173
195
  | `TEAMS_WS_PORT` | fetchproxy concentrator port. Defaults to `37149`, the fleet-wide shared port. |
174
196
  | `FETCHPROXY_WS_HOST` | Bind interface for the bridge (default `127.0.0.1`; a literal IP only, anything else is ignored). Keep on loopback — it exists for ONE topology: a hosted child in its own network namespace. |
175
197
  | `FETCHPROXY_IDENTITY_DIR` | Where to store the long-term fetchproxy identity keypair (default `~/.fetchproxy/identity/`; an absolute path only, anything else is ignored). Exists for a host that runs a separate child per caller, so they can share one identity. |
176
198
 
177
199
  ## Tools
178
200
 
179
- - `teams_list_chats` — every chat you are in (1:1, group and meeting chats,
201
+ - `teams_list_conversations` — every chat you are in (1:1, group and meeting chats,
180
202
  not just the visible sidebar, plus your `48:notes` self-chat as kind
181
203
  `self` when Teams lists it), favorites and pinned chats first, then most
182
204
  recent activity first: id, kind,
@@ -193,13 +215,18 @@ Everything is optional — by default the token is captured from your browser.
193
215
  recent first, ignoring favorites and pinned) or `title` (alphabetical,
194
216
  case-insensitive — this titles every untitled chat in the listing before
195
217
  `limit` applies, so it reads more than the other orders). A group chat with no topic is titled after
196
- who is in it — `Group chat: <up to three recent senders other than you,
197
- most recent first>` plus `+N` for more, with every recent sender in
198
- `participants` — rather than after whoever posted last, so chats that
199
- share a last sender stay distinguishable. The chat service has no member
200
- list, so this reads up to 30 recent messages (one small page) of each such
201
- chat returned (four at a time, cached until a new message arrives); if that
202
- read fails, the chat keeps its last-sender title. A 1:1 is titled by the
218
+ who is in it — `Group chat: <the first three recent senders other than
219
+ you, sorted by name>` plus `+N` for more, with every recent sender in
220
+ `participants` in the same order — rather than after whoever posted last,
221
+ so chats that share a last sender stay distinguishable, and a chat keeps
222
+ its title when someone different posts next. This server has no member-list
223
+ call, so this reads up to 30 recent messages (one small page) of each such
224
+ chat returned (four at a time, cached until a new message arrives) and
225
+ names the people who wrote in them; the title changes only when that set
226
+ of people does. If the read fails, the chat keeps its last-sender title.
227
+ Every other tool that returns a conversation names it the same way: the
228
+ Activity feed's `where`, an attachment's caption, search hits, read errors,
229
+ and the conversation a send, reaction or mark-read targets. A 1:1 is titled by the
203
230
  other person (its id names them) and carries them as its one
204
231
  `participants` entry — read from their recent messages when you sent the
205
232
  last one, `(1:1 chat)` if they wrote nothing recently. `query` matches such
@@ -226,16 +253,16 @@ Everything is optional — by default the token is captured from your browser.
226
253
  not flagged (verified live 2026-10-10) — the flags mostly reflect favorited
227
254
  channels and pinned conversations. A chat you muted in Teams carries
228
255
  `muted: true`.
229
- - `teams_list_teams_and_channels` — every channel you are in, by team then
256
+ - `teams_list_channels` — every channel you are in, by team then
230
257
  title, with the same fields — favorite and pinned channels first, flagged
231
- as in `teams_list_chats`. Channels you have hidden in Teams are listed
258
+ as in `teams_list_conversations`. Channels you have hidden in Teams are listed
232
259
  after the rest with `hidden: true`, and left out of `unread_only` unless
233
260
  `include_hidden` is set. `unread_only`, `include_hidden`, `since_days`
234
261
  (with `unread_only`; default 14), `query` (channel or team name, or the
235
262
  last-message preview; each match carries `match_reason`, as in
236
- `teams_list_chats`) and
263
+ `teams_list_conversations`) and
237
264
  `limit` (default 50, max 500).
238
- - `teams_read_conversation` — read any chat or channel by id or name,
265
+ - `teams_list_messages` — read any chat or channel by id or name,
239
266
  oldest first: sender, time (UTC, ISO 8601), text, subject, edited/deleted
240
267
  flags and attachments. A channel comes back as threads (root post + replies).
241
268
  A thread whose root post is older than the window (a reply came in after
@@ -269,7 +296,7 @@ Everything is optional — by default the token is captured from your browser.
269
296
  returned message's id, or the `after_message_id` you passed when nothing
270
297
  is new — so passing it back as `after_message_id` reads only what arrived
271
298
  since. `after_message_id` takes message ids only: to read what
272
- `teams_get_changes` counted, pass that row's `after_message_id`, not its
299
+ `teams_list_changed_conversations` counted, pass that row's `after_message_id`, not its
273
300
  `next_cursor`. See [Cursors](#cursors-only-what-is-new). `from` pages
274
301
  oldest first from a UTC time instead — see
275
302
  [Paging from a time](#paging-from-a-time).
@@ -287,7 +314,8 @@ Everything is optional — by default the token is captured from your browser.
287
314
  a time; an ambiguous name takes its place in `conversations` as the same
288
315
  `{ambiguous: true, query, match_count, candidates, hint}` object a single
289
316
  read returns, one that cannot be resolved or read is listed in `errors`
290
- with its reason, and the rest still come back. A single string returns
317
+ with its reason (and, once it resolved, its `id`, `title`, `kind`, `team`
318
+ and `participants`), and the rest still come back. A single string returns
291
319
  exactly the shape above.
292
320
  By default it does not mark anything read; `mark_read: true` also moves
293
321
  your read marker up to the newest message returned (never backwards;
@@ -301,13 +329,13 @@ Everything is optional — by default the token is captured from your browser.
301
329
  `marked_read: { skipped: "truncated" | "since", hint }` (a `limit` that cut
302
330
  only messages you had already read still marks). An empty read, or an
303
331
  `after_message_id` with nothing new, marks nothing (`marked_read: false`).
304
- - `teams_get_unread` — every unread message across your chats and channels,
332
+ - `teams_list_unread_messages` — every unread message across your chats and channels,
305
333
  grouped by conversation, most recent first (or, with `from`, one
306
334
  oldest-first list across them all — see
307
335
  [Paging from a time](#paging-from-a-time)). Filter by `kinds` (`chat`,
308
336
  `channel`, `meeting`, `oneOnOne`) or `query` (title, channel or team
309
337
  name, an untitled chat's participant name, or the last-message preview —
310
- each conversation then carries `match_reason`, as in `teams_list_chats`);
338
+ each conversation then carries `match_reason`, as in `teams_list_conversations`);
311
339
  `per_conversation_limit`
312
340
  (default 50) and `max_conversations` (default 20 returned with their
313
341
  messages — the rest are named, with their `unread_count`, in
@@ -317,7 +345,7 @@ Everything is optional — by default the token is captured from your browser.
317
345
  conversations with unread messages from the last `since_days` (default 14,
318
346
  max 3650) are returned; older ones are counted in `older_unread_skipped`,
319
347
  and `older_unread: true` also lists them (see below). An untitled group chat or 1:1 is titled after
320
- its participants, as in `teams_list_chats` — in `conversations`, in
348
+ its participants, as in `teams_list_conversations` — in `conversations`, in
321
349
  `more_unread_conversations` and in `errors`. By default it does not mark
322
350
  anything read; `mark_read: true` also moves the read marker of each
323
351
  conversation returned with its messages (not `more_unread_conversations`)
@@ -329,10 +357,10 @@ Everything is optional — by default the token is captured from your browser.
329
357
  reports `marked_read: { skipped: "truncated", hint }`, and `outside_window`
330
358
  roots never count. `tz` (default
331
359
  `TEAMS_TIME_ZONE`) adds each message's `time_local`, as in
332
- `teams_read_conversation`. A channel's unread replies come grouped under
360
+ `teams_list_messages`. A channel's unread replies come grouped under
333
361
  their root post; a root you had already read is fetched and marked
334
362
  `outside_window: true` (not unread, not counted), up to 25 per call as in
335
- `teams_read_conversation`, else `{ id, missing: true }`. `cursors` — `{ "<conversation id>": "<message id>" }`
363
+ `teams_list_messages`, else `{ id, missing: true }`. `cursors` — `{ "<conversation id>": "<message id>" }`
336
364
  — returns, per conversation, only unread messages newer than its cursor
337
365
  (each read stops at the later of the read marker and the cursor; a
338
366
  conversation with nothing past its cursor is left out). Each returned
@@ -340,34 +368,38 @@ Everything is optional — by default the token is captured from your browser.
340
368
  the cursors you passed, updated with every returned conversation's
341
369
  `next_cursor` — pass it back as `cursors` next time.
342
370
  `format` (`full`, `compact` or `summary`) trims each conversation as in
343
- `teams_read_conversation`; every format keeps the conversation `id`,
371
+ `teams_list_messages`; every format keeps the conversation `id`,
344
372
  `unread_count` and `next_cursor`.
345
- - `teams_get_changes` — which chats and channels got new messages since a
373
+ - `teams_list_changed_conversations` — which chats and channels got new messages since a
346
374
  cursor: counts, not messages. Each changed conversation comes back with its
347
375
  summary, `new_message_count` (real messages only — call recordings and other
348
376
  system events, and deleted messages, are not counted),
349
377
  `new_from_others_count`, `newest_time` and, for a channel, `threads`: one
350
378
  `{ root_id, new_root, new_reply_count }` per thread the new messages landed
351
379
  in, including a thread whose root post is older than the cursor, and
352
- `after_message_id` — the value to pass to `teams_read_conversation` as
380
+ `after_message_id` — the value to pass to `teams_list_messages` as
353
381
  `after_message_id` to read exactly the messages counted (a message id is
354
382
  its arrival ms, so this is the cursor time written as an id). Without
355
383
  `cursor` it looks back 24 hours. `next_cursor` is an opaque token (base64url
356
384
  of `{"t": <epoch ms>}`; `cursor` also takes a plain ISO 8601 time) — pass it
357
385
  back to see only what arrived since. It is at-least-once: a conversation can
358
386
  come back twice, but none is skipped, and it stays put when a read failed
359
- (`errors`). `kinds` and `include_hidden` filter as in `teams_get_unread` —
387
+ (`errors`). `kinds` and `include_hidden` filter as in `teams_list_unread_messages` —
360
388
  use the same ones with a cursor as the call that returned it; `limit`
361
389
  (default 50, max 200) caps the conversations returned, the rest are named in
362
390
  `more_conversations` (each with its `after_message_id` too). Then read what
363
- changed with `teams_read_conversation`, handing on the row's
391
+ changed with `teams_list_messages`, handing on the row's
364
392
  `after_message_id` — **not** `next_cursor`, which is a time token that only
365
- `teams_get_changes` accepts (`teams_read_conversation` rejects it, and
366
- `teams_get_changes` rejects a message id):
393
+ `teams_list_changed_conversations` accepts (`teams_list_messages` rejects it, and
394
+ `teams_list_changed_conversations` rejects a message id). `view: "brief"`
395
+ answers plain text instead, one line per changed conversation —
396
+ `title — <newest ISO time | no date> — <n> new, <m> from others` (or
397
+ `could not read`), at most 120 characters — the shape mcp-host's context
398
+ groups read (this is the work group's canonical *what's new*):
367
399
 
368
400
  ```jsonc
369
401
  // first call: the last 24 hours
370
- teams_get_changes({})
402
+ teams_list_changed_conversations({})
371
403
  // → { since, total_new_messages: 5, conversations: [
372
404
  // { conversation: { id: "19:…@thread.tacv2", kind: "channel", title: "Design", … },
373
405
  // new_message_count: 3, new_from_others_count: 3, newest_time: "…",
@@ -375,9 +407,9 @@ Everything is optional — by default the token is captured from your browser.
375
407
  // threads: [{ root_id: "1791803726629", new_root: false, new_reply_count: 2 }, …] }, … ],
376
408
  // next_cursor: "eyJ0IjoxNzkxODE1MjAxMzYxfQ", next_cursor_time: "…", fetched_at }
377
409
  // read the messages it counted in one conversation: hand on the row's after_message_id
378
- teams_read_conversation({ conversation: "19:…@thread.tacv2", after_message_id: "1791728801361" })
379
- // later: only what arrived since — next_cursor goes back to teams_get_changes only
380
- teams_get_changes({ cursor: "eyJ0IjoxNzkxODE1MjAxMzYxfQ" })
410
+ teams_list_messages({ conversation: "19:…@thread.tacv2", after_message_id: "1791728801361" })
411
+ // later: only what arrived since — next_cursor goes back to teams_list_changed_conversations only
412
+ teams_list_changed_conversations({ cursor: "eyJ0IjoxNzkxODE1MjAxMzYxfQ" })
381
413
  ```
382
414
 
383
415
  A channel reply moves only the listing's `lastUpdatedMessageId` (its
@@ -390,8 +422,8 @@ Everything is optional — by default the token is captured from your browser.
390
422
  channels, newest first: each hit names its conversation (id, title, kind,
391
423
  team) and carries the message's id, ISO-8601 time, sender, `fromMe` (scan
392
424
  only), plain text, subject and `replyTo` (a channel reply's root) — read it in context
393
- with `teams_read_conversation`. `conversation` narrows to one chat or
394
- channel (id or name, as in `teams_read_conversation`), `from` to senders
425
+ with `teams_list_messages`. `conversation` narrows to one chat or
426
+ channel (id or name, as in `teams_list_messages`), `from` to senders
395
427
  whose display name contains it, `since` (ISO 8601; default the last 30 days)
396
428
  sets how far back to look, `limit` caps the hits (default 25, max 200;
397
429
  `total_hits` and `truncated` say when there were more). `source` says which
@@ -426,19 +458,91 @@ Everything is optional — by default the token is captured from your browser.
426
458
  SharePoint token captured per SharePoint host, so the first file from a given
427
459
  host may need [opening once in Teams](#sharepoint-file-download) to mint it; a
428
460
  file your account cannot open, or one that could not be fetched, comes back as
429
- metadata and its open link instead of failing.
430
- - `teams_get_activity` — the Activity feed (the bell icon), newest first:
461
+ metadata and its open link instead of failing. The caption names the
462
+ conversation beside its id (`title`, plus `participants` for an untitled
463
+ chat), titled as `teams_list_conversations` titles it.
464
+ - `teams_list_activity` — the Activity feed (the bell icon), newest first:
431
465
  mentions (including @team / @everyone), reactions, replies, meeting
432
466
  notices and missed calls across every chat and channel. Each row has its
433
467
  time (ISO 8601), `kind` (`mention`, `reaction`, `reply`, `meeting`, `call`
434
468
  or `other`) with Teams' raw type/subtype, whether you have seen it, who
435
- did it, where (`conversation_id`, title, type), the `message_id` and a
436
- plain-text preview — pass `where.conversation_id` to
437
- `teams_read_conversation` to read it in context. Filter with
469
+ did it, where (`conversation_id`, `title`, `type`, and `team` /
470
+ `participants` when known), the `message_id` and a plain-text preview. The
471
+ feed carries no name for an untitled group chat or 1:1, so `title` is
472
+ taken from the conversations listing and titled as `teams_list_conversations` titles
473
+ it (one listing read plus cached title reads for the rows returned; if that
474
+ fails the feed's own topic stands in) — pass `where.conversation_id` to
475
+ `teams_list_messages` to read it in context. Filter with
438
476
  `unread_only`, `kinds` and `since_days` (default 14, max 3650); `limit`
439
477
  (default 50, max 200). Read from the chat service, so the Activity view
440
478
  does not need to be open; it never marks anything read (`teams_mark_read`
441
479
  marks chats and channels read, not the Activity feed).
480
+ - `teams_get_transcript` — the transcript of a recorded Teams meeting, read from
481
+ its meeting chat (`conversation`: the chat's id or a substring of its title).
482
+ It reads **Teams' own copy** of the transcript — the one the meeting's Recap
483
+ tab shows — from Teams' object store with the chat-service token, so it works
484
+ **even when the organizer turned transcript download off** (only the
485
+ OneDrive copy is locked then). No SharePoint token or extra pairing is
486
+ involved. Returns the newest transcribed recording unless `recording_id`
487
+ names another, with `recording` (`recording_id`, time, `duration`,
488
+ `play_url`), `speakers`, `cue_count`, `other_recordings` (newest first, up to
489
+ 20) and `transcript`: `format: "text"` (default — one line per speaker turn,
490
+ `[hh:mm:ss] Name: words`) or `"vtt"` (the WebVTT as Teams serves it). A
491
+ transcript over 200,000 characters is cut short (`truncated: true`).
492
+ `save: true` writes `<meeting>-<time>.vtt` and `.txt` instead, like
493
+ `teams_export_messages` (a fresh folder under `dest` → `TEAMS_OUTPUT_DIR` →
494
+ `~/Downloads/microsoft-teams-mcp` locally; a zip behind a signed link on a
495
+ hosted install), and returns where. The newest 2,000 messages of the chat are
496
+ searched for recordings. Teams' copy expires after some weeks (verified: about
497
+ four): an expired transcript is an error naming that, never a silent switch
498
+ to another recording.
499
+ - `teams_export_messages` — bulk-export chats and channels to files, so thousands of
500
+ messages can be archived or searched with shell tools without any of them
501
+ entering the conversation: the result is only a manifest (where the files
502
+ are, each file's size and record count, counts, the time span, errors,
503
+ `has_more` / `cursor`), never a message. One file per conversation, named
504
+ after it (`<title>-<8-char id hash>.jsonl`; an untitled group chat is named
505
+ after its participants), plus `manifest.json`. JSONL by default — a header
506
+ record (`{"_export": {...}}`: source, account, time, arguments, the
507
+ conversation, and a note that the content is untrusted third-party text),
508
+ then one record per message, oldest first, each carrying its conversation's
509
+ `id`, `kind`, `title`, `team` (channels) and `participants` (chats: the
510
+ people seen writing, other than you) — or `format: "markdown"` for readable
511
+ transcripts, channels threaded under their root posts. `conversations`
512
+ (ids or names, one or an array; omit for every conversation), `kinds`
513
+ (`chat`, `channel`, `meeting`), `since` / `until` (by arrival; default all
514
+ history), `tz`. Each call stops at `max_items` messages (default 5000, max
515
+ 50000) or `budget_seconds` (default 90, max 600); with `has_more: true`, pass
516
+ the `cursor` back (alone, or with `max_items` / `budget_seconds`) to continue
517
+ the SAME export — on disk into the same folder, a conversation split across
518
+ calls continuing in `<name>.part-0002.jsonl` beside its first file (and
519
+ `manifest.part-0002.json`). The budget is checked between conversations
520
+ and between pages of a read: a long read past it is dropped and redone by
521
+ the next call (except the first conversation of a call, which always
522
+ finishes, so every call makes progress). Conversations are exported in id
523
+ order; the cursor normally lists the ones still to do, but when that list is
524
+ too long for a cursor it holds only the id to go on from, and the next call
525
+ re-lists conversations from there — so a conversation that first appears
526
+ between calls with an id before that point is not in this export. A
527
+ rejected credential, rate limiting that
528
+ outlasts three backed-off retries, or a Teams-side failure stops the call
529
+ early with a cursor, keeping what was written (re-authenticate and resume);
530
+ a conversation that cannot be read (403/404) is listed in `errors` and
531
+ skipped. Where the files go depends on the install: a local (stdio) install
532
+ writes a fresh folder under `dest` → `TEAMS_OUTPUT_DIR` →
533
+ `~/Downloads/microsoft-teams-mcp` and returns **absolute local paths**; a
534
+ hosted install (mcp-host sets `MCP_BLOB_BASE_URL` and
535
+ `MCP_BLOB_SIGNING_KEY`) uploads one zip per call and returns a signed
536
+ download link that expires after an hour (`url_expires_at`). With
537
+ `attachments: true` it also saves each message's inline images and shared
538
+ files (SharePoint, up to 25 MB each; four downloads at a time) under
539
+ `attachments/<8-char conversation hash>/<message id>-<name>` in the same
540
+ folder or zip, and each message's record lists them by that relative path
541
+ (Markdown transcripts link them); an attachment that cannot be fetched — a
542
+ file your account cannot open, a SharePoint host with no token yet, one too
543
+ large — is listed with `skipped` and the reason instead, and never fails the
544
+ export (`counts.attachments` / `counts.attachments_skipped`). Never marks
545
+ anything read.
442
546
  - `teams_healthcheck` — resolves the token the way every tool does
443
547
  (capturing one on a cold start) and probes the chat service with one
444
548
  conversations listing. Reports where the token came from and when it
@@ -471,7 +575,7 @@ Everything is optional — by default the token is captured from your browser.
471
575
  already at or past the target, nothing is written (no confirmation is
472
576
  asked) and `status` is `already_read`. Only you see your read marker.
473
577
 
474
- `teams_read_conversation` and `teams_get_unread` also write when — and only
578
+ `teams_list_messages` and `teams_list_unread_messages` also write when — and only
475
579
  when — you pass `mark_read: true` (see above). Every other tool is
476
580
  read-only, and nothing marks anything read unless you ask it to.
477
581
 
@@ -486,7 +590,7 @@ mentions, the quoted message, the reaction, or the message your read marker
486
590
  moves to and where it was, with everything other people wrote (titles,
487
591
  names, quoted text) fenced as untrusted — plus a `confirmToken`; only a
488
592
  repeat call with that token writes. With `mark_read` on
489
- `teams_read_conversation` / `teams_get_unread`, that first call returns just
593
+ `teams_list_messages` / `teams_list_unread_messages`, that first call returns just
490
594
  the preview (no messages); the repeat call reads and marks. The token is single-use, expires, and is
491
595
  bound to the exact arguments: change anything between the two calls and it
492
596
  is refused with a fresh preview.
@@ -504,7 +608,7 @@ as the real guard on what gets posted.
504
608
 
505
609
  **Try it in your own notes first.** The conversation `48:notes` (also by the
506
610
  name `notes` or `self`) is your Teams self-chat ("notes to self"): every write
507
- accepts it, `teams_read_conversation` reads it, nobody else sees it, and
611
+ accepts it, `teams_list_messages` reads it, nobody else sees it, and
508
612
  it is the safe place to see what a message or reaction will look like. Every
509
613
  other `48:` system conversation (calendar and the like) is refused.
510
614
 
@@ -547,23 +651,23 @@ instead.
547
651
  message id is its arrival time in epoch milliseconds, so "newer than the
548
652
  last message I saw" is a numeric comparison and a cursor is just that
549
653
  message's id — `next_cursor` is a plain id string, passed back unchanged as
550
- `after_message_id` (`teams_read_conversation`) or inside `cursors`
551
- (`teams_get_unread`). The server keeps no state and **no cache**: every
654
+ `after_message_id` (`teams_list_messages`) or inside `cursors`
655
+ (`teams_list_unread_messages`). The server keeps no state and **no cache**: every
552
656
  call reads Teams live, and `fetched_at` (ISO 8601, UTC) says when. There is
553
657
  no refresh flag because there is nothing to refresh. A cursor never moves
554
658
  the read marker; with `limit` / `per_conversation_limit` the newest
555
659
  messages are kept and `next_cursor` jumps to the newest, so check
556
660
  `truncated` before assuming nothing was skipped. **Two cursor kinds:**
557
- `teams_get_changes` has its own *time* cursor (an opaque token, or an ISO
558
- 8601 time) that goes back only to `teams_get_changes`; it is not a message
661
+ `teams_list_changed_conversations` has its own *time* cursor (an opaque token, or an ISO
662
+ 8601 time) that goes back only to `teams_list_changed_conversations`; it is not a message
559
663
  id. Each of its conversation rows carries the message-id cursor to hand on,
560
- `after_message_id`, for `teams_read_conversation` (or `teams_get_unread`'s
664
+ `after_message_id`, for `teams_list_messages` (or `teams_list_unread_messages`'s
561
665
  `cursors`). Each tool rejects the other kind.
562
666
  - <a id="paging-from-a-time"></a>**Paging from a time (ingestion and
563
- backfill).** `teams_read_conversation` and `teams_get_unread` take `from`:
667
+ backfill).** `teams_list_messages` and `teams_list_unread_messages` take `from`:
564
668
  a UTC time (ISO 8601; one with no zone is read as UTC) or a previous
565
669
  result's `next_from`. They return what arrived at or after it **oldest
566
- first**, at most `limit` (default 50; `teams_get_unread` pools every
670
+ first**, at most `limit` (default 50; `teams_list_unread_messages` pools every
567
671
  conversation into one `messages` list, each message carrying its
568
672
  `conversation_id`), plus `has_more`, `next_from` and `next_from_time`.
569
673
  Pass `next_from` back as `from` until `has_more` is false; it is returned
@@ -575,13 +679,13 @@ instead.
575
679
  messages newest first with no way to seek, so each call reads everything
576
680
  that changed since its `from` — a deep backfill gets faster as it catches
577
681
  up — and a conversation with more than 20,000 messages since `from`
578
- cannot be paged oldest first: `teams_read_conversation` reports an error
579
- rather than skip any, and `teams_get_unread` returns what arrived after the
682
+ cannot be paged oldest first: `teams_list_messages` reports an error
683
+ rather than skip any, and `teams_list_unread_messages` returns what arrived after the
580
684
  oldest point it reached, names the stretch it could not read in
581
685
  `incomplete` (`unread_not_read_from` / `unread_not_read_until`), and keeps
582
686
  `next_from` moving — so one oversized conversation never stalls the stream.
583
687
  `from` replaces `since` /
584
- `after_message_id` / `mark_read` (and, for `teams_get_unread`, `since_days`,
688
+ `after_message_id` / `mark_read` (and, for `teams_list_unread_messages`, `since_days`,
585
689
  `cursors`, the per-conversation limits, `older_unread` and
586
690
  `format: "summary"`).
587
691
 
@@ -600,7 +704,7 @@ instead.
600
704
  tell on its own: `lastimreceivedtime` moves for a call recording too,
601
705
  `lastMessage` can be stale, and a chat you never opened has no marker at
602
706
  all. So the listing only nominates candidates (anything past the marker,
603
- or no marker), and `unread_only` and `teams_get_unread` read each
707
+ or no marker), and `unread_only` and `teams_list_unread_messages` read each
604
708
  candidate's messages past its marker (four at a time) and keep only those
605
709
  holding a real unread message, with its `unread_count`. Without
606
710
  `unread_only` the list tools' `unread` is just that cheap hint, marked
@@ -615,8 +719,8 @@ instead.
615
719
  you never open. A candidate with no activity at all inside the window is
616
720
  not even read. Whatever the window leaves out is counted in
617
721
  `older_unread_skipped` (with a hint to widen `since_days`), never dropped
618
- silently. `older_unread: true` (on `teams_get_unread`, and on
619
- `teams_list_chats` with `unread_only`) also lists them in
722
+ silently. `older_unread: true` (on `teams_list_unread_messages`, and on
723
+ `teams_list_conversations` with `unread_only`) also lists them in
620
724
  `older_unread_conversations` — `id`, `kind`, `title`, `team` (a channel's),
621
725
  `lastActivity`, most recent first — with an `unread_count` for each one
622
726
  whose messages were already read to place it outside the window; one with
@@ -625,9 +729,9 @@ instead.
625
729
  be only system events). Muted chats: the conversation listing marks a chat
626
730
  you muted with `properties.alerts: "false"` (verified live 2026-10-12: 8 of
627
731
  1,435 conversations, every other one `"true"` or absent), surfaced as
628
- `muted: true`. `teams_get_unread` leaves them out without reading them and
732
+ `muted: true`. `teams_list_unread_messages` leaves them out without reading them and
629
733
  counts them in `muted_skipped`; `include_muted` adds them back. The list
630
- tools' `unread_only` still includes them. `teams_read_conversation` is not windowed: it takes an explicit
734
+ tools' `unread_only` still includes them. `teams_list_messages` is not windowed: it takes an explicit
631
735
  `since` and `limit`. This server only reads the marker; it never moves it.
632
736
  - **The token only goes to Teams.** The chat-service token is sent to the
633
737
  chat-service base and, for inline images, only to https hosts under
@@ -642,23 +746,23 @@ instead.
642
746
  separate SharePoint token and fetches the file through SharePoint's v2.1
643
747
  shares API — see below.
644
748
  - **Scope grows quietly.** If you see a `not in declared set` error, the
645
- extension's approved scope is behind the server's declared one — revoke
646
- and re-pair `microsoft-teams-mcp` in the ContextMint Bridge popup.
749
+ extension's approved scope is behind the server's declared one — approve
750
+ `microsoft-teams-mcp` in the ContextMint Bridge popup.
647
751
 
648
752
  ## Upgrading from 0.4
649
753
 
650
754
  0.5 only adds arguments and fields, except for these changes in behaviour:
651
755
 
652
- - **Ambiguous names in `teams_read_conversation`:** a name that matches
756
+ - **Ambiguous names in `teams_list_messages`:** a name that matches
653
757
  several conversations used to fail with an error listing the candidates. It
654
758
  now succeeds with `{ ambiguous: true, query, match_count, candidates, hint }`
655
759
  and no messages. Check for `ambiguous` before reading `messages` or
656
760
  `threads`. Send, react and attachment still fail on an ambiguous name.
657
- - **Muted chats in `teams_get_unread`:** chats you muted in Teams are left out
761
+ - **Muted chats in `teams_list_unread_messages`:** chats you muted in Teams are left out
658
762
  and counted in `muted_skipped`. Pass `include_muted: true` for the old
659
763
  behaviour.
660
- - **Read tools are no longer annotated read-only:** `teams_read_conversation`
661
- and `teams_get_unread` take an opt-in `mark_read` flag, so they are published
764
+ - **Read tools are no longer annotated read-only:** `teams_list_messages`
765
+ and `teams_list_unread_messages` take an opt-in `mark_read` flag, so they are published
662
766
  with `readOnly: false`. A client that auto-approves only read-only tools may
663
767
  now ask before each read. Without `mark_read` they still never write.
664
768
 
@@ -668,9 +772,9 @@ instead.
668
772
  changed shape. If you script against them:
669
773
 
670
774
  - **Removed tools:** `teams_get_open_chat_messages` and
671
- `teams_get_open_channel_posts` — use `teams_read_conversation`, which reads
775
+ `teams_get_open_channel_posts` — use `teams_list_messages`, which reads
672
776
  any chat or channel by id or name without it being open.
673
- - **`teams_get_activity`:** rows now come from the Activity feed itself.
777
+ - **`teams_list_activity`:** rows now come from the Activity feed itself.
674
778
  `title` and `location` are replaced by `type`/`subtype`/`kind`, `from`,
675
779
  `where: { conversation_id, title, type }`, `message_id`, `reply_chain_id`
676
780
  and `preview`; `time` is ISO 8601 (it was prose like "1:19 PM"); `read` is
@@ -688,7 +792,7 @@ changed shape. If you script against them:
688
792
  - **Chat titles:** untitled chats are titled `(1:1 chat)` (or the other
689
793
  person's name), `Group chat: A; B; C +N` (with a `participants` array), or
690
794
  `(untitled group chat)` — no longer the last sender's name or
691
- `(untitled chat)`. Plain `teams_list_chats` / `teams_list_teams_and_channels`
795
+ `(untitled chat)`. Plain `teams_list_conversations` / `teams_list_channels`
692
796
  listings put `favorite` and then `pinned` conversations first.
693
797
  - **Unread:** confirmed by reading messages after your read point (call
694
798
  recordings and other system events never count), hidden channels are left