@chrischall/microsoft-teams-mcp 0.10.0 → 0.12.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.10.0"
10
+ "version": "0.12.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.10.0",
18
+ "version": "0.12.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.10.0",
4
+ "version": "0.12.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
@@ -36,7 +36,7 @@ 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
37
  for it: `teams_mark_read`, or `mark_read: true` on `teams_list_messages`
38
38
  / `teams_list_unread_messages`, moves your read marker forward. The writes —
39
- `teams_send_message`, `teams_react`, marking read, renaming a group chat
39
+ `teams_send_message`, `teams_edit_message`, `teams_delete_message`, `teams_react`, marking read, renaming a group chat
40
40
  or adding and removing its members (`teams_rename_chat`,
41
41
  `teams_add_chat_members`, `teams_remove_chat_members`), and starting a new
42
42
  one (`teams_create_group_chat`) — go through the same
@@ -47,9 +47,10 @@ chat-service API and change nothing until you confirm (see
47
47
 
48
48
  The bridge remembers a pairing only for the exact set of domains it approved,
49
49
  and approving a grant replaces the stored list of header captures. So all of
50
- this server's captures (chat service, SharePoint, Substrate search) declare the
51
- **same** scope: the three domains `teams.cloud.microsoft`, `sharepoint.com` and
52
- `substrate.office.com`, plus the chat-service and search captures and one
50
+ this server's captures (chat service, SharePoint, Substrate search, meeting
51
+ recaps) declare the **same** scope: the three domains `teams.cloud.microsoft`,
52
+ `sharepoint.com` and `substrate.office.com`, plus the chat-service, search and
53
+ meeting-recap captures and one
53
54
  capture per SharePoint host the server has already captured from (usually just
54
55
  your own OneDrive host — see [SharePoint file download](#sharepoint-file-download)). Each capture
55
56
  still reads only the one header it needs. The SharePoint hosts are remembered
@@ -60,7 +61,9 @@ succeeds.
60
61
  Up to 0.7, each capture declared only its own domain, so the bridge asked to
61
62
  pair again (or to update its grants) whenever the server moved between chats,
62
63
  search and files. Upgrading from 0.7 asks to pair **once** more, for the
63
- combined scope; after that it stays paired.
64
+ combined scope; after that it stays paired. Upgrading to the release that added
65
+ `teams_get_meeting_recap` asks once more, because the recap capture
66
+ (`teams.cloud.microsoft/api/mcps/*`) is new to that scope.
64
67
 
65
68
  If you run the bridge in more than one browser or browser profile, each one is a
66
69
  different extension identity, and the server trusts only the one it paired
@@ -151,6 +154,38 @@ read only from the request header, never from page storage.
151
154
  > matches word prefixes, not "display name contains". A redacted response is
152
155
  > in `tests/fixtures/substrate-query-response.json`.
153
156
 
157
+ ## Meeting recaps
158
+
159
+ `teams_get_meeting_recap` reads what a meeting's **Recap** tab shows, from the
160
+ service that tab uses: the Meeting Collab Platform Service
161
+ (`GET https://teams.cloud.microsoft/api/mcps/<region>/collab/readcollabobject/V2/…`).
162
+ That service accepts neither the chat-service token nor the Substrate one, so
163
+ recaps use a **fourth token**, captured off the request the Teams tab makes
164
+ when you open a meeting chat's Recap tab, and cached in
165
+ `~/.microsoft-teams-mcp/recap-token.json` (it lives about an hour).
166
+
167
+ - **Open a Recap tab once.** The first recap, and the first after the token
168
+ expires, may need you to open any meeting chat's Recap tab in Teams while the
169
+ capture waits (`TEAMS_CAPTURE_TIMEOUT`, default 30s).
170
+ - **One recap per occurrence.** The meeting is found from the chat's own
171
+ thread (organizer, tenant and the calendar `iCalUid`); a recurring
172
+ meeting's occurrence is that id with its date written in. Without `date`,
173
+ the tool reads the chat for the days a call or recording happened and
174
+ returns the newest of those (up to 5 tried) whose recap holds anything.
175
+ - **AI notes are reported, not read.** When Teams made Intelligent Recap AI
176
+ notes, the result says so (`ai_summary`). Their text is a per-user file that
177
+ Teams shows only to licensed users; reading it for anyone else was refused
178
+ (403) live, so the tool does not try.
179
+
180
+ > **Verified live 2026-11-10** against 40 meeting chats: the URL and token
181
+ > above, the occurrence id (bytes 16–19 of the `iCalUid` = year, month, day),
182
+ > an empty `resources` list for an occurrence with nothing recorded, and the
183
+ > resource types `Recording`, `TranscriptV2`, `transcript`, `notes`,
184
+ > `AttendanceReport`, `MeetingChat`, `MeetingStage` and `AISummary`. A
185
+ > redacted response is in `tests/fixtures/recap-collab-object.json`. The
186
+ > region (`us`) is the one this tenant used; set `TEAMS_MCPS_REGION` if yours
187
+ > differs.
188
+
154
189
  ## Install
155
190
 
156
191
  ```sh
@@ -210,6 +245,8 @@ Everything is optional — by default the token is captured from your browser.
210
245
  | `TEAMS_CAPTURE_TIMEOUT` | Seconds to wait for the Teams tab to issue a chat-service request. Defaults to `30`. The bridge deadline is derived from it (window + 15s). |
211
246
  | `TEAMS_TOKEN_CACHE` | `false` to keep the captured token in memory only. Defaults to on. |
212
247
  | `TEAMS_TOKEN_FILE` | Where the captured token is cached. Defaults to `~/.microsoft-teams-mcp/token.json`. |
248
+ | `TEAMS_RECAP_TOKEN_FILE` | Where the captured meeting-recap token is cached. Defaults to `~/.microsoft-teams-mcp/recap-token.json`. `TEAMS_TOKEN_CACHE=false` keeps it in memory too. |
249
+ | `TEAMS_MCPS_REGION` | The region in the meeting-recap API path (`teams.cloud.microsoft/api/mcps/<region>`). Defaults to `us`. |
213
250
  | `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. |
214
251
  | `TEAMS_SHAREPOINT_TOKEN_FILE` | Where the captured SharePoint token (one for every SharePoint host, used to download shared files) is cached. Defaults to `~/.microsoft-teams-mcp/sharepoint-tokens.json`. `TEAMS_TOKEN_CACHE=false` keeps them in memory too. |
215
252
  | `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. |
@@ -286,7 +323,15 @@ Everything is optional — by default the token is captured from your browser.
286
323
  `limit` (default 50, max 500).
287
324
  - `teams_list_messages` — read any chat or channel by id or name,
288
325
  oldest first: sender, time (UTC, ISO 8601), text, subject, edited/deleted
289
- flags and attachments. A channel comes back as threads (root post + replies).
326
+ flags and attachments. A formatted message also carries `content_html` —
327
+ its body as sanitised HTML (bold, italic, lists, links, code, quotes,
328
+ headings, tables and @mention spans; every other tag and attribute
329
+ dropped) — and any message with them carries `mentions`
330
+ (`[{mri, displayName}]`, who was @mentioned) and `links`
331
+ (`[{href, text}]`, each link with the text it was shown as). A plain
332
+ message has none of the three: its `text` says everything. In `text` a
333
+ numbered list keeps its numbers (`1. `, `2. `) and a bulleted one its `- `.
334
+ A channel comes back as threads (root post + replies).
290
335
  A thread whose root post is older than the window (a reply came in after
291
336
  `since`, `limit` or `after_message_id` cut the read) still shows its root:
292
337
  it is fetched by id and marked `outside_window: true` — context only, not
@@ -504,6 +549,20 @@ Everything is optional — by default the token is captured from your browser.
504
549
  (default 50, max 200). Read from the chat service, so the Activity view
505
550
  does not need to be open; it never marks anything read (`teams_mark_read`
506
551
  marks chats and channels read, not the Activity feed).
552
+ - `teams_get_meeting_recap` — what a meeting's Recap tab shows, from its
553
+ meeting chat (`conversation`: the chat's id or a substring of its title):
554
+ `recap.recordings` (start, end, `duration`, play `url`), `recap.transcripts`
555
+ (start and duration — read the text with `teams_get_transcript`),
556
+ `recap.notes` (the Loop meeting-notes link), `recap.attendance_reports`,
557
+ `recap.files` (shared in the meeting chat, or on stage such as a whiteboard:
558
+ `shared_in`), `recap.ai_summary` (whether Teams made AI notes; their text is
559
+ not read) and `recap.other` (any type not listed). Sections with nothing are
560
+ left out. For a recurring meeting, `date` (YYYY-MM-DD, the UTC day it met)
561
+ picks the occurrence; by default the newest day the chat shows a call on
562
+ that has a recap is returned as `occurrence`, with `series` (what belongs to
563
+ the whole series, e.g. files shared across it) and `other_occurrences`
564
+ (other call days, newest first). Uses its own token (see
565
+ [Meeting recaps](#meeting-recaps)). Read-only.
507
566
  - `teams_get_transcript` — the transcript of a recorded Teams meeting, read from
508
567
  its meeting chat (`conversation`: the chat's id or a substring of its title).
509
568
  It reads **Teams' own copy** of the transcript — the one the meeting's Recap
@@ -534,8 +593,11 @@ Everything is optional — by default the token is captured from your browser.
534
593
  conversation, and a note that the content is untrusted third-party text),
535
594
  then one record per message, oldest first, each carrying its conversation's
536
595
  `id`, `kind`, `title`, `team` (channels) and `participants` (chats: the
537
- people seen writing, other than you) — or `format: "markdown"` for readable
538
- transcripts, channels threaded under their root posts. `conversations`
596
+ people seen writing, other than you) and the message's `content_html`,
597
+ `mentions` and `links` when it has them — or `format: "markdown"` for readable
598
+ transcripts, channels threaded under their root posts, a formatted message
599
+ rendered as Markdown (bold, italic, lists, links with their text, code,
600
+ quotes, tables, mentions as `@name`). `conversations`
539
601
  (ids or names, one or an array; omit for every conversation), `kinds`
540
602
  (`chat`, `channel`, `meeting`), `since` / `until` (by arrival; default all
541
603
  history), `tz`. Each call stops at `max_items` messages (default 5000, max
@@ -581,14 +643,41 @@ Everything is optional — by default the token is captured from your browser.
581
643
  **Write** (each asks you to confirm first — see [Writes](#writes)):
582
644
 
583
645
  - `teams_send_message` — post as you to any chat or channel, by id or name.
584
- `text` is plain text: it is escaped, newlines are kept, and `:key:`
585
- shortcodes (`:smile:`, `:1f389_partypopper:`) become Teams emoji.
646
+ `text` is plain text by default: it is escaped, newlines are kept, and
647
+ `:key:` shortcodes become emoji: Teams' own animated ones for `like`,
648
+ `heart`, `laugh`, `surprised`, `sad`, `angry`, `smile`, `wink`, `cool`,
649
+ `hearteyes`, `fire` and `party`, and the plain character for about 50
650
+ common names (`:rocket:`, `:tada:`, `:thumbsup:`, `:eyes:`,
651
+ `:white_check_mark:`, …) and for unicode-style keys
652
+ (`:1f680_rocket:`). Teams has no animated image for many code points, so
653
+ only the twelve names it is known to have get one.
654
+ `format: "markdown"` reads it as Markdown instead: `**bold**`, `*italic*`,
655
+ `~~strike~~`, `` `inline code` ``, fenced code blocks, bulleted (`- `) and
656
+ numbered (`1. `) lists nested by indenting, `[link text](https://…)`
657
+ (http, https and mailto only), blank-line paragraphs and line breaks;
658
+ emoji and mentions work as in plain text. Anything else — raw HTML,
659
+ headings, quotes, images — is escaped and shown as written. The preview's
660
+ `willSend.content` is the exact HTML that will be posted.
586
661
  `reply_to` posts into a channel post's thread — it must be a root post in
587
662
  that channel, not a reply (in a chat it quote-replies that message); `quote` quote-replies a message anywhere; `mentions`
588
663
  @-mentions people by MRI or by a display name matched among the
589
664
  conversation's recent senders (an ambiguous name is refused with the
590
665
  candidates). The result says whether the post was found again by reading
591
666
  the conversation back (`verified`).
667
+ - `teams_edit_message` — replace the text of one of your own messages:
668
+ `conversation`, `message_id` (one you sent — someone else's, a deleted
669
+ message or a system event is refused before any preview), `text`, and
670
+ `format` / `mentions` as for `teams_send_message`. A quote-reply keeps its
671
+ quote. The preview shows the current text, the new text and the exact HTML
672
+ that will replace it; text that renders exactly as the message already
673
+ does, mentioning the same people, changes nothing (`status: "unchanged"`). The message is read back to
674
+ verify the edit (`verified`).
675
+ - `teams_delete_message` — delete one of your own messages: `conversation`
676
+ and `message_id` (one you sent — someone else's or a system event is
677
+ refused before any preview). One already deleted is reported as
678
+ `status: "already_deleted"` with nothing asked or sent. The preview shows
679
+ the message that will go; the message is read back to verify it is
680
+ deleted (`verified`). This MCP cannot bring a deleted message back.
592
681
  - `teams_react` — add or (with `remove: true`) withdraw your reaction on a
593
682
  message: an emoji or name (`thumbsup`/👍, `heart`/❤️, `laugh`/😆,
594
683
  `surprised`/😮, `sad`/😢, `angry`/😡, `checkmark`/✅) or any raw Teams
@@ -671,13 +760,13 @@ read-only, and nothing marks anything read unless you ask it to.
671
760
 
672
761
  ## Writes
673
762
 
674
- A post, a reaction, a rename, a membership change and a new group chat are
763
+ A post, an edit, a delete, a reaction, a rename, a membership change and a new group chat are
675
764
  visible to everyone in the conversation, and marking read clears your unread badges, so each
676
765
  write asks you first. A
677
766
  client that can show a confirmation prompt (Claude Code) shows one. On a
678
767
  client that cannot, the first call changes nothing and returns a
679
768
  `confirmation-required` preview — the conversation, the exact text, any
680
- mentions, the quoted message, the reaction, the message your read marker
769
+ mentions, the quoted message, a message's current and new text, the reaction, the message your read marker
681
770
  moves to and where it was, a chat's current and new name, or who is added or
682
771
  removed, with everything other people wrote (titles,
683
772
  names, quoted text) fenced as untrusted — plus a `confirmToken`; only a
@@ -700,7 +789,7 @@ as the real guard on what gets posted.
700
789
 
701
790
  **Try it in your own notes first.** The conversation `48:notes` (also by the
702
791
  name `notes` or `self`) is your Teams self-chat ("notes to self"): sending,
703
- reacting and marking read accept it (the group-chat tools do not — it has no
792
+ editing, deleting, reacting and marking read accept it (the group-chat tools do not — it has no
704
793
  one else in it), `teams_list_messages` reads it, nobody else sees it, and
705
794
  it is the safe place to see what a message or reaction will look like. Every
706
795
  other `48:` system conversation (calendar and the like) is refused.
@@ -710,14 +799,20 @@ timeout, a dropped connection or a 5xx after the request went out), the
710
799
  result is `status: "unknown"` — the message may already be there, so read the
711
800
  conversation before sending again. A 4xx is a refusal and stays an error. A
712
801
  reaction Teams does not confirm is settled by reading the message back, and
713
- is `status: "unknown"` only when that does not show the change. A read-marker
802
+ is `status: "unknown"` only when that does not show the change; so is an
803
+ edit or a delete. A read-marker
714
804
  move Teams does not confirm is `status: "unknown"` (`marked_read: false` with a
715
805
  `mark_read_warning` from the read tools); moving it again to the same message
716
806
  is harmless. Marking read (`PUT …/properties?name=consumptionhorizon`) was
717
807
  verified live on `48:notes` on 2026-10-12. A rename or membership change
718
808
  Teams does not confirm is settled the same way, by reading the chat back;
719
809
  renaming, adding and removing (`/threads/{id}/properties?name=topic` and
720
- `/threads/{id}/members/{mri}`) were verified live on 2026-11-09. Threaded channel replies, @mentions,
810
+ `/threads/{id}/members/{mri}`) were verified live on 2026-11-09. Markdown
811
+ sends, editing a message (`PUT …/messages/{id}`) and deleting one
812
+ (`DELETE …/messages/{id}`) were verified live on `48:notes` on 2026-11-11;
813
+ @mentions (in a Markdown send, and kept through an edit) were verified in a
814
+ group chat the same day; editing and deleting in a channel have not been
815
+ tried yet. Threaded channel replies,
721
816
  removing a reaction and the ✅ reaction's key follow Teams' documented or
722
817
  inferred shapes but have not been verified against a live tenant yet.
723
818
 
@@ -45,6 +45,16 @@ export const SUBSTRATE_CAPTURE_DECL = {
45
45
  path: '/searchservice/*',
46
46
  headerName: 'authorization',
47
47
  };
48
+ /**
49
+ * The meeting-recap capture: a Meeting Collab Platform Service call
50
+ * (`/api/mcps/*`) the Teams tab makes when a meeting's Recap tab opens. Same
51
+ * host as the chat service, so no new trust domain — only a new header capture.
52
+ */
53
+ export const RECAP_CAPTURE_DECL = {
54
+ host: 'teams.cloud.microsoft',
55
+ path: '/api/mcps/*',
56
+ headerName: 'authorization',
57
+ };
48
58
  /**
49
59
  * Every domain the server captures from. `sharepoint.com` is the family domain:
50
60
  * the bridge accepts any `*.sharepoint.com` host under it.
@@ -64,13 +74,13 @@ export function sharePointCaptureDecl(host) {
64
74
  return { host: host.toLowerCase(), path: '/*', headerName: 'authorization' };
65
75
  }
66
76
  /**
67
- * The capture headers every hello declares: the chat-service and search
68
- * captures, then one per granted SharePoint host (deduplicated, sorted, and only
77
+ * The capture headers every hello declares: the chat-service, search and
78
+ * recap captures, then one per granted SharePoint host (deduplicated, sorted, and only
69
79
  * concrete SharePoint hosts), so the list is the same whichever capture runs.
70
80
  */
71
81
  export function bridgeCaptureDecls(sharePointHosts) {
72
82
  const hosts = [...new Set([...sharePointHosts].map((h) => h.toLowerCase()).filter(isSharePointHost))].sort();
73
- return [{ ...CAPTURE_DECL }, { ...SUBSTRATE_CAPTURE_DECL }, ...hosts.map(sharePointCaptureDecl)];
83
+ return [{ ...CAPTURE_DECL }, { ...SUBSTRATE_CAPTURE_DECL }, { ...RECAP_CAPTURE_DECL }, ...hosts.map(sharePointCaptureDecl)];
74
84
  }
75
85
  /** Where the remembered SharePoint hosts are kept: beside the SharePoint token cache. */
76
86
  export function bridgeScopePath(env = process.env) {