@chrischall/microsoft-teams-mcp 0.1.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 +36 -0
- package/.claude-plugin/mcp.json +8 -0
- package/.claude-plugin/plugin.json +23 -0
- package/.mcp.json +8 -0
- package/README.md +134 -0
- package/dist/bundle.js +43913 -0
- package/dist/client.js +231 -0
- package/dist/index.js +23 -0
- package/dist/tools/channels.js +42 -0
- package/dist/tools/chat.js +40 -0
- package/dist/tools/errors.js +17 -0
- package/dist/tools/healthcheck.js +14 -0
- package/dist/version.js +13 -0
- package/mint.yaml +42 -0
- package/package.json +63 -0
- package/server.json +28 -0
- package/skills/teams-fpx/SKILL.md +95 -0
- package/skills/teams-fpx/references/dom-list-recipes.md +66 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "microsoft-teams-mcp",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Chris Hall",
|
|
6
|
+
"email": "chris.c.hall@gmail.com"
|
|
7
|
+
},
|
|
8
|
+
"metadata": {
|
|
9
|
+
"description": "MCP server for Microsoft Teams — read your chats, teams, channels, and their currently open messages",
|
|
10
|
+
"version": "0.1.0"
|
|
11
|
+
},
|
|
12
|
+
"plugins": [
|
|
13
|
+
{
|
|
14
|
+
"name": "microsoft-teams-mcp",
|
|
15
|
+
"displayName": "Microsoft Teams",
|
|
16
|
+
"source": "./",
|
|
17
|
+
"description": "MCP server for Microsoft Teams — read your chats, teams, channels, and their currently open messages, via your signed-in browser session",
|
|
18
|
+
"version": "0.1.0",
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "Chris Hall"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/chrischall/microsoft-teams-mcp",
|
|
23
|
+
"repository": "https://github.com/chrischall/microsoft-teams-mcp",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"keywords": [
|
|
26
|
+
"microsoft-teams",
|
|
27
|
+
"teams",
|
|
28
|
+
"office365",
|
|
29
|
+
"microsoft365",
|
|
30
|
+
"chat",
|
|
31
|
+
"mcp"
|
|
32
|
+
],
|
|
33
|
+
"category": "productivity"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "microsoft-teams-mcp",
|
|
3
|
+
"displayName": "Microsoft Teams",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Microsoft Teams for Claude — read your chats, teams, channels, and their currently open messages, using your signed-in browser session",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Chris Hall",
|
|
8
|
+
"email": "chris.c.hall@gmail.com"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/chrischall/microsoft-teams-mcp",
|
|
11
|
+
"repository": "https://github.com/chrischall/microsoft-teams-mcp",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"microsoft-teams",
|
|
15
|
+
"teams",
|
|
16
|
+
"office365",
|
|
17
|
+
"microsoft365",
|
|
18
|
+
"chat",
|
|
19
|
+
"mcp"
|
|
20
|
+
],
|
|
21
|
+
"skills": "./skills/",
|
|
22
|
+
"mcp": "./mcp.json"
|
|
23
|
+
}
|
package/.mcp.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# microsoft-teams-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for **Microsoft Teams** — list your chats, teams and channels, and
|
|
4
|
+
read whichever chat or channel is currently open, routed through your
|
|
5
|
+
signed-in browser tab.
|
|
6
|
+
|
|
7
|
+
> This project was developed and is maintained by AI (Claude Code). Use at your
|
|
8
|
+
> own discretion.
|
|
9
|
+
|
|
10
|
+
## How it works — and its one real limitation
|
|
11
|
+
|
|
12
|
+
Teams Web's chat and message data lives only in a client-side cache fed by a
|
|
13
|
+
WebSocket/registrar sync channel — there is no REST or GraphQL endpoint that
|
|
14
|
+
returns it. So this server does not capture a token and make plain server-side
|
|
15
|
+
requests the way an API-backed MCP would; instead every call routes through
|
|
16
|
+
the [fetchproxy](https://github.com/chrischall/fetchproxy) browser bridge and
|
|
17
|
+
reads the DOM your signed-in `teams.microsoft.com` (or `teams.cloud.microsoft`)
|
|
18
|
+
tab has already rendered.
|
|
19
|
+
|
|
20
|
+
**That has one real consequence: this server can only read whichever chat or
|
|
21
|
+
channel is currently displayed in your browser tab.** The bridge can fetch
|
|
22
|
+
and read — it cannot navigate a tab to a different conversation.
|
|
23
|
+
`teams_list_chats` and `teams_list_teams_and_channels` always work (their
|
|
24
|
+
sidebars are always rendered once that nav section is open);
|
|
25
|
+
`teams_get_open_chat_messages` and `teams_get_open_channel_posts` read
|
|
26
|
+
whatever conversation you have open. To read a different chat or channel,
|
|
27
|
+
open it in the browser first.
|
|
28
|
+
|
|
29
|
+
The bridge is on the request path for **every** call here, not just once to
|
|
30
|
+
mint a token — unlike an API-backed MCP, there is nothing to cache between
|
|
31
|
+
calls.
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm i -g @chrischall/microsoft-teams-mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Requires the **Transporter** Chrome extension and `@fetchproxy/cli`, on a
|
|
40
|
+
matching major version:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npm i -g @fetchproxy/cli
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The first call prints a 6-digit pair code to approve in the Transporter
|
|
47
|
+
popup; the grant persists.
|
|
48
|
+
|
|
49
|
+
### Install in opencode
|
|
50
|
+
|
|
51
|
+
opencode reads MCP servers from `opencode.json` (project) or
|
|
52
|
+
`~/.config/opencode/opencode.json` (global):
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcp": {
|
|
57
|
+
"servers": {
|
|
58
|
+
"teams": {
|
|
59
|
+
"type": "local",
|
|
60
|
+
"command": ["npx", "-y", "@chrischall/microsoft-teams-mcp"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Configuration
|
|
68
|
+
|
|
69
|
+
Everything is optional — this server needs no credentials of its own.
|
|
70
|
+
|
|
71
|
+
| variable | purpose |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `TEAMS_WS_PORT` | fetchproxy concentrator port. Defaults to `37149`, the fleet-wide shared port. |
|
|
74
|
+
|
|
75
|
+
## Tools
|
|
76
|
+
|
|
77
|
+
- `teams_list_chats` — the Chat sidebar: title, last-message preview,
|
|
78
|
+
last-activity time, and Teams' own conversation id for each chat.
|
|
79
|
+
- `teams_get_open_chat_messages` — the message thread of whichever chat is
|
|
80
|
+
currently open: sender, ISO-8601 time, message id, and text.
|
|
81
|
+
- `teams_list_teams_and_channels` — the Teams-and-Channels sidebar (a
|
|
82
|
+
DIFFERENT view from Chat): every team and channel the user belongs to,
|
|
83
|
+
with each channel's parent team name.
|
|
84
|
+
- `teams_get_open_channel_posts` — the top-level posts of whichever channel
|
|
85
|
+
is currently open: sender, subject (when present), prose time (not
|
|
86
|
+
ISO-8601 — Teams doesn't expose one for these), message id, and text.
|
|
87
|
+
Threaded replies under a post are not included.
|
|
88
|
+
- `teams_healthcheck` — verifies the bridge can reach a signed-in tab.
|
|
89
|
+
|
|
90
|
+
All four data tools are read-only and take no arguments.
|
|
91
|
+
|
|
92
|
+
## Things worth knowing
|
|
93
|
+
|
|
94
|
+
- **No chat or channel selection.** See "How it works" above — there is no
|
|
95
|
+
id parameter on either "open" tool because there is no way to act on one.
|
|
96
|
+
Ask the person to open the chat/channel they mean, or use the matching
|
|
97
|
+
list tool to show them what's available.
|
|
98
|
+
- **Chat and Teams-and-Channels are different nav sections.** Reading
|
|
99
|
+
channels needs the Teams-and-Channels view open in the browser (the
|
|
100
|
+
"Teams" icon in the left rail, not "Chat") — if a channel tool returns
|
|
101
|
+
nothing, that's usually why.
|
|
102
|
+
- **Grouped messages still resolve a sender.** Teams visually hides the
|
|
103
|
+
sender name on consecutive messages from the same person, but the name
|
|
104
|
+
stays in the DOM, so `sender` is populated on every row regardless.
|
|
105
|
+
- **Quoted content concatenates.** A chat message that quotes an earlier one,
|
|
106
|
+
or a channel post whose body includes a reply preview, has that quoted
|
|
107
|
+
text run together with the real content inside `text` — a limitation of
|
|
108
|
+
bulk text extraction, not a bug.
|
|
109
|
+
- **Multiple open Teams tabs race.** The bridge reads whichever matching tab
|
|
110
|
+
answers first ("first responsive"), not necessarily the one you meant. If
|
|
111
|
+
results look like they're from the wrong chat/channel, close extra
|
|
112
|
+
`teams.microsoft.com` tabs so only one remains.
|
|
113
|
+
- **Scope grows quietly.** If you see a `read_dom_list name not in declared
|
|
114
|
+
set` error, the extension's approved scope is behind the server's declared
|
|
115
|
+
one — this shouldn't happen in a released version, but if it does, revoke
|
|
116
|
+
and re-pair `teams-mcp` in the Transporter popup.
|
|
117
|
+
|
|
118
|
+
## Development
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
npm install
|
|
122
|
+
npm run build
|
|
123
|
+
npm test # typecheck + suite
|
|
124
|
+
npm run test:coverage # CI's gate
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
This server depends on `read_dom_list`, a fetchproxy capability added
|
|
128
|
+
alongside this repo — it needs `@fetchproxy/protocol`/`@fetchproxy/server`
|
|
129
|
+
`>= 3.1.0`, the first published versions that include it
|
|
130
|
+
([chrischall/fetchproxy#381](https://github.com/chrischall/fetchproxy/pull/381)).
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT
|