teams-api 0.2.6 → 0.3.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/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
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](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
+ [![npm version](https://img.shields.io/npm/v/teams-api?style=flat-square)](https://www.npmjs.com/package/teams-api)
11
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-teams--api-green?style=flat-square)](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,76 @@ 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. As an MCP server for editors and AI tools. This is the recommended path for most users.
15
- 2. As a CLI for direct terminal use.
16
- 3. As a programmatic Node.js library. This is the advanced path and is documented near the end.
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
+ }
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ </details>
64
+
65
+ <details>
66
+ <summary><strong>Cursor</strong></summary>
67
+
68
+ Click the **Install in Cursor** badge at the top, or add to `~/.cursor/mcp.json`:
69
+
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "teams": {
74
+ "command": "npx",
75
+ "args": ["-y", "teams-api@latest"],
76
+ "env": {
77
+ "TEAMS_LOGIN": "true"
78
+ }
79
+ }
80
+ }
81
+ }
82
+ ```
17
83
 
18
- ### Recommended: MCP via `npx @latest`
84
+ </details>
19
85
 
20
- Prefer running from `npx` so you always pick up the latest published version while the project is evolving quickly.
86
+ <details>
87
+ <summary><strong>Claude Desktop</strong></summary>
21
88
 
22
- If you are on macOS and already use a platform authenticator / FIDO2 passkey, start with auto-login:
89
+ Add to `claude_desktop_config.json` ([how to find it](https://modelcontextprotocol.io/quickstart/user)):
23
90
 
24
91
  ```json
25
92
  {
@@ -28,15 +95,30 @@ If you are on macOS and already use a platform authenticator / FIDO2 passkey, st
28
95
  "command": "npx",
29
96
  "args": ["-y", "teams-api@latest"],
30
97
  "env": {
31
- "TEAMS_AUTO": "true",
32
- "TEAMS_EMAIL": "you@example.com"
98
+ "TEAMS_LOGIN": "true"
33
99
  }
34
100
  }
35
101
  }
36
102
  }
37
103
  ```
38
104
 
39
- If you are on Windows or Linux, or you want a visible browser login flow, use interactive login instead:
105
+ </details>
106
+
107
+ <details>
108
+ <summary><strong>Claude Code</strong></summary>
109
+
110
+ ```bash
111
+ claude mcp add teams -- npx -y teams-api@latest
112
+ ```
113
+
114
+ Then set the environment variable `TEAMS_LOGIN=true` in your shell before starting Claude Code. The server will ask for your email interactively on first use.
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary><strong>Windsurf</strong></summary>
120
+
121
+ Add to `~/.codeium/windsurf/mcp_config.json`:
40
122
 
41
123
  ```json
42
124
  {
@@ -45,16 +127,17 @@ If you are on Windows or Linux, or you want a visible browser login flow, use in
45
127
  "command": "npx",
46
128
  "args": ["-y", "teams-api@latest"],
47
129
  "env": {
48
- "TEAMS_LOGIN": "true",
49
- "TEAMS_EMAIL": "you@example.com"
130
+ "TEAMS_LOGIN": "true"
50
131
  }
51
132
  }
52
133
  }
53
134
  }
54
135
  ```
55
136
 
137
+ </details>
138
+
56
139
  > [!TIP]
57
- > In both recommended setups, `teams-api` captures the full token bundle automatically during login. Most users never need to copy tokens manually.
140
+ > On macOS with a FIDO2 passkey, replace `TEAMS_LOGIN` with `TEAMS_AUTO` for fully unattended auth. See [Authentication](#authentication) for details.
58
141
 
59
142
  ### CLI
60
143
 
@@ -239,54 +322,11 @@ teams-api list-conversations --auto --email you@example.com --format toon
239
322
 
240
323
  ## MCP server
241
324
 
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.
325
+ 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
326
 
285
327
  ### Advanced: direct token configuration
286
328
 
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):**
329
+ Use this only if you already have tokens from another flow or need to avoid browser-based auth entirely:
290
330
 
291
331
  ```json
