teams-mcp
Enables AI assistants to interact with Microsoft Teams, users, chats, files, and organizational data via Microsoft Graph APIs, with added support for creating, updating, listing, and inspecting Teams meetings and calendar events.
README
Teams MCP — with Meetings & Calendar
A Model Context Protocol (MCP) server that provides seamless integration with Microsoft Graph APIs, enabling AI assistants to interact with Microsoft Teams, users, chats, files, organizational data — and to create, update, list, and inspect Teams meetings and calendar events.
About this project. This project is a fork of
@floriscornel/teams-mcp(MIT). It starts from the upstream codebase — keeping all of its Teams messaging, chat, and search tooling — and is maintained here as an independent repository (it does not track the original upstream).On top of that base, this fork adds a full meetings & calendar toolset:
create_meeting,create_calendar_meeting,update_calendar_meeting,delete_meeting,delete_calendar_event,list_calendar_events,get_meeting,get_short_link, andget_attendance_report— covering recurrence, Markdown agendas, auto-recording, attendance reports, and short-link reconstruction.It runs locally from a build — it is not published to npm, so install it from source as described below.
📦 Installation
# From the project directory
npm install # install dependencies
npm run build # compile TypeScript to dist/
node dist/index.js authenticate # sign in (device code flow)
Then register the built server with your MCP client. For Claude Code:
# Global (available in every project)
claude mcp add teams --scope user -- node /absolute/path/to/teams-mcp/dist/index.js
# Or local to the current project (default scope)
claude mcp add teams -- node /absolute/path/to/teams-mcp/dist/index.js
For Cursor / Claude Desktop / VS Code, add to the MCP config:
{
"mcpServers": {
"teams": {
"command": "node",
"args": ["/absolute/path/to/teams-mcp/dist/index.js"]
}
}
}
Tip: the configured command points at
dist/index.js. Don't move/delete the folder, and after changing the source runnpm run buildagain (and reconnect the MCP server in your client) to pick up the new build.
🚀 Features
📅 Meetings & Calendar (added in this fork)
- Create meetings
- Ad-hoc Teams meeting links (instant join URL, no calendar entry)
- Scheduled calendar meetings (real Outlook event + Teams join link + invitees)
- Recurrence — daily / weekly / monthly series, bounded by a count or an end date
- Markdown agendas — meeting descriptions written in Markdown, converted to HTML
- Auto-recording — start recording automatically when the meeting begins (off by default)
- Update & delete — retitle/reschedule events, delete meetings or whole recurring series
- List the calendar — events in any date range (defaults to the current week), with organizer, location, join link, and event IDs
- Short links — reconstruct the human-readable
teams.microsoft.com/meet/<id>?p=<passcode>link, which Graph does not expose directly - Attendance reports — post-meeting participants, durations, and roles
Not possible via Graph: real-time presence (who is currently in a call, or whether a meeting has started). Attendance data is historical only.
🔐 Authentication
- OAuth 2.0 device code authentication flow with Microsoft Graph
- Secure token management, cache persistence, and refresh token renewal
- Authentication status checking and logout support
- Read-only mode with reduced scopes
- Direct
AUTH_TOKENsupport for pre-issued Microsoft Graph access tokens
👥 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 joined teams, access team details and metadata
- Channel Operations — list channels, retrieve messages and replies, send/reply/edit/soft-delete, message reactions, importance levels, inline image attachments
- Team Members — list members and roles, search users for
@mentions
💬 Chat & Messaging
- List, create, and read 1:1 and group chats (with pagination)
- Send, edit, and soft-delete chat messages
- Message reactions
📎 Media & Attachments
- Download hosted content (images, files) from chat and channel messages
- Upload and send any file type to channels (SharePoint) and chats (OneDrive), with large-file resumable sessions
🔍 Advanced Search & Discovery
- Search across Teams channels and chats via the Microsoft Search API (KQL)
- Filter by sender, mentions, attachments, read state, and date ranges
- Find messages mentioning the current user
📅 Meetings & Calendar — Tool Reference
Read-only
| Tool | Parameters | Description |
|---|---|---|
list_calendar_events |
startDateTime?, endDateTime?, timeZone?, includeShortLinks? |
List events in a date range (defaults to the current week, Monday→next Monday). Expands recurring series into occurrences. With includeShortLinks: true, also resolves the short link for each meeting (one extra Graph call per event). |
get_meeting |
meetingId |
Fetch an online meeting's subject, join link, and times by its onlineMeeting ID. |
get_short_link |
joinWebUrl |
Resolve the short teams.microsoft.com/meet/<id>?p=<passcode> link from a long join URL. |
get_attendance_report |
meetingId |
Post-meeting attendance: total participants, per-person duration and role. Requires OnlineMeetingArtifact.Read.All (admin consent). |
Write
| Tool | Parameters | Description |
|---|---|---|
create_meeting |
subject, startDateTime?, endDateTime?, recordAutomatically? |
Create an ad-hoc Teams meeting link. Fast, but does not create a calendar entry or invite anyone. |
create_calendar_meeting |
subject, startDateTime, endDateTime, timeZone?, attendees?, body?, recurrence?, recordAutomatically? |
Create a scheduled meeting as an Outlook calendar event with a Teams join link. Supports invitees, Markdown agenda, recurring series, and auto-recording. Also returns the reconstructed short link. |
update_calendar_meeting |
eventId, subject?, startDateTime?, endDateTime?, timeZone?, location?, body? |
Edit an existing calendar event. Only the fields you pass are changed. |
delete_meeting |
meetingId |
Delete an ad-hoc online meeting (invalidates its join link). |
delete_calendar_event |
eventId |
Delete a calendar event. Deleting a recurring series' master event removes all occurrences. |
Ad-hoc link vs. calendar meeting
create_meeting |
create_calendar_meeting |
|
|---|---|---|
| Appears in the calendar | ❌ No (ad-hoc link only) | ✅ Yes, on its date |
| Invitees / invitations | ❌ | ✅ |
| Recurrence | ❌ | ✅ |
| Markdown agenda | ❌ | ✅ |
| Auto-recording | ✅ | ✅ (resolved via the backing onlineMeeting) |
recordAutomaticallyis a property of theonlineMeetingresource, not the calendarevent. For calendar meetings, the server transparently looks up the backing onlineMeeting (by its join URL) and enables recording on it.
Examples
Recurring weekly meeting with a Markdown agenda:
{
"subject": "Weekly sync",
"startDateTime": "2026-06-04T16:00:00",
"endDateTime": "2026-06-04T18:00:00",
"timeZone": "Europe/Paris",
"body": "## Agenda\n- Review last week\n- Blockers\n- Next steps",
"recurrence": { "pattern": "weekly", "daysOfWeek": ["thursday"], "interval": 1 }
}
Calendar meeting with invitees and auto-recording:
{
"subject": "Quarterly review",
"startDateTime": "2026-06-22T10:00:00",
"endDateTime": "2026-06-22T11:00:00",
"timeZone": "UTC",
"attendees": [
{ "email": "alex@contoso.com", "name": "Alex", "type": "required" }
],
"recordAutomatically": true
}
Reschedule and rename an existing event:
{
"eventId": "AAMk...",
"subject": "Quarterly review (rescheduled)",
"startDateTime": "2026-06-23T14:00:00",
"endDateTime": "2026-06-23T15:00:00",
"timeZone": "UTC"
}
Rich Message Formatting Support
The following tools support rich message formatting in Teams channels and chats:
send_channel_messagesend_chat_messagereply_to_channel_messageupdate_channel_messageupdate_chat_messagesend_file_to_channelsend_file_to_chat
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.
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 fenced code blocks - Headings:
# H1through###### H6 - Blockquotes:
> quoted text - Tables: GitHub-flavored markdown tables
The same Markdown→HTML conversion powers the
bodyparameter ofcreate_calendar_meetingandupdate_calendar_meeting.
LLM-Friendly Content Format
Messages retrieved from the Microsoft Graph API are returned as raw HTML containing Teams-specific tags. To make this content more consumable by AI assistants, these tools support automatic HTML-to-Markdown conversion via the contentFormat parameter (markdown default, or raw):
get_chat_messagesget_channel_messagesget_channel_message_repliessearch_messagesget_my_mentions
🔧 Configuration
Prerequisites
- Node.js 18+
- Microsoft 365 account (work/school tenant — personal accounts cannot create Teams meetings via Graph)
- Microsoft Graph delegated permissions for the scopes below
Required Microsoft Graph Permissions
Full mode (default):
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 messages and repliesChannelMessage.ReadWrite— Edit and delete channel messagesChat.Read— Read chat messages (read-only scope)Chat.ReadWrite— Create/manage chats, send/edit/delete chat messagesTeamMember.Read.All— Read team membersFiles.ReadWrite.All— File uploads to channels and chatsOnlineMeetings.ReadWrite— Create/read/delete Teams meetings and enable auto-recording (meetings)Calendars.ReadWrite— Create/list/update/delete calendar events (meetings)OnlineMeetingArtifact.Read.All— Read attendance reports (meetings; typically requires admin consent)
Read-only mode (TEAMS_MCP_READ_ONLY=true) requests only the read scopes:
User.Read, User.ReadBasic.All, Team.ReadBasic.All, Channel.ReadBasic.All, ChannelMessage.Read.All, TeamMember.Read.All, Chat.Read.
After adding a new scope (e.g. enabling attendance reports), re-authenticate so the cached token requests it:
node dist/index.js logout && node dist/index.js authenticate.
Token Storage
- Auth metadata:
~/.msgraph-mcp-auth.json - Token cache:
~/.teams-mcp-token-cache.json
🛠️ Usage
Starting the Server
# Development mode with hot reload
npm run dev
# Production mode
npm run build && node dist/index.js
# Read-only mode (disables all write tools)
TEAMS_MCP_READ_ONLY=true node dist/index.js
CLI Commands
node dist/index.js authenticate # Authenticate with full scopes
node dist/index.js authenticate --read-only # Authenticate with read-only scopes
node dist/index.js check # Check authentication status
node dist/index.js logout # Clear authentication
node dist/index.js # Start MCP server (default)
Environment Variables
TEAMS_MCP_READ_ONLY=true— Start the MCP server in read-only modeAUTH_TOKEN=<jwt>— Use a pre-existing Microsoft Graph access token instead of MSAL login
🧰 Available MCP Tools
39 tools total — 20 read-only, 19 write (write tools are disabled when TEAMS_MCP_READ_ONLY=true).
Authentication
auth_status— Check current authentication status
User Operations
get_current_user,search_users,get_user
Teams Operations
list_teams,list_channels,get_channel_messages,get_channel_message_replies,list_team_members,search_users_for_mentionssend_channel_message,reply_to_channel_message,update_channel_message,delete_channel_message,send_file_to_channelset_channel_message_reaction,unset_channel_message_reaction
Chat Operations
list_chats,get_chat_messagessend_chat_message,create_chat,update_chat_message,delete_chat_message,send_file_to_chatset_chat_message_reaction,unset_chat_message_reaction
Meetings & Calendar
list_calendar_events,get_meeting,get_short_link,get_attendance_report(read-only)create_meeting,create_calendar_meeting,update_calendar_meeting,delete_meeting,delete_calendar_event(write)
Media Operations
download_message_hosted_content,download_chat_hosted_content
Search Operations
search_messages,get_my_mentions
🔒 Security
- Authentication via Microsoft's OAuth 2.0 flow or a caller-provided Microsoft Graph token
- Access tokens are automatically renewed using cached refresh tokens
- Token cache and auth metadata are stored locally in your home directory
- Markdown content is sanitized before sending HTML to Teams (and into meeting agendas)
AUTH_TOKENis validated to ensure it targetshttps://graph.microsoft.com
📝 License
MIT License — see the LICENSE file. Original work © Floris Cornel; meeting/calendar additions in this fork are also MIT.
🙏 Credits
A fork of @floriscornel/teams-mcp (MIT), extended with the meetings & calendar toolset.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。