Teams MCP is a Model Context Protocol server enabling AI assistants to interact with Microsoft Teams, users, and organizational data through Microsoft Graph APIs. It provides comprehensive access to Teams channels, chats, users, and search functionality with proper authentication.
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"]
}
}
}
For manual installation:
# Install dependencies
npm install
# Build the project
npm run build
# Set up authentication
npm run auth
First, 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
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 userThe following tools 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 HTML{
"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](url)
- item
) and numbered (1. item
)`code`
and blocks
code
# H1
through ###### H6
<br>
tags> quoted text
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "teams-mcp" '{"command":"npx","args":["-y","@floriscornel/teams-mcp@latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": [
"-y",
"@floriscornel/teams-mcp@latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": [
"-y",
"@floriscornel/teams-mcp@latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect