teams-api 0.2.6 → 0.2.7
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/README.md +98 -54
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,12 @@ AI-native Microsoft Teams integration — read conversations, send messages, and
|
|
|
4
4
|
|
|
5
5
|
Designed for autonomous AI agents that need to interact with Teams: read messages, reply to people, monitor conversations, and participate in team workflows.
|
|
6
6
|
|
|
7
|
+
[<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522teams%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522teams-api%2540latest%2522%255D%252C%2522env%2522%253A%257B%2522TEAMS_LOGIN%2522%253A%2522true%2522%257D%257D)
|
|
8
|
+
[<img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522teams%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522teams-api%2540latest%2522%255D%252C%2522env%2522%253A%257B%2522TEAMS_LOGIN%2522%253A%2522true%2522%257D%257D)
|
|
9
|
+
[](https://cursor.com/install-mcp?name=teams&config=%7B%22name%22%3A%22teams%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22teams-api%40latest%22%5D%2C%22env%22%3A%7B%22TEAMS_LOGIN%22%3A%22true%22%7D%7D)
|
|
10
|
+
[](https://www.npmjs.com/package/teams-api)
|
|
11
|
+
[](https://registry.modelcontextprotocol.io)
|
|
12
|
+
|
|
7
13
|
> [!NOTE]
|
|
8
14
|
> This project was AI-generated using Claude Opus 4.6 with human guidance and review.
|
|
9
15
|
|
|
@@ -11,15 +17,78 @@ Designed for autonomous AI agents that need to interact with Teams: read message
|
|
|
11
17
|
|
|
12
18
|
`teams-api` can be used in three ways:
|
|
13
19
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
20
|
+
1. **MCP server** for editors and AI tools — the recommended path for most users.
|
|
21
|
+
2. **CLI** for direct terminal use.
|
|
22
|
+
3. **Programmatic Node.js library** — advanced, documented near the end.
|
|
23
|
+
|
|
24
|
+
### Install in your editor
|
|
25
|
+
|
|
26
|
+
The quickest way to get started is to click one of the install badges above, or follow the instructions for your editor below.
|
|
27
|
+
|
|
28
|
+
<details>
|
|
29
|
+
<summary><strong>VS Code / VS Code Insiders</strong></summary>
|
|
30
|
+
|
|
31
|
+
**Option 1 — One-click install:**
|
|
32
|
+
|
|
33
|
+
Click the badge at the top of this README, or press `Cmd+Shift+X` / `Ctrl+Shift+X`, type `@mcp` in the search field, and look for **Microsoft Teams API**.
|
|
34
|
+
|
|
35
|
+
**Option 2 — CLI:**
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# VS Code
|
|
39
|
+
code --add-mcp '{"name":"teams","command":"npx","args":["-y","teams-api@latest"],"env":{"TEAMS_LOGIN":"true"}}'
|
|
40
|
+
|
|
41
|
+
# VS Code Insiders
|
|
42
|
+
code-insiders --add-mcp '{"name":"teams","command":"npx","args":["-y","teams-api@latest"],"env":{"TEAMS_LOGIN":"true"}}'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Option 3 — Manual config:**
|
|
46
|
+
|
|
47
|
+
Add to your VS Code MCP config (`.vscode/mcp.json` or User Settings):
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"teams": {
|
|
53
|
+
"command": "npx",
|
|
54
|
+
"args": ["-y", "teams-api@latest"],
|
|
55
|
+
"env": {
|
|
56
|
+
"TEAMS_LOGIN": "true",
|
|
57
|
+
"TEAMS_EMAIL": "you@example.com"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
</details>
|
|
65
|
+
|
|
66
|
+
<details>
|
|
67
|
+
<summary><strong>Cursor</strong></summary>
|
|
68
|
+
|
|
69
|
+
Click the **Install in Cursor** badge at the top, or add to `~/.cursor/mcp.json`:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"teams": {
|
|
75
|
+
"command": "npx",
|
|
76
|
+
"args": ["-y", "teams-api@latest"],
|
|
77
|
+
"env": {
|
|
78
|
+
"TEAMS_LOGIN": "true",
|
|
79
|
+
"TEAMS_EMAIL": "you@example.com"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
17
85
|
|
|
18
|
-
|
|
86
|
+
</details>
|
|
19
87
|
|
|
20
|
-
|
|
88
|
+
<details>
|
|
89
|
+
<summary><strong>Claude Desktop</strong></summary>
|
|
21
90
|
|
|
22
|
-
|
|
91
|
+
Add to `claude_desktop_config.json` ([how to find it](https://modelcontextprotocol.io/quickstart/user)):
|
|
23
92
|
|
|
24
93
|
```json
|
|
25
94
|
{
|
|
@@ -28,7 +97,7 @@ If you are on macOS and already use a platform authenticator / FIDO2 passkey, st
|
|
|
28
97
|
"command": "npx",
|
|
29
98
|
"args": ["-y", "teams-api@latest"],
|
|
30
99
|
"env": {
|
|
31
|
-
"
|
|
100
|
+
"TEAMS_LOGIN": "true",
|
|
32
101
|
"TEAMS_EMAIL": "you@example.com"
|
|
33
102
|
}
|
|
34
103
|
}
|
|
@@ -36,7 +105,23 @@ If you are on macOS and already use a platform authenticator / FIDO2 passkey, st
|
|
|
36
105
|
}
|
|
37
106
|
```
|
|
38
107
|
|
|
39
|
-
|
|
108
|
+
</details>
|
|
109
|
+
|
|
110
|
+
<details>
|
|
111
|
+
<summary><strong>Claude Code</strong></summary>
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
claude mcp add teams -- npx -y teams-api@latest
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Then set the environment variables `TEAMS_LOGIN=true` and `TEAMS_EMAIL=you@example.com` in your shell before starting Claude Code.
|
|
118
|
+
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
<details>
|
|
122
|
+
<summary><strong>Windsurf</strong></summary>
|
|
123
|
+
|
|
124
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
40
125
|
|
|
41
126
|
```json
|
|
42
127
|
{
|
|
@@ -53,8 +138,10 @@ If you are on Windows or Linux, or you want a visible browser login flow, use in
|
|
|
53
138
|
}
|
|
54
139
|
```
|
|
55
140
|
|
|
141
|
+
</details>
|
|
142
|
+
|
|
56
143
|
> [!TIP]
|
|
57
|
-
>
|
|
144
|
+
> On macOS with a FIDO2 passkey, replace `TEAMS_LOGIN` with `TEAMS_AUTO` for fully unattended auth. See [Authentication](#authentication) for details.
|
|
58
145
|
|
|
59
146
|
### CLI
|
|
60
147
|
|
|
@@ -239,54 +326,11 @@ teams-api list-conversations --auto --email you@example.com --format toon
|
|
|
239
326
|
|
|
240
327
|
## MCP server
|
|
241
328
|
|
|
242
|
-
The MCP server exposes Teams operations as tools for AI agents via stdio transport.
|
|
243
|
-
|
|
244
|
-
### Recommended setup
|
|
245
|
-
|
|
246
|
-
For most users, use one of these login-based configs. No manual token extraction is required.
|
|
247
|
-
|
|
248
|
-
**macOS (auto-login with FIDO2):**
|
|
249
|
-
|
|
250
|
-
```json
|
|
251
|
-
{
|
|
252
|
-
"mcpServers": {
|
|
253
|
-
"teams": {
|
|
254
|
-
"command": "npx",
|
|
255
|
-
"args": ["-y", "teams-api@latest"],
|
|
256
|
-
"env": {
|
|
257
|
-
"TEAMS_AUTO": "true",
|
|
258
|
-
"TEAMS_EMAIL": "you@example.com"
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**All platforms (interactive login):**
|
|
266
|
-
|
|
267
|
-
```json
|
|
268
|
-
{
|
|
269
|
-
"mcpServers": {
|
|
270
|
-
"teams": {
|
|
271
|
-
"command": "npx",
|
|
272
|
-
"args": ["-y", "teams-api@latest"],
|
|
273
|
-
"env": {
|
|
274
|
-
"TEAMS_LOGIN": "true",
|
|
275
|
-
"TEAMS_EMAIL": "you@example.com"
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
> [!TIP]
|
|
283
|
-
> In the recommended configs above, `teams-api` captures the full token bundle automatically during login. You do not need to copy `skypeToken`, `bearerToken`, or `substrateToken` into the MCP config.
|
|
329
|
+
The MCP server exposes Teams operations as tools for AI agents via stdio transport. See [Getting Started](#install-in-your-editor) for editor-specific setup.
|
|
284
330
|
|
|
285
331
|
### Advanced: direct token configuration
|
|
286
332
|
|
|
287
|
-
Use this only if you already have tokens from another flow or need to avoid browser-based auth entirely
|
|
288
|
-
|
|
289
|
-
**All platforms (direct token):**
|
|
333
|
+
Use this only if you already have tokens from another flow or need to avoid browser-based auth entirely:
|
|
290
334
|
|
|
291
335
|
```json
|
|
292
336
|
{
|
package/package.json
CHANGED