Microsoft Teams

io.github.SurgeEnterpriseAI由 GitHub 账号 SurgeEnterpriseAI 发布v1.0.0更新于 Oct 24, 2026

Connect Claude to Microsoft Teams — read/send messages, list channels, search chats.

发布方自己的服务:Microsoft Learn MCP

已验证STDIO仅桌面效率与工作流沟通与协作

概览

AI 生成的概览

将 Claude 连接到 Microsoft Teams,让助手列出团队和频道、读取和发送消息、搜索聊天并查看个人资料。

可以做什么
列出你所在的团队及团队中的频道,读取最近的频道消息和话题回复,并在话题中回复或发布新的频道消息。列出你的私聊和群聊,读取聊天消息,并发送私聊或群聊消息。在所有 Teams 中搜索消息,并获取你的 Microsoft 365 个人资料。
适用场景
当你希望 Claude 直接在 Microsoft Teams 中工作时适用:跟进频道或聊天中的对话、搜索历史消息,或在不切换应用的情况下起草并发送回复。
运行要求
以本地 Node.js 进程(npm 包)通过 stdio 运行,或作为托管的 HTTP/SSE 服务器运行。登录使用你自己的 Microsoft 365 工作账户,通过 OAuth 完成。自行托管需要注册 Azure AD 应用,配置客户端密钥和委托的 Microsoft Graph 权限,并通过 TEAMS_CLIENT_ID 和 TEAMS_CLIENT_SECRET 设置。
安装前请注意
该服务器可以代表你向频道和聊天发送消息和回复,发送前请检查其起草的内容。它会持有你 Microsoft 账户的 OAuth 令牌,默认缓存到磁盘;自行托管部署还需要 TEAMS_CLIENT_SECRET。README 称托管版本仅转发消息而不存储,但你的 Teams 内容会发送到 Microsoft Graph,若使用托管服务还会经过运营方的服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Microsoft Teams,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Teams MCP Server

Let Claude read and send your Microsoft Teams messages. An open-source MCP server that connects Claude Code, Claude Desktop and Claude Cowork to Microsoft Teams: list your teams and channels, read channel and chat messages, search across Teams, and post or reply — all by asking Claude in plain English.

  • What it does: gives Claude 11 Teams tools through Microsoft Graph, using your own Microsoft 365 sign-in. Claude sees only what you can already see in Teams. Messages pass through; nothing is stored except your sign-in token on your machine.
  • Who it's for: people who live in Teams and use Claude — developers, team leads, support and ops people who want "summarise #standup since Monday" or "reply to Priya's question in #release" without switching windows. Also teams that want to host one shared Teams connector for everyone in their company.
  • Cost: free and MIT-licensed. You need a Microsoft 365 work or school account and permission to register an app in Azure (or an admin who does it for you once).

[Teams MCP Server — 76-second walkthrough]

▶ Watch the 76-second walkthrough: Teams MCP Server — how it works (captions on; transcript)

Install in 3 steps (Claude Code, on your own computer)

  1. Register an app in Azure (5 minutes, once). Azure Portal → App registrations → New registration → any name, Accounts in any organizational directory, redirect URI type Web = http://localhost:3333/callback. Then add a client secret and the delegated Microsoft Graph permissions listed in Azure AD App Registration below. Copy the client ID and secret.
  2. Add the server to Claude:
    bash
    claude mcp add teams -e TEAMS_CLIENT_ID=<your-client-id> -e TEAMS_CLIENT_SECRET=<your-secret> -- npx -y microsoft-teams-mcp-server
  3. Sign in once. Start Claude and ask "List my Teams." A browser window opens; sign in with your Microsoft work account. Done — the token is cached, so you won't be asked again.

Using Claude Desktop instead? Put the same command and env in claude_desktop_config.json (see Claude Desktop). Want one server for your whole company? See Self-host.

Using it (plain English)

You don't call the tools yourself — you just ask Claude, and Claude picks the right one. Things you can say:

