MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

Implémentation du Model Context Protocol (MCP) pour Microsoft Teams, permettant l’accès aux équipes, canaux, messages et conversations. Ce projet facilite l’exploitation des échanges collaboratifs par des modèles d’IA pour la recherche, le résumé et l’automatisation des workflows.

创建于 1/15/2026
更新于 about 7 hours ago
Repository documentation and setup instructions

Microsoft Teams MCP Server

A Model Context Protocol (MCP) server that connects Claude Desktop to Microsoft Teams. This integration allows Claude to access your chats, teams, and channels, enabling you to read messages, send replies, and manage your Teams environment directly from your AI assistant.

Features

  • Chats: List recent chats, read message history, and send messages to one-on-one or group chats.
  • Teams: List teams you have joined.
  • Channels: List channels within a team and post messages to them.
  • Creation: Create new chats and teams involved.

Prerequisites

  • Node.js (v16 or higher)
  • A Microsoft Work or School account.
  • Access to Azure Portal to create an App Registration.

Installation

  1. Clone the repository (or download usage files):

    git clone <your-repo-url>
    cd mcp-teams-01
    
  2. Install dependencies:

    npm install
    

Configuration

1. Azure App Registration

  1. Go to Azure Portal > App registrations.
  2. Click New registration.
    • Name: mcp-teams-server
    • Supported account types: "Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant)".
    • Redirect URI: Select Public client/native, enter http://localhost.
  3. Click Register.
  4. Copy the Application (client) ID and Directory (tenant) ID.

2. API Permissions

Go to API permissions > Add a permission > Microsoft Graph > Delegated permissions and add:

  • User.Read
  • Chat.Read, Chat.ReadWrite, Chat.ReadWrite.All
  • ChatMember.Read, ChatMember.ReadWrite
  • ChatMessage.Read, ChatMessage.Send
  • Team.ReadBasic.All, Team.Create
  • Channel.Create, ChannelMessage.Send, ChannelMessage.Read.All
  • TeamsActivity.Send

Note: An administrator may need to grant admin consent for some of these permissions.

3. Environment Variables

Create a .env file in the root directory:

AZURE_CLIENT_ID=your_client_id_here
AZURE_TENANT_ID=common
# Optional
LOG_LEVEL=info

Usage with Claude Desktop

Add the server to your claude_desktop_config.json:

Windows: %APPDATA%\Claude\claude_desktop_config.json Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "teams": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-teams-01/server.js"]
    }
  }
}

Restart Claude Desktop. On the first usage of a tool, follow the terminal/log instructions to authenticate via microsoft.com/devicelogin.

Available Tools

| Tool | Description | |------|-------------| | list_chats | View recent one-on-one and group chats. | | list_chat_messages | Read the message history of a specific chat. | | send_chat_message | Send a message to a chat. | | create_chat | Create a new chat with colleagues. | | list_teams | View teams you are a member of. | | list_channels | View channels within a team. | | send_channel_message | Post a message to a specific channel. | | create_team | Create a new Standard team. |

Troubleshooting

  • Authentication Loops: Delete token_cache.json to force a fresh login.
  • "Server disconnected": Check logs at %APPDATA%\Claude\logs (Windows) or ~/Library/Logs/Claude (Mac).
  • Permission Errors: Ensure you have granted "Admin Consent" in Azure if required by your organization policies.

License

MIT