292
332
  {
@@ -310,16 +350,16 @@ Use this only if you already have tokens from another flow or need to avoid brow
310
350
 
311
351
  ### Environment variables
312
352
 
313
- | Variable | Description |
314
- | ----------------------- | -------------------------------------------------------------------- |
315
- | `TEAMS_TOKEN` | Pre-existing skype token |
316
- | `TEAMS_BEARER_TOKEN` | Optional middle-tier bearer token |
317
- | `TEAMS_SUBSTRATE_TOKEN` | Optional Substrate bearer token |
318
- | `TEAMS_REGION` | API region override. Required with `TEAMS_TOKEN`; optional otherwise |
319
- | `TEAMS_EMAIL` | Corporate email for auto-login or interactive login |
320
- | `TEAMS_AUTO` | Set to `true` to enable auto-login (macOS + FIDO2) |
321
- | `TEAMS_LOGIN` | Set to `true` to enable interactive browser login |
322
- | `TEAMS_DEBUG_PORT` | Chrome debug port (default: 9222) |
353
+ | Variable | Description |
354
+ | ----------------------- | --------------------------------------------------------------------- |
355
+ | `TEAMS_TOKEN` | Pre-existing skype token |
356
+ | `TEAMS_BEARER_TOKEN` | Optional middle-tier bearer token |
357
+ | `TEAMS_SUBSTRATE_TOKEN` | Optional Substrate bearer token |
358
+ | `TEAMS_REGION` | API region override. Required with `TEAMS_TOKEN`; optional otherwise |
359
+ | `TEAMS_EMAIL` | Corporate email. Optional the server prompts the AI agent if needed |
360
+ | `TEAMS_AUTO` | Set to `true` to enable auto-login (macOS + FIDO2) |
361
+ | `TEAMS_LOGIN` | Set to `true` to enable interactive browser login |
362
+ | `TEAMS_DEBUG_PORT` | Chrome debug port (default: 9222) |
323
363
 
324
364
  ### Available tools
325
365
 
@@ -12,7 +12,7 @@
12
12
  * TEAMS_BEARER_TOKEN — Optional middle-tier bearer token for profile resolution
13
13
  * TEAMS_SUBSTRATE_TOKEN — Optional Substrate bearer token for people/chat search
14
14
  * TEAMS_REGION — API region (required with TEAMS_TOKEN, optional otherwise)
15
- * TEAMS_EMAIL — Corporate email (for auto-login or interactive login)
15
+ * TEAMS_EMAIL — Corporate email (optional; the server prompts the AI agent if needed)
16
16
  * TEAMS_AUTO — Set to "true" to use auto-login (macOS + FIDO2)
17
17
  * TEAMS_LOGIN — Set to "true" to use interactive browser login (all platforms)
18
18
  * TEAMS_DEBUG_PORT — Chrome debug port (default: 9222)
@@ -24,8 +24,7 @@
24
24
  * "command": "npx",
25
25
  * "args": ["-y", "teams-api"],
26
26
  * "env": {
27
- * "TEAMS_AUTO": "true",
28
- * "TEAMS_EMAIL": "user@company.com"
27
+ * "TEAMS_LOGIN": "true"
29
28
  * }
30
29
  * }
31
30
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
1
+ {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG"}
@@ -13,7 +13,7 @@
13
13
  * TEAMS_BEARER_TOKEN — Optional middle-tier bearer token for profile resolution
14
14
  * TEAMS_SUBSTRATE_TOKEN — Optional Substrate bearer token for people/chat search
15
15
  * TEAMS_REGION — API region (required with TEAMS_TOKEN, optional otherwise)
16
- * TEAMS_EMAIL — Corporate email (for auto-login or interactive login)
16
+ * TEAMS_EMAIL — Corporate email (optional; the server prompts the AI agent if needed)
17
17
  * TEAMS_AUTO — Set to "true" to use auto-login (macOS + FIDO2)
18
18
  * TEAMS_LOGIN — Set to "true" to use interactive browser login (all platforms)
19
19
  * TEAMS_DEBUG_PORT — Chrome debug port (default: 9222)
@@ -25,8 +25,7 @@
25
25
  * "command": "npx",
26
26
  * "args": ["-y", "teams-api"],
27
27
  * "env": {
28
- * "TEAMS_AUTO": "true",
29
- * "TEAMS_EMAIL": "user@company.com"
28
+ * "TEAMS_LOGIN": "true"
30
29
  * }
31
30
  * }
32
31
  * }
@@ -39,7 +38,14 @@ const zod_1 = require("zod");
39
38
  const teams_client_js_1 = require("./teams-client.js");
40
39
  const actions_js_1 = require("./actions.js");
41
40
  let clientInstance = null;
