@chrischall/microsoft-teams-mcp 0.9.0 → 0.11.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +79 -10
- package/dist/bridge-scope.js +13 -3
- package/dist/bundle.js +701 -113
- package/dist/chatsvc.js +49 -0
- package/dist/index.js +6 -1
- package/dist/recap-auth.js +44 -0
- package/dist/recap-token-cache.js +50 -0
- package/dist/recap.js +325 -0
- package/dist/substrate.js +2 -1
- package/dist/tools/group-chat.js +144 -12
- package/dist/tools/people.js +8 -4
- package/dist/tools/recap.js +122 -0
- package/dist/version.js +1 -1
- package/mint.yaml +9 -0
- package/package.json +1 -1
- package/server.json +17 -3
|
@@ -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
|
+
"version": "0.11.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.
|
|
18
|
+
"version": "0.11.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.
|
|
4
|
+
"version": "0.11.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,9 +36,10 @@ 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,
|
|
39
|
+
`teams_send_message`, `teams_react`, marking read, renaming a group chat
|
|
40
40
|
or adding and removing its members (`teams_rename_chat`,
|
|
41
|
-
`teams_add_chat_members`, `teams_remove_chat_members`)
|
|
41
|
+
`teams_add_chat_members`, `teams_remove_chat_members`), and starting a new
|
|
42
|
+
one (`teams_create_group_chat`) — go through the same
|
|
42
43
|
chat-service API and change nothing until you confirm (see
|
|
43
44
|
[Writes](#writes)).
|
|
44
45
|
|
|
@@ -46,9 +47,10 @@ chat-service API and change nothing until you confirm (see
|
|
|
46
47
|
|
|
47
48
|
The bridge remembers a pairing only for the exact set of domains it approved,
|
|
48
49
|
and approving a grant replaces the stored list of header captures. So all of
|
|
49
|
-
this server's captures (chat service, SharePoint, Substrate search
|
|
50
|
-
**same** scope: the three domains `teams.cloud.microsoft`,
|
|
51
|
-
`substrate.office.com`, plus the chat-service
|
|
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
|
|
52
54
|
capture per SharePoint host the server has already captured from (usually just
|
|
53
55
|
your own OneDrive host — see [SharePoint file download](#sharepoint-file-download)). Each capture
|
|
54
56
|
still reads only the one header it needs. The SharePoint hosts are remembered
|
|
@@ -59,7 +61,9 @@ succeeds.
|
|
|
59
61
|
Up to 0.7, each capture declared only its own domain, so the bridge asked to
|
|
60
62
|
pair again (or to update its grants) whenever the server moved between chats,
|
|
61
63
|
search and files. Upgrading from 0.7 asks to pair **once** more, for the
|
|
62
|
-
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.
|
|
63
67
|
|
|
64
68
|
If you run the bridge in more than one browser or browser profile, each one is a
|
|
65
69
|
different extension identity, and the server trusts only the one it paired
|
|
@@ -126,8 +130,8 @@ read only from the request header, never from page storage.
|
|
|
126
130
|
another capture for 10 minutes. `mode: "substrate"` fails instead;
|
|
127
131
|
`mode: "scan"` never touches Substrate.
|
|
128
132
|
|
|
129
|
-
- **It also finds people.** `teams_add_chat_members
|
|
130
|
-
`teams_remove_chat_members` use the same token to look a person up in your
|
|
133
|
+
- **It also finds people.** `teams_add_chat_members`,
|
|
134
|
+
`teams_remove_chat_members` and `teams_create_group_chat` use the same token to look a person up in your
|
|
131
135
|
organisation's directory (Substrate's people suggestions) when a name is not
|
|
132
136
|
in your chats, or when you pass an email address. A lookup is an explicit
|
|
133
137
|
request, so it always tries a fresh capture rather than honouring the
|
|
@@ -150,6 +154,38 @@ read only from the request header, never from page storage.
|
|
|
150
154
|
> matches word prefixes, not "display name contains". A redacted response is
|
|
151
155
|
> in `tests/fixtures/substrate-query-response.json`.
|
|
152
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
|
+
|
|
153
189
|
## Install
|
|
154
190
|
|
|
155
191
|
```sh
|
|
@@ -209,6 +245,8 @@ Everything is optional — by default the token is captured from your browser.
|
|
|
209
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). |
|
|
210
246
|
| `TEAMS_TOKEN_CACHE` | `false` to keep the captured token in memory only. Defaults to on. |
|
|
211
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`. |
|
|
212
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. |
|
|
213
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. |
|
|
214
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. |
|
|
@@ -503,6 +541,20 @@ Everything is optional — by default the token is captured from your browser.
|
|
|
503
541
|
(default 50, max 200). Read from the chat service, so the Activity view
|
|
504
542
|
does not need to be open; it never marks anything read (`teams_mark_read`
|
|
505
543
|
marks chats and channels read, not the Activity feed).
|
|
544
|
+
- `teams_get_meeting_recap` — what a meeting's Recap tab shows, from its
|
|
545
|
+
meeting chat (`conversation`: the chat's id or a substring of its title):
|
|
546
|
+
`recap.recordings` (start, end, `duration`, play `url`), `recap.transcripts`
|
|
547
|
+
(start and duration — read the text with `teams_get_transcript`),
|
|
548
|
+
`recap.notes` (the Loop meeting-notes link), `recap.attendance_reports`,
|
|
549
|
+
`recap.files` (shared in the meeting chat, or on stage such as a whiteboard:
|
|
550
|
+
`shared_in`), `recap.ai_summary` (whether Teams made AI notes; their text is
|
|
551
|
+
not read) and `recap.other` (any type not listed). Sections with nothing are
|
|
552
|
+
left out. For a recurring meeting, `date` (YYYY-MM-DD, the UTC day it met)
|
|
553
|
+
picks the occurrence; by default the newest day the chat shows a call on
|
|
554
|
+
that has a recap is returned as `occurrence`, with `series` (what belongs to
|
|
555
|
+
the whole series, e.g. files shared across it) and `other_occurrences`
|
|
556
|
+
(other call days, newest first). Uses its own token (see
|
|
557
|
+
[Meeting recaps](#meeting-recaps)). Read-only.
|
|
506
558
|
- `teams_get_transcript` — the transcript of a recorded Teams meeting, read from
|
|
507
559
|
its meeting chat (`conversation`: the chat's id or a substring of its title).
|
|
508
560
|
It reads **Teams' own copy** of the transcript — the one the meeting's Recap
|
|
@@ -646,6 +698,23 @@ Everything is optional — by default the token is captured from your browser.
|
|
|
646
698
|
`not_member` and not written. Teams posts a notice in the chat for each
|
|
647
699
|
person removed, and they lose access to it. Each person is reported
|
|
648
700
|
`removed`, `not_member`, `unknown` or `failed`.
|
|
701
|
+
- `teams_create_group_chat` — start a new group chat with `people` (2–20,
|
|
702
|
+
named as for `teams_add_chat_members`, except that with no chat yet a name
|
|
703
|
+
is matched among the other person of each of your 1:1 chats only, then the
|
|
704
|
+
directory) and an optional `topic` (trimmed; empty or missing is an
|
|
705
|
+
untitled chat). You are always included — listing yourself is ignored, as
|
|
706
|
+
are duplicates — and fewer than two other people is refused: one other
|
|
707
|
+
person is a 1:1, which this tool does not create. Sent as one
|
|
708
|
+
`POST /threads` with everyone as a member (Teams makes every group-chat
|
|
709
|
+
member an Admin). Everyone added sees the new chat at once, and **it
|
|
710
|
+
cannot be deleted afterwards** — only left. No message is sent; post the
|
|
711
|
+
first one with `teams_send_message`. The preview shows the topic and
|
|
712
|
+
everyone with their `source` and, from the directory, `email`. The chat is
|
|
713
|
+
read back and the result is `created` with the new `conversation` (id,
|
|
714
|
+
title, kind `group`), the `members` and `verified` (everyone and the topic
|
|
715
|
+
shown). It is not idempotent: `status: "unknown"` means Teams did not
|
|
716
|
+
confirm the create — check `teams_list_conversations` before retrying,
|
|
717
|
+
since a blind retry makes a second chat.
|
|
649
718
|
|
|
650
719
|
`teams_list_messages` and `teams_list_unread_messages` also write when — and only
|
|
651
720
|
when — you pass `mark_read: true` (see above). Every other tool is
|
|
@@ -653,8 +722,8 @@ read-only, and nothing marks anything read unless you ask it to.
|
|
|
653
722
|
|
|
654
723
|
## Writes
|
|
655
724
|
|
|
656
|
-
A post, a reaction, a rename
|
|
657
|
-
in the conversation, and marking read clears your unread badges, so each
|
|
725
|
+
A post, a reaction, a rename, a membership change and a new group chat are
|
|
726
|
+
visible to everyone in the conversation, and marking read clears your unread badges, so each
|
|
658
727
|
write asks you first. A
|
|
659
728
|
client that can show a confirmation prompt (Claude Code) shows one. On a
|
|
660
729
|
client that cannot, the first call changes nothing and returns a
|
package/dist/bridge-scope.js
CHANGED
|
@@ -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
|
|
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) {
|