- Home
- MCP servers
- Teams
Teams
- typescript
27
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"floriscornel-teams-mcp": {
"command": "npx",
"args": [
"-y",
"@floriscornel/teams-mcp@latest"
]
}
}
}Teams MCP provides a dedicated MCP server that integrates Microsoft Graph APIs with Microsoft Teams, users, and organizational data. It enables AI assistants to authenticate, query, manage Teams, channels, chats, and messages, and perform advanced searches across conversations.
How to use
You connect to this MCP server from your MCP client (such as Cursor, Claude, or VS Code) using the provided configuration. Once connected, you can authenticate with Microsoft Graph, fetch your user information, search users, list and manage Teams and channels, read and send messages in channels or chats, and perform advanced message searches using Microsoft Search.
Key capabilities you can leverage include: authentication flow with token management, retrieving current user and directory data, listing teams you are a member of, listing channels within teams, reading and sending channel messages with optional importance levels, managing team members, listing chats, creating chats, retrieving chat history, and performing KQL-based searches across messages.
How to install
Prerequisites: you need Node.js 18+ and a Microsoft 365 account with appropriate permissions. You also require an Azure App Registration configured with Microsoft Graph permissions.
Steps to set up and run the MCP server locally:
# Install dependencies
npm install
# Build the project
npm run build
# Set up authentication
npm run auth
Configure the MCP server in your client by using the following MCP server entry. This enables your client to start the server via npx and load the Teams MCP configuration.
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": ["-y", "@floriscornel/teams-mcp@latest"]
}
}
}
To run in development mode, start the server with hot reload. For production, build the project and start the compiled output.
# Development mode with hot reload
npm run dev
# Production mode
npm run build && node dist/index.js
Configuration
The MCP server is configured via a JSON snippet that you load into your MCP client configuration. Use the following entry for the Teams MCP server.
{
"mcpServers": {
"teams-mcp": {
"command": "npx",
"args": ["-y", "@floriscornel/teams-mcp@latest"]
}
}
}
Security
All authentication flows use OAuth 2.0 with Microsoft Graph, and tokens are securely stored and refreshed automatically. Sensitive data is not logged or exposed, and the integration follows Microsoft Graph security practices.
Examples
Authenticate with Microsoft Graph to start the flow and then verify your status, using the standard MCP client commands.
Example authentication and status check commands you would run in your MCP client environment include initiating the OAuth flow and checking the current authentication state.
Notes
This server is designed to work with AI assistants through the Model Context Protocol, enabling practical interactions with Teams, channels, and messages via MCP.
Available tools
authenticate
Initiate the OAuth authentication flow with Microsoft Graph to obtain access tokens.
logout
Clear stored authentication tokens and end the session.
get_current_user
Retrieve information about the currently authenticated user.
search_users
Search for users by name or email address.
get_user
Fetch detailed information about a user by ID or email.
list_teams
List the teams the authenticated user has joined.
list_channels
List channels within a specified team.
get_channel_messages
Retrieve messages from a channel with support for pagination and filtering.
send_channel_message
Send a message to a specified team channel.
list_team_members
List members of a specific team and their roles.
list_chats
List 1:1 and group chats involving the user.
get_chat_messages
Retrieve messages from a chat with pagination and filtering.
send_chat_message
Send a message to a chat.
create_chat
Create a new 1:1 or group chat.
search_messages
Search across all Teams messages using KQL syntax.
get_recent_messages
Get recent messages with advanced filtering options.
get_my_mentions
Find messages that mention the current user.