42
- async function getClient() {
41
+ class NeedsEmailError extends Error {
42
+ constructor() {
43
+ super("I need your corporate email address to log into Teams. " +
44
+ "Please provide your email and call this tool again.");
45
+ this.name = "NeedsEmailError";
46
+ }
47
+ }
48
+ async function getClient(toolEmail) {
43
49
  if (clientInstance) {
44
50
  return clientInstance;
45
51
  }
@@ -47,7 +53,7 @@ async function getClient() {
47
53
  const envBearerToken = process.env.TEAMS_BEARER_TOKEN;
48
54
  const envSubstrateToken = process.env.TEAMS_SUBSTRATE_TOKEN;
49
55
  const envRegion = process.env.TEAMS_REGION;
50
- const envEmail = process.env.TEAMS_EMAIL;
56
+ const email = process.env.TEAMS_EMAIL || toolEmail;
51
57
  const envAuto = process.env.TEAMS_AUTO === "true";
52
58
  const envLogin = process.env.TEAMS_LOGIN === "true";
53
59
  const envDebugPort = process.env.TEAMS_DEBUG_PORT
@@ -59,9 +65,12 @@ async function getClient() {
59
65
  }
60
66
  clientInstance = teams_client_js_1.TeamsClient.fromToken(envToken, envRegion, envBearerToken, envSubstrateToken);
61
67
  }
62
- else if (envAuto && envEmail) {
68
+ else if (envAuto) {
69
+ if (!email) {
70
+ throw new NeedsEmailError();
71
+ }
63
72
  clientInstance = await teams_client_js_1.TeamsClient.create({
64
- email: envEmail,
73
+ email,
65
74
  region: envRegion,
66
75
  headless: true,
67
76
  verbose: false,
@@ -70,7 +79,7 @@ async function getClient() {
70
79
  else if (envLogin) {
71
80
  clientInstance = await teams_client_js_1.TeamsClient.fromInteractiveLogin({
72
81
  region: envRegion,
73
- email: envEmail,
82
+ email,
74
83
  verbose: false,
75
84
  });
76
85
  }
@@ -116,26 +125,44 @@ for (const action of actions_js_1.actions) {
116
125
  .enum(["json", "text", "md", "toon"])
117
126
  .describe("Output format (default: toon)")
118
127
  .optional();
128
+ inputSchema["email"] = zod_1.z
129
+ .string()
130
+ .describe("Corporate email address for Teams login. " +
131
+ "Only needed if the server asks for it.")
132
+ .optional();
119
133
  server.registerTool(toolName, {
120
134
  title: action.title,
121
135
  description: action.description,
122
136
  inputSchema,
123
137
  }, async (parameters) => {
124
- const client = await getClient();
125
- const outputFormat = parameters.format ?? "toon";
126
- const result = await action.execute(client, parameters);
127
- const structuredContent = result !== null && typeof result === "object" && !Array.isArray(result)
128
- ? result
129
- : { data: result };
130
- return {
131
- content: [
132
- {
133
- type: "text",
134
- text: (0, actions_js_1.formatOutput)(action, result, outputFormat),
135
- },
136
- ],
137
- structuredContent,
138
- };
138
+ try {
139
+ const client = await getClient(parameters.email);
140
+ const outputFormat = parameters.format ?? "toon";
141
+ const result = await action.execute(client, parameters);
142
+ const structuredContent = result !== null &&
143
+ typeof result === "object" &&
144
+ !Array.isArray(result)
145
+ ? result
146
+ : { data: result };
147
+ return {
148
+ content: [
149
+ {
150
+ type: "text",
151
+ text: (0, actions_js_1.formatOutput)(action, result, outputFormat),
152
+ },
153
+ ],
154
+ structuredContent,
155
+ };
156
+ }
157
+ catch (error) {
158
+ if (error instanceof NeedsEmailError) {
159
+ return {
160
+ content: [{ type: "text", text: error.message }],
161
+ isError: true,
162
+ };
163
+ }
164
+ throw error;
165
+ }
139
166
  });
140
167
  }
141
168
  async function main() {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;AAEH,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,uDAAgD;AAChD,6CAAqD;AAGrD,IAAI,cAAc,GAAuB,IAAI,CAAC;AAE9C,KAAK,UAAU,SAAS;IACtB,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzC,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACtD,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC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I,EAAE,MAAM,EAAE,CAAC;YAEvB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAA,yBAAY,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC;qBACjD;iBACF;gBACD,iBAAiB;aAClB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,eAAe,EAAE,CAAC;gBACrC,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;oBACzD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;IAC5B,OAAO,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teams-api",
3
- "version": "0.2.6",
3
+ "version": "0.3.0",
4
4
  "description": "AI-native Microsoft Teams integration — read conversations, send messages, manage members via the Teams Chat Service REST API",
5
5
  "type": "commonjs",
6
6
  "repository": {