View as Markdown

Microsoft Teams Integration

Collaborate in Teams channels and chats using Microsoft Graph — teams, channels, messages, and profile.

The Microsoft Teams integration provides access to collaborate in Teams channels and chats using Microsoft Graph — teams, channels, messages, and profile. through the Integrate MCP server.

Installation

The Microsoft Teams integration is included with the SDK:

import { teamsIntegration } from "integrate-sdk/server";

Setup

1. Create a Microsoft Teams OAuth App

  1. Go to Azure Portal — App Registrations
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Microsoft Teams integration to your server configuration. The integration automatically reads TEAMS_CLIENT_ID and TEAMS_CLIENT_SECRET from your environment variables:

import { createMCPServer, teamsIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    teamsIntegration({
      scopes: ["offline_access", "User.Read", "Team.ReadBasic.All", "Channel.ReadBasic.All", "ChannelMessage.Read.All", "ChannelMessage.Send", "Chat.Read", "Chat.ReadWrite"], // Optional
    }),
  ],
});

You can override the environment variables by passing explicit values:

teamsIntegration({
  clientId: process.env.CUSTOM_TEAMS_ID,
  clientSecret: process.env.CUSTOM_TEAMS_SECRET,
      scopes: ["offline_access", "User.Read", "Team.ReadBasic.All", "Channel.ReadBasic.All", "ChannelMessage.Read.All", "ChannelMessage.Send", "Chat.Read", "Chat.ReadWrite"], // Optional
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("teams");
const result = await client.teams.getChannel({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, teamsIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [teamsIntegration()],
});

Configuration Options

export interface TeamsIntegrationConfig {
  /** Azure AD app client ID (defaults to TEAMS_CLIENT_ID env var) */
  clientId?: string;

Default Scopes

These defaults are applied unless you override scopes in the integration config:

  • offline_access
  • User.Read
  • Team.ReadBasic.All
  • Channel.ReadBasic.All
  • ChannelMessage.Read.All
  • ChannelMessage.Send
  • Chat.Read
  • Chat.ReadWrite

Tools

teams_get_channel

Get channel

export type TeamsGetChannelParams = Record<string, unknown>;

teams_get_chat

Get chat

export type TeamsGetChatParams = Record<string, unknown>;

teams_get_profile

Get profile

export type TeamsGetProfileParams = Record<string, unknown>;

teams_get_team

Get team

export type TeamsGetTeamParams = Record<string, unknown>;

teams_list_channel_messages

List channel messages

export type TeamsListChannelMessagesParams = Record<string, unknown>;

teams_list_channels

List channels

export type TeamsListChannelsParams = Record<string, unknown>;

teams_list_chat_messages

List chat messages

export type TeamsListChatMessagesParams = Record<string, unknown>;

teams_list_chats

List chats

export type TeamsListChatsParams = Record<string, unknown>;

teams_list_teams

List teams

export type TeamsListTeamsParams = Record<string, unknown>;

teams_reply_channel_message

Reply channel message

export type TeamsReplyChannelMessageParams = Record<string, unknown>;

teams_send_channel_message

Send channel message

export type TeamsSendChannelMessageParams = Record<string, unknown>;

teams_send_chat_message

Send chat message

export type TeamsSendChatMessageParams = Record<string, unknown>;

Notes

  • Category: Communication
  • Authentication mode: OAuth