teams-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@teams-mcp send 'Good morning' to team chat via Power Automate"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Teams MCP Server (Secure)
A secure Microsoft Teams MCP server using only official Microsoft packages.
Security
This server uses exclusively official Microsoft packages:
Package | Source | Purpose |
| Authentication | |
| Graph API calls | |
| MCP protocol |
No third-party authentication or API wrappers.
Related MCP server: Teams MCP
Prerequisites
Node.js 18+
Azure CLI (
az login) - required for authentication
Installation
npm install
npm run buildAuthentication
The server uses Azure CLI credentials (az login). For enterprise tenants with Conditional Access policies blocking Graph API Chat permissions, use the Power Automate integration instead.
Power Automate Integration (Recommended for Enterprise)
If your organization blocks direct Graph API access to Teams chats, you can use Power Automate as a bridge:
One-time Setup
Go to Power Automate
Create a new Instant cloud flow
Add trigger: "When an HTTP request is received"
Click "Use sample payload" and enter:
{"message": "Hello"}Add action: "Post message in a chat or channel" (Microsoft Teams)
Configure the Teams action with your target chat/channel
For Message, select message from Dynamic content
Save and turn on the flow
Copy the HTTP POST URL from the trigger
Usage
# Set your Power Automate flow URL
export POWER_AUTOMATE_URL="https://....powerplatform.com/.../invoke?api-version=1"
# Post a message (uses Azure AD auth automatically)
curl -X POST "$POWER_AUTOMATE_URL" \
-H "Authorization: Bearer $(az account get-access-token --resource https://service.flow.microsoft.com/ --query accessToken -o tsv)" \
-H "Content-Type: application/json" \
-d '{"message": "Hello from MCP!"}'Usage
Add to your MCP config
VS Code (.vscode/mcp.json):
{
"servers": {
"teams": {
"type": "stdio",
"command": "node",
"args": ["C:/teams-mcp/dist/index.js"]
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"teams": {
"command": "node",
"args": ["C:/teams-mcp/dist/index.js"]
}
}
}Available Tools
Tool | Description |
| Get authenticated user info |
| List user's Teams chats |
| List joined Teams |
| List channels in a Team |
| Send message to a chat (requires Graph permissions) |
| Send message to a channel (requires Graph permissions) |
| Get messages from a chat |
| Get messages from a channel |
| Send message via Power Automate (bypasses Graph restrictions) |
Examples
Send a message via Power Automate (Recommended)
{
"tool": "send_via_power_automate",
"arguments": {
"flowUrl": "https://....powerplatform.com/.../invoke?api-version=1",
"message": "Hello from MCP!"
}
}Send a message to a chat (requires Graph permissions)
{
"tool": "send_chat_message",
"arguments": {
"chatId": "19:abc123@thread.v2",
"message": "Hello from MCP!"
}
}License
MIT
Available Tools
9 toolsget_channel_messagesB
Get recent messages from a Teams channel
Inputs: teamId (required), channelId (required), top.
get_chat_messagesA
Get recent messages from a Teams chat
Inputs: chatId (required), top.
get_current_userA
Get the current authenticated user's information
Inputs: no named parameters.
list_channelsB
List channels in a specific Team
Inputs: teamId (required).
list_chatsB
List the user's Teams chats
Inputs: top.
list_teamsA
List Teams the user has joined
Inputs: no named parameters.
send_channel_messageC
Send a message to a Teams channel
Inputs: teamId (required), message (required), channelId (required).
send_chat_messageC
Send a message to a Teams chat
Inputs: chatId (required), message (required).
send_via_power_automateA
Send a message via Power Automate flow (bypasses Graph API auth restrictions)
Inputs: flowUrl (required), message (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: user info, listing different entities (chats, teams, channels), and sending/retrieving messages for chat vs. channel. The send_via_power_automate tool is uniquely positioned as an alternative delivery mechanism, so no two tools are easily confused.
All tool names follow a consistent verb_noun pattern using snake_case (get_, list_, send_), making the set predictable and easy to navigate. The one outlier, send_via_power_automate, still adheres to the same verb-first structure.
With 9 tools, the server is well-scoped for a Teams messaging-focused MCP. It provides a solid set of read and send operations without being overbuilt or feeling sparse, fitting comfortably within the ideal 3-15 range.
The tool surface covers the core lifecycle for messaging: listing entities, reading messages, and sending to both chats and channels. Gaps like updating/deleting messages or creating teams/channels exist, but these are reasonable omissions for a communication-focused server and do not block primary workflows.
Maintenance
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Read email/chat conversations, messages, contacts and teams; draft, send and update threads.
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Microsoft 365, CRM, Partner Center and tenant operations for organisations and MSPs.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to manage Microsoft Teams through the Graph API, including sending messages, managing chats, creating teams, and searching communications.29MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with Microsoft Teams, users, and organizational data via Microsoft Graph APIs, including sending messages, managing chats and channels, and searching messages.MIT
- AlicenseAqualityBmaintenanceEnables agents to read Microsoft Teams data and, with elevated modes, post messages, reply in threads, and send chats via Microsoft Graph, with safe-by-default permission gates.961 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph APIs for messaging, search, user management, file uploads, and chat/channel operations.12 npmMIT