# Microsoft Teams API

Connects Microsoft Teams with AI agents via the chat REST API. It lets your assistant check conversation feeds, post replies, and inspect members.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: Maxim-Mazurok
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Maxim-Mazurok/teams-api
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/microsoft-teams-api

## What it does

This server exposes Teams chat endpoints directly to your coding assistant. The model can inspect channel discussions, send replies into ongoing threads, and monitor active workflows.

Node.js 18 or newer is mandatory to execute the package with `npx`. Authentication works interactively with `TEAMS_LOGIN=true`, or by passing tokens directly in the environment. On macOS systems with a FIDO2 passkey, setting `TEAMS_AUTO` enables non-interactive login.

Without valid credential tokens or login variables in the environment, the server fails during startup network calls.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TEAMS_EMAIL`, `TEAMS_AUTO`, `TEAMS_LOGIN`, `TEAMS_TOKEN`, `TEAMS_REGION`, `TEAMS_BEARER_TOKEN`, `TEAMS_SUBSTRATE_TOKEN`, `TEAMS_DEBUG`, `TEAMS_TELEMETRY`, `TEAMS_TELEMETRY_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TEAMS_EMAIL=<TEAMS_EMAIL> --env TEAMS_AUTO=<TEAMS_AUTO> --env TEAMS_LOGIN=<TEAMS_LOGIN> --env TEAMS_TOKEN=<TEAMS_TOKEN> --env TEAMS_REGION=<TEAMS_REGION> --transport stdio microsoft-teams-api -- npx -y teams-api
```
Replace <…> with your own values. 8 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add microsoft-teams-api --env TEAMS_EMAIL=<TEAMS_EMAIL> --env TEAMS_AUTO=<TEAMS_AUTO> --env TEAMS_LOGIN=<TEAMS_LOGIN> --env TEAMS_TOKEN=<TEAMS_TOKEN> --env TEAMS_REGION=<TEAMS_REGION> -- npx -y teams-api
```
Replace <…> with your own values. 8 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "microsoft-teams-api": {
            "command": "npx",
            "args": [
                "-y",
                "teams-api"
            ],
            "env": {
                "TEAMS_EMAIL": "<TEAMS_EMAIL>",
                "TEAMS_AUTO": "<TEAMS_AUTO>",
                "TEAMS_LOGIN": "<TEAMS_LOGIN>",
                "TEAMS_TOKEN": "<TEAMS_TOKEN>",
                "TEAMS_REGION": "<TEAMS_REGION>"
            }
        }
    }
}
```
Replace <…> with your own values. 8 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "microsoft-teams-api": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "teams-api"
            ],
            "env": {
                "TEAMS_EMAIL": "<TEAMS_EMAIL>",
                "TEAMS_AUTO": "<TEAMS_AUTO>",
                "TEAMS_LOGIN": "<TEAMS_LOGIN>",
                "TEAMS_TOKEN": "<TEAMS_TOKEN>",
                "TEAMS_REGION": "<TEAMS_REGION>"
            }
        }
    }
}
```
Replace <…> with your own values. 8 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TEAMS_EMAIL=<TEAMS_EMAIL> -e TEAMS_AUTO=<TEAMS_AUTO> -e TEAMS_LOGIN=<TEAMS_LOGIN> -e TEAMS_TOKEN=<TEAMS_TOKEN> -e TEAMS_REGION=<TEAMS_REGION> microsoft-teams-api npx -y teams-api
```
Replace <…> with your own values. 8 more environment variables are in the server README

## When to use it
- Read incoming messages across Teams conversations
- Post responses directly to discussions and threads
- Query team members and participant directories
- Automate chat interactions inside team workspaces

## Example prompts
- Check the latest unread messages in the Teams engineering channel
- Send an update to our project chat with the release notes summary
- List all participants in the active team conversation

## Similar
- [Microsoft Teams Automation](https://affpapa.org/en/nevibecode/skills/microsoft-teams-automation.md) — skill · 4700 installs
- [teams-meeting-pipeline](https://affpapa.org/en/nevibecode/skills/teams-meeting-pipeline.md) — skill · 365 installs
- [microsoft-teams](https://affpapa.org/en/nevibecode/rules/microsoft-teams.md) — rule · ★ 3579
- [service-itsm-teams-employee-agent-configure](https://affpapa.org/en/nevibecode/skills/service-itsm-teams-employee-agent-configure.md) — skill · 1200 installs
- [service-itsm-teams-coordinate](https://affpapa.org/en/nevibecode/skills/service-itsm-teams-coordinate.md) — skill · 1200 installs
- [teams-channel-post-writer](https://affpapa.org/en/nevibecode/skills/teams-channel-post-writer.md) — skill · 935 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
