Microsoft 365 Teams — Claude Code MCP server: features and setup
This MCP server lets an agent work with Teams chats, channel messages, and presence through Microsoft Graph. Use it to search conversations or send replies from your coding host.
claude mcp add --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> --transport stdio microsoft-teams -- npx -y @mindstone/mcp-server-microsoft-teamsWhat Microsoft 365 Teams does
The server can list chats and channel messages, start chats, send messages and replies, find colleagues, search message content, and read or change presence. Its Teams operations use Microsoft Graph.
A host application handles Microsoft OAuth and writes account credentials to files under MS_CONFIG_DIR; the server reads those files rather than starting sign-in itself. This means the host must complete authentication before the server can use the account. You also need Node.js 20+ and npm, and some Teams Graph APIs may require tenant administrator approval.
What it helps with
- find conversations involving specific participants
- read recent messages from a chat or channel
- send a Teams message or reply
- start a chat with a colleague
- read or update presence
Example prompts for the agent
- Find the project chat with Alice and Bob, then show its latest messages.
- Reply in the Teams channel that the updated forecast is ready.
- Check my current Microsoft Teams presence.
How to install Microsoft 365 Teams
Platform CLI
claude mcp add --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> --transport stdio microsoft-teams -- npx -y @mindstone/mcp-server-microsoft-teamsReplace <…> with your own values
Platform CLI
codex mcp add microsoft-teams --env MS_CLIENT_ID=<MS_CLIENT_ID> --env MS_CONFIG_DIR=<MS_CONFIG_DIR> --env MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> --env MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> --env MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> -- npx -y @mindstone/mcp-server-microsoft-teamsReplace <…> with your own values
Config file
{
"mcpServers": {
"microsoft-teams": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-microsoft-teams"
],
"env": {
"MS_CLIENT_ID": "<MS_CLIENT_ID>",
"MS_CONFIG_DIR": "<MS_CONFIG_DIR>",
"MS_ACCOUNT_EMAIL": "<MS_ACCOUNT_EMAIL>",
"MS_MCP_PACKAGE_ID": "<MS_MCP_PACKAGE_ID>",
"MICROSOFT_REQUEST_TIMEOUT_MS": "<MICROSOFT_REQUEST_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"microsoft-teams": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-microsoft-teams"
],
"env": {
"MS_CLIENT_ID": "<MS_CLIENT_ID>",
"MS_CONFIG_DIR": "<MS_CONFIG_DIR>",
"MS_ACCOUNT_EMAIL": "<MS_ACCOUNT_EMAIL>",
"MS_MCP_PACKAGE_ID": "<MS_MCP_PACKAGE_ID>",
"MICROSOFT_REQUEST_TIMEOUT_MS": "<MICROSOFT_REQUEST_TIMEOUT_MS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e MS_CLIENT_ID=<MS_CLIENT_ID> -e MS_CONFIG_DIR=<MS_CONFIG_DIR> -e MS_ACCOUNT_EMAIL=<MS_ACCOUNT_EMAIL> -e MS_MCP_PACKAGE_ID=<MS_MCP_PACKAGE_ID> -e MICROSOFT_REQUEST_TIMEOUT_MS=<MICROSOFT_REQUEST_TIMEOUT_MS> microsoft-teams npx -y @mindstone/mcp-server-microsoft-teamsReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Microsoft 365 Teams
How do I install Microsoft 365 Teams in Claude Code?
Run `claude mcp add mcp-server-microsoft-teams -e MS_CLIENT_ID=<MS_CLIENT_ID> -e MS_CONFIG_DIR=<MS_CONFIG_DIR> -- npx -y @mindstone/mcp-server-microsoft-teams. The host application must handle OAuth and store the account files under MS_CONFIG_DIR`.
What does Microsoft 365 Teams do?
It gives an agent tools for Teams chats and messages, colleague and message search, and presence lookup or updates through Microsoft Graph.
Does the MCP server perform Microsoft sign-in?
No. The host application runs OAuth and stores the credentials; the server reads those files. Some Teams Graph operations may also need tenant admin approval.