You sayWhat happens
"Which Teams am I in?"Lists your teams.
"What channels does the Platform team have?"Lists that team's channels.
"Summarise what happened in #standup today."Reads recent channel messages and summarises them.
"Show me the replies to Ravi's deploy message."Reads a thread's replies.
"Find every message that mentions the invoice bug."Searches across all your Teams.
"What did Anita say in our chat yesterday?"Lists your chats and reads the one with Anita.
"Post 'Release 4.2 is live' in #announcements."Sends a channel message.
"Reply in that thread: 'Fixed in PR 812.'"Replies in a channel thread.
"Send Anita a chat: 'Running 10 minutes late.'"Sends a chat message.

Good to know:

  • Your access, nothing more. Claude uses your sign-in, so it can only see teams, channels and chats you're in. Each person who connects signs in with their own account.
  • You approve what gets sent. Claude asks permission before each tool call unless you've allowed that tool. A good setup: allow the read and search tools, and keep the three send/reply tools on "ask" so you see every message before it posts.
  • Sign-in lasts. The token is saved in .data/tokens (local) and refreshed silently. Delete that folder to sign out.
  • Search needs a work account. Microsoft search across Teams doesn't work for personal Microsoft accounts.
  • If something fails, ask Claude "what was the error?" — the server returns Microsoft's own message (for example, a missing permission or admin consent).

How It Works

┌─────────────┐     Click "Connect"     ┌──────────────────────┐│ Claude User  │ ──────────────────────► │ Teams MCP Server     ││ (Cowork/     │                         │ (hosted by you or    ││  Desktop/    │     SSE/MCP Protocol    │  your company)       ││  Code)       │ ◄─────────────────────► │  ┌────────────────┐  │└─────────────┘                          │  │ OAuth (common)  │  │                                         │  │ Any M365 user   │  │       User signs in with their          │  │ can sign in     │  │       own Microsoft account             │  └───────┬────────┘  │       ─────────────────────►            │          │           │                                         │  ┌───────▼────────┐  │                                         │  │ Microsoft       │  │                                         │  │ Graph API       │  │                                         │  └────────────────┘  │                                         └──────────────────────┘

The user connects their own Microsoft 365 account. They see their own teams, their own channels, their own messages. Each user's tokens are isolated. The server is the bridge — it never stores messages, just passes them through.

Features

  • One-click connect — visit /connect, sign in with Microsoft, done
  • Multi-tenant — any Microsoft 365 organization, any user
  • 11 tools — teams, channels, messages, chats, search, profile
  • Dual transport — STDIO for Claude Code, HTTP/SSE for Cowork & remote
  • Multi-user — each session gets isolated OAuth tokens
  • Auto-detect — picks the right transport based on launch method
  • Token caching — silent refresh, no re-login every session
  • Retry logic — automatic retries on throttled Graph API calls
  • TypeScript — fully typed, clean architecture, MIT licensed

For Users: Connect in 1 Click

If someone is already hosting this server for your company:

  1. Claude asks you to connect Microsoft Teams
  2. You click the auth link
  3. Sign in with your Microsoft work account
  4. Done — Claude can now read your Teams

No API keys, no Azure portal, no setup.

For Developers: Self-Host

1. Clone & Install

bash
git clone https://github.com/SurgeEnterpriseAI/teams-mcp-server.gitcd teams-mcp-servernpm installnpm run build

2. Azure AD App Registration

  1. Go to Azure Portal → App registrations → New registration
  2. Name: Teams MCP Server
  3. Supported account types: "Accounts in any organizational directory (Any Azure AD directory - Multitenant)"
  4. Redirect URI: Web → https://your-server.com/auth/callback (hosted) and/or http://localhost:3333/callback (local STDIO sign-in)
  5. Click Register

Configure:

  • Certificates & secrets → New client secret → copy the Value
  • API Permissions → Add Delegated (Microsoft Graph):
    • ChannelMessage.Read.All, ChannelMessage.Send
    • Chat.Read, Chat.ReadWrite, ChatMessage.Send
    • Team.ReadBasic.All, Channel.ReadBasic.All
    • User.Read
  • Click Grant admin consent (for your own tenant; other tenants consent on first login)

