MCP server providing comprehensive Microsoft Teams and Graph API access for AI assistants including messaging, search, and user management.
A Model Context Protocol (MCP) server that provides seamless integration with Microsoft Graph APIs, enabling AI assistants to interact with Microsoft Teams, users, and organizational data.
To use this MCP server in Cursor/Claude/VS Code, add the following configuration:
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": ["-y", "@floriscornel/teams-mcp@latest"]
}
}
}
Teams Management
Channel Operations
Team Members
The following tools now support rich message formatting in Teams channels and chats:
send_channel_message
send_chat_message
reply_to_channel_message
You can specify the format
parameter to control the message formatting:
text
(default): Plain textmarkdown
: Markdown formatting (bold, italic, lists, links, code, etc.) - converted to sanitized HTMLWhen format
is set to markdown
, the message content is converted to HTML using a secure markdown parser and sanitized to remove potentially dangerous content before being sent to Teams.
If format
is not specified, the message will be sent as plain text.
{
"teamId": "...",
"channelId": "...",
"message": "**Bold text** and _italic text_\n\n- List item 1\n- List item 2\n\n[Link](https://example.com)",
"format": "markdown"
}
{
"chatId": "...",
"message": "Simple plain text message",
"format": "text"
}
**text**
), italic (_text_
), strikethrough (~~text~~
)[text](https://github.com/floriscornel/teams-mcp/blob/main/url){:target="_blank"}
- item
) and numbered (1. item
)`code`
and blocks
code
# H1
through ###### H6
<br>
tags> quoted text
## Install dependencies
npm install
## Build the project
npm run build
## Set up authentication
npm run auth
User.Read
- Read user profileUser.ReadBasic.All
- Read basic user infoTeam.ReadBasic.All
- Read team informationChannel.ReadBasic.All
- Read channel informationChannelMessage.Read.All
- Read channel messagesChannelMessage.Send
- Send channel messagesChat.Read
- Read chat messagesChat.ReadWrite
- Create and manage chatsMail.Read
- Required for Microsoft Search APICalendars.Read
- Required for Microsoft Search APIFiles.Read.All
- Required for Microsoft Search APISites.Read.All
- Required for Microsoft Search API## Development mode with hot reload
npm run dev
## Production mode
npm run build && node dist/index.js
authenticate
- Initiate OAuth authentication flowlogout
- Clear authentication tokensget_current_user
- Get authenticated user informationsearch_users
- Search for users by name or emailget_user
- Get detailed user information by ID or emaillist_teams
- List user’s joined teamslist_channels
- List channels in a specific teamget_channel_messages
- Retrieve messages from a team channel with pagination and filteringsend_channel_message
- Send a message to a team channellist_team_members
- List members of a specific teamlist_chats
- List user’s chats (1:1 and group)get_chat_messages
- Retrieve messages from a specific chat with pagination and filteringsend_chat_message
- Send a message to a chatcreate_chat
- Create a new 1:1 or group chatsearch_messages
- Search across all Teams messages using KQL syntaxget_recent_messages
- Get recent messages with advanced filtering optionsget_my_mentions
- Find messages mentioning the current userFirst, authenticate with Microsoft Graph:
npx @floriscornel/teams-mcp@latest authenticate
Check your authentication status:
npx @floriscornel/teams-mcp@latest check
Logout if needed:
npx @floriscornel/teams-mcp@latest logout
This MCP server is designed to work with AI assistants like Claude/Cursor/VS Code through the Model Context Protocol.
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": ["-y", "@floriscornel/teams-mcp@latest"]
}
}
}
MIT License - see LICENSE file for details
For issues and questions: