Shows code coverage metrics for the project through integration badges
Provides repository status tracking through badges for GitHub projects, displaying information like stars count
Supports formatting Teams messages using markdown syntax, with features like bold text, lists, and links
Required runtime environment for the MCP server with version 18+ needed for proper operation
Package distribution platform where the MCP server is published and can be installed from
Provides dynamic badges showing npm version, downloads, license, and other project metrics
Teams MCP
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.
📦 Installation
To use this MCP server in Cursor/Claude/VS Code, add the following configuration:
🚀 Features
🔐 Authentication
OAuth 2.0 authentication flow with Microsoft Graph
Secure token management and refresh
Authentication status checking
👥 User Management
Get current user information
Search users by name or email
Retrieve detailed user profiles
Access organizational directory data
🏢 Microsoft Teams Integration
Teams Management
List user's joined teams
Access team details and metadata
Channel Operations
List channels within teams
Retrieve channel messages
Send messages to team channels
Support for message importance levels (normal, high, urgent)
Team Members
List team members and their roles
Access member information
💬 Chat & Messaging
1:1 and Group Chats
List user's chats
Create new 1:1 or group conversations
Retrieve chat message history with filtering and pagination
Send messages to existing chats
🔍 Advanced Search & Discovery
Message Search
Search across all Teams channels and chats using Microsoft Search API
Support for KQL (Keyword Query Language) syntax
Filter by sender, mentions, attachments, importance, and date ranges
Get recent messages with advanced filtering options
Find messages mentioning specific users
Rich Message Formatting Support
The following tools now support rich message formatting in Teams channels and chats:
send_channel_message
send_chat_message
reply_to_channel_message
Format Options
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 HTML
When 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.
Example Usage
Security Features
HTML Sanitization: All markdown content is converted to HTML and sanitized to remove potentially dangerous elements (scripts, event handlers, etc.)
Allowed Tags: Only safe HTML tags are permitted (p, strong, em, a, ul, ol, li, h1-h6, code, pre, etc.)
Safe Attributes: Only safe attributes are allowed (href, target, src, alt, title, width, height)
XSS Prevention: Content is automatically sanitized to prevent cross-site scripting attacks
Supported Markdown Features
Text formatting: Bold (
**text**
), italic (_text_
), strikethrough (~~text~~
)Links:
[text](url)
Lists: Bulleted (
- item
) and numbered (1. item
)Code: Inline
`code`
and blocksHeadings:
# H1
through###### H6
Line breaks: Automatic conversion of newlines to
<br>
tagsBlockquotes:
> quoted text
Tables: GitHub-flavored markdown tables
📦 Installation
🔧 Configuration
Prerequisites
Node.js 18+
Microsoft 365 account with appropriate permissions
Azure App Registration with Microsoft Graph permissions
Required Microsoft Graph Permissions
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
🛠️ Usage
Starting the Server
Available MCP Tools
Authentication
authenticate
- Initiate OAuth authentication flowlogout
- Clear authentication tokensget_current_user
- Get authenticated user information
User Operations
search_users
- Search for users by name or emailget_user
- Get detailed user information by ID or email
Teams Operations
list_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 team
Chat Operations
list_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 chat
Search Operations
search_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 user
📋 Examples
Authentication
First, authenticate with Microsoft Graph:
Check your authentication status:
Logout if needed:
Integrating with Cursor/Claude
This MCP server is designed to work with AI assistants like Claude/Cursor/VS Code through the Model Context Protocol.
🔒 Security
All authentication is handled through Microsoft's OAuth 2.0 flow
Tokens are securely stored and automatically refreshed
No sensitive data is logged or exposed
Follows Microsoft Graph API security best practices
📝 License
MIT License - see LICENSE file for details
🤝 Contributing
Fork the repository
Create a feature branch
Make your changes
Run linting and formatting
Submit a pull request
📞 Support
For issues and questions:
Check the existing GitHub issues
Review Microsoft Graph API documentation
Ensure proper authentication and permissions are configured
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A Model Context Protocol server that provides AI assistants with access to Microsoft Teams, enabling interaction with teams, channels, chats, and organizational data through Microsoft Graph APIs.
- 📦 Installation
- 🚀 Features
- Rich Message Formatting Support
- 📦 Installation
- 🔧 Configuration
- 🛠️ Usage
- 📋 Examples
- 🔒 Security
- 📝 License
- 🤝 Contributing
- 📞 Support
Related Resources
Related MCP Servers
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -361
- -securityAlicense-qualityA Model Context Protocol server that enables AI assistants to manage meeting data, including creating meeting bots, searching transcripts, and organizing calendar events.Last updated -20MIT License
- -securityFlicense-qualityA Model Context Protocol server that bridges Microsoft Teams and MCP-compatible clients, enabling chat integration, message handling, and advanced search capabilities without REST API endpoints.Last updated -1
- -securityFlicense-qualityA Model Context Protocol server that bridges Microsoft Teams with MCP-compatible clients (LLMs, agentic frameworks, CLI), enabling chat integration, message search, and event streaming without traditional REST API endpoints.Last updated -