3. Configure & Deploy

bash
cp .env.example .env# Set TEAMS_CLIENT_ID, TEAMS_CLIENT_SECRET# Set BASE_URL and REDIRECT_URI to your production URL# TEAMS_AUTHORITY=common (multi-tenant, default)

Deploy to Railway, Render, Azure App Service, or any Node.js host:

bash
# Railwayrailway login && railway init && railway up
# Or Azureaz webapp up --name teams-mcp-server --runtime "NODE:20-lts"
# Or just run directlyTRANSPORT_MODE=http node dist/index.js

4. Submit to MCP Registry

Once deployed and tested, submit your server URL to Anthropic's MCP connector registry. Users will then see "Microsoft Teams" as a connect option in Claude Cowork — just like Slack and Gmail.

For Claude Code Users: Local STDIO Mode

Quickest: claude mcp add as in Install in 3 steps. Or add to your .mcp.json from a clone:

json
{  "mcpServers": {    "teams": {      "command": "node",      "args": ["/path/to/teams-mcp-server/dist/index.js"],      "cwd": "/path/to/teams-mcp-server"    }  }}

First run will open your browser for Microsoft login. After that, tokens are cached.

Claude Desktop

In claude_desktop_config.json:

json
{  "mcpServers": {    "teams": {      "command": "npx",      "args": ["-y", "microsoft-teams-mcp-server"],      "env": {        "TEAMS_CLIENT_ID": "<your-client-id>",        "TEAMS_CLIENT_SECRET": "<your-secret>",        "TRANSPORT_MODE": "stdio"      }    }  }}

Available Tools

ToolWhat it does
teams_list_teamsList all your Teams
teams_list_channelsList channels in a team
teams_read_channel_messagesRead recent channel messages
teams_send_channel_messageSend a message to a channel
teams_reply_to_messageReply in a channel thread
teams_read_message_repliesRead thread replies
teams_list_chatsList your DMs and group chats
teams_read_chat_messagesRead messages from a chat
teams_send_chat_messageSend a direct/group chat message
teams_search_messagesSearch messages across all Teams
teams_get_profileGet your Microsoft 365 profile

Architecture

src/├── index.ts               Main entry (auto-detects transport)├── config.ts              Central configuration├── logger.ts              Structured logging├── types.ts               TypeScript interfaces├── sessions.ts            Multi-user session manager├── auth/│   ├── oauth.ts           MSAL OAuth (multi-tenant, per-user)│   └── token-store.ts     Persistent token cache├── graph/│   ├── client.ts          Graph HTTP client with retries│   ├── teams.ts           Teams & channels API│   ├── messages.ts        Channel messages API│   ├── chats.ts           DM & group chat API│   └── search.ts          Search & profile API├── mcp/│   ├── server.ts          MCP server factory│   └── tools/             11 tool definitions├── transport/│   ├── stdio.ts           STDIO (Claude Code)│   └── http.ts            Express + SSE (Cowork / remote)

Environment Variables

VariableRequiredDefaultDescription
TEAMS_CLIENT_IDYes—Azure AD app client ID
TEAMS_CLIENT_SECRETYes—Azure AD client secret
TEAMS_AUTHORITYNocommoncommon for multi-tenant, or a specific tenant ID
TRANSPORT_MODENoautoauto, stdio, or http
PORTNo3000HTTP server port
BASE_URLNohttp://localhost:3000Public URL
REDIRECT_URINo{BASE_URL}/auth/callbackOAuth callback URL
TOKEN_STORE_PATHNo./.data/tokensToken cache directory
LOG_LEVELNoinfoLogging level

For AI assistants

A short, structured summary for LLMs and AI search lives in docs/llms.md.

License

MIT — LICENSE

Contributing

Issues and PRs welcome. Built by SurgeEnterpriseAI — Surge Software Solutions, Bengaluru.

来源:README.md,提交 a6475b5

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Microsoft 集成