Get the FREE Ultimate OpenClaw Setup Guide →

teams

MCP server providing comprehensive Microsoft Teams and Graph API access for AI assistants including messaging, search, and user management.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio floriscornel-teams-mcp npx -y @floriscornel/teams-mcp@latest \
  --env AZURE_AD_CLIENT_ID="Application (client) ID" \
  --env AZURE_AD_TENANT_ID="Tenant ID" \
  --env AZURE_AD_CLIENT_SECRET="Application secret"

How to use

This MCP server provides a bridge between your AI assistant and Microsoft Graph APIs to interact with Microsoft Teams, users, and organizational data. It handles authentication via OAuth 2.0 with Microsoft Graph, and exposes capabilities for managing teams, channels, messages, and media, as well as performing advanced search across chats and channels. You can list teams the user belongs to, read and send messages in channels, manage channel metadata, and work with 1:1 or group chats. The server also offers rich message formatting support, including Markdown-to-HTML conversion, attachment handling, and safe HTML sanitization to ensure content sent to Teams is secure.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed
  • Access to npm (or npx available in your environment)
  1. Install the MCP server via the provided configuration snippet
  • You can use your MCP runner to register this server. The recommended setup shows using npx to install the latest package:

Code:

{
  "mcpServers": {
    "teams-mcp": {
      "command": "npx",
      "args": ["-y", "@floriscornel/teams-mcp@latest"]
    }
  }
}
  1. Configure environment variables (if your environment requires them)
  • The MCP server expects credentials for Microsoft Graph authentication. Example environment variables:
AZURE_AD_CLIENT_ID=Your-Application-Client-Id
AZURE_AD_CLIENT_SECRET=Your-Application-Client-Secret
AZURE_AD_TENANT_ID=Your-Tenant-Id
  1. Run the server with your MCP runner
  • Ensure your MCP tool picks up the configuration and starts the server. For the npx-based setup, the runner will install and launch the package on demand according to the mcpServers entry.
  1. Verify accessibility
  • Once running, you should be able to authenticate with Microsoft Graph, list teams, channels, and messages, and perform the supported operations via your MCP client.

Additional notes

Tips and common issues:

  • Ensure your Microsoft Graph app is configured with the correct permissions (e.g., Teams.Read.All, ChannelMessage.Read.All, Chat.Read, etc.) and admin consent where required.
  • If you encounter authentication errors, double-check the client ID, secret, and tenant ID, and ensure the redirect/redirect URI configuration in your Azure app matches your deployment.
  • For large file uploads or rich media messages, confirm that the MCP runner and network allow large payloads and resumable uploads as supported by the server features.
  • Use the contentFormat and format parameters to control how message content is returned and rendered, especially when interacting with LLMs.
  • Review rate limits and pagination when listing channels, messages, or searches to implement robust client-side handling.

Related MCP Servers

Sponsor this space

Reach thousands of developers