# mcp-teams [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/dockndevai/mcp-teams  
**GitHub Stars:** 0  
**npm Downloads (last month):** 448  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-teams

## Description
Read Microsoft Teams teams, channels, chats and messages, and post/reply/send, safe by default.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-teams": {
    "command": "npx",
    "args": ["-y","@dockndevai/mcp-teams"],
    "env": {
      "TEAMS_CLIENT_ID": "",
      "TEAMS_TENANT_ID": "",
      "TEAMS_MODE": "",
      "TEAMS_AUTH": "",
      "TEAMS_CLIENT_SECRET": "",
      "TEAMS_TOKEN": "",
      "TEAMS_ALLOW_SEND": "",
      "TEAMS_ALLOW_DELETE": ""
    }
  }
}
```

**Requires environment variables:** `TEAMS_CLIENT_ID`, `TEAMS_TENANT_ID`, `TEAMS_MODE`, `TEAMS_AUTH`, `TEAMS_CLIENT_SECRET`, `TEAMS_TOKEN`, `TEAMS_ALLOW_SEND`, `TEAMS_ALLOW_DELETE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-teams does

mcp-teams gives MCP-compatible agents access to Microsoft Teams through Microsoft Graph. Its read tools can identify the signed-in account, enumerate joined teams and their channels, inspect team members, retrieve channel messages and threaded replies, and browse one-to-one or group chats. The server also supports writing operations: posting to a channel, replying to a channel thread, sending a chat message, and soft-deleting one of the signed-in user's own channel messages.

The available tool set depends on the configured security mode. Read-only operation exposes nine read tools. Write and delete tools are withheld unless the corresponding mode and safety settings allow them.

## How it works

On the default interactive path, the first run opens a Microsoft sign-in page. Authentication uses an Entra public-client app with authorization code and PKCE through a loopback redirect at `http://localhost`; the server does not receive the user's password. Access and refresh tokens are stored in `~/.mcp-teams/token.json` with restrictive permissions, and later runs refresh the session silently.

The server can instead use client credentials when a client secret is configured, or accept a Microsoft Graph bearer token supplied by the operator. Some Teams messaging APIs require delegated permissions and may not work with app-only tokens without Microsoft's protected-API approval.

Write operations receive additional safeguards. The server can restrict posting to an allowlist, protect selected teams from posting, require client-side human approval, validate writes in dry-run mode, and emit JSON audit records to stderr. Delete requests are soft-deletes limited to the user's own messages.

## Setup and configuration

Install and run the package with:

```bash
npx -y @dockndevai/mcp-teams
```

Create an Entra app registration as a public client, add the `http://localhost` redirect URI under mobile and desktop applications, and set its application ID as `TEAMS_CLIENT_ID`. The example configuration uses `TEAMS_TENANT_ID=common` and `TEAMS_MODE=read-only`.

Delegated Graph permissions for the read features include `Team.ReadBasic.All`, `Channel.ReadBasic.All`, and `ChannelMessage.Read.All`. Posting additionally requires `ChannelMessage.Send` and `Chat.ReadWrite`. Use `TEAMS_AUTH` to select interactive, client-credentials, or token authentication when automatic selection is not suitable.

## Tools and capabilities

- Confirm the active account with `whoami`.
- List joined teams, team channels, and team members.
- Read channel messages, individual message bodies, threaded replies, chats, and chat messages.
- Post channel messages, reply to channel threads, and send chat messages in read-write mode when `TEAMS_ALLOW_SEND` is enabled.
- Soft-delete the user's own channel message in admin mode when `TEAMS_ALLOW_DELETE` is enabled.
- Limit write targets with `TEAMS_TEAM_ALLOWLIST` and `TEAMS_PROTECTED_TEAMS`.
- Require approval with MCP elicitation or enforce refusal when elicitation is unavailable through `TEAMS_REQUIRE_HUMAN_APPROVAL`.

## Limitations and notes

Most Teams messaging APIs are delegated-only, making interactive sign-in the primary authentication route. Client-credentials authentication may need protected-API approval from Microsoft. Write tools are intentionally absent from lower security modes rather than merely blocked at execution time.

When a client supports MCP elicitation, guarded writes pause for human approval and show the operation plus redacted arguments. Delete approval also checks message version details and refuses the operation if the message changed. Clients without elicitation use the configured allow flags unless human approval is required. `TEAMS_DRY_RUN` validates and logs writes without executing them, while `TEAMS_AUDIT_LOG` controls JSON audit output and is enabled by default.

_Full upstream README: https://allmcps.com/mcp/mcp-teams/readme_

