Teams MCP Server
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 Serversearch for unread messages about deployment"
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.
Microsoft Teams MCP Server & CLI
Give AI access to Microsoft Teams easily with your standard Teams login.
No Azure setup, app registration, Graph permissions or IT support required.
Search messages and email, catch up on unread chats, read threads, send replies, retrieve meeting transcripts and more.
Why msteams-mcp?
Do real work - search, unread chats, threads, replies, people, channels, meetings, transcripts, files, reactions, and assignments on education tenants.
Sign in once - tokens refresh automatically and the browser stays out of routine operations.
Secure - the assistant has only your existing Teams permissions, with encrypted session data stored locally.
Use it anywhere - every capability works through both MCP clients and the included
msteamsCLI.
Related MCP server: Teams MCP
Quick start
Prerequisites
Node.js 20+
A Microsoft account with Teams access
Google Chrome, Microsoft Edge, or Chromium browser installed
Configure your MCP client
Add to your MCP client configuration (e.g., Claude Desktop, Windsurf, Cursor):
{
"mcpServers": {
"teams": {
"command": "npx",
"args": ["-y", "msteams-mcp@latest"]
}
}
}That is it. npx downloads and runs the latest version. Ask your assistant to call teams_login once, complete the normal Microsoft sign-in in the browser, and then start using Teams.
How it works
This server calls Microsoft's Teams services directly (Substrate, chatsvc, CSA), using the authenticated session created by the Teams web app.
teams_loginopens a browser for your normal Microsoft sign-in.The resulting OAuth tokens and session data are encrypted and cached locally.
Routine operations use those tokens directly, without browser automation.
Expiring tokens are refreshed automatically over HTTP, with headless browser SSO as a fallback.
Your access remains limited to what your Teams account can already see and do.
From Source (alternative)
If you prefer to run from a local clone:
git clone https://github.com/m0nkmaster/msteams-mcp.git
cd msteams-mcp
npm install && npm run buildThen configure your MCP client:
{
"mcpServers": {
"teams": {
"command": "node",
"args": ["/path/to/msteams-mcp/dist/index.js"]
}
}
}The server uses your system's Chrome (macOS/Linux) or Edge (Windows) for authentication.
CLI
The same functionality is also available as a standalone command-line tool, msteams. This is useful when you want Teams from a shell or script instead of an MCP client.
Install it globally from npm:
npm install -g msteams-mcpThis installs two binaries: msteams-mcp (the MCP server) and msteams (the CLI wrapper). Or run it without installing:
npx -y msteams-mcp msteams statusSee CLI Usage for commands, or run msteams for the command list.
Available Tools
Search & Discovery
Tool | Description |
| Search Teams messages with operators ( |
| Search emails in your mailbox (same auth as Teams - no extra login) |
| List recent conversations (1:1, group, meeting, channel) with a last-message preview |
| Get a single message by ID with full content (any age); includes reactions |
| Get messages from a conversation/thread; includes reactions; |
| Find channels by name (your teams + org-wide discovery) |
| List a team's channel tags for tag @mentions |
| Get activity feed (mentions, reactions, replies, notifications) |
Messaging
Tool | Description |
| Send a message (default: self-chat/notes). |
| Block until a new message arrives (server-side poll, capped ~110s); idempotent |
| Edit one of your own messages ( |
| Delete one of your own messages (soft delete) |
People & Contacts
Tool | Description |
| Get current user profile (email, name, ID) |
| Search for people by name or email |
| Get frequently contacted people (useful for name resolution) |
| Resolve one or more MRIs to full profiles (name, email, job title, department) |
| Get conversation ID for 1:1 chat with a person |
| Create a new group chat with multiple people (2+ others) |
Organisation
Tool | Description |
| Get pinned/favourite conversations |
| Pin a conversation |
| Unpin a conversation |
| Bookmark a message |
| Remove bookmark from a message |
| Get list of saved/bookmarked messages with source references |
| Get list of followed threads with source references |
| Get unread counts (aggregate or per-conversation) |
| Mark a conversation as read up to a message |
Reactions
Tool | Description |
| Search for emojis by name (standard + custom org emojis) |
| Add an emoji reaction to a message |
| Remove an emoji reaction from a message |
Quick reactions: like, heart, laugh, surprised, sad, angry can be used directly without searching.
Calendar & Meetings
Tool | Description |
| Get meetings from calendar (defaults to next 7 days) |
| Get meeting transcript (requires |
teams_get_meetings returns: subject, times, organiser, join URL, threadId for meeting chat. Use threadId with teams_get_thread to read meeting chat, or with teams_get_transcript to get the full transcript with speakers and timestamps.
Files
Tool | Description |
| Get files and links shared in a conversation (supports pagination) |
| Download a shared file or assignment attachment to a local path |
teams_get_shared_files returns both files (name, extension, URL, size) and links (URL, title), along with who shared each item. Works for channels, group chats, 1:1 chats, and meeting chats.
teams_download_file takes a file's webUrl from teams_get_shared_files, or an attachment's fileUrl from teams_get_assignment. It downloads through Microsoft Graph using the Teams client's own access, so no extra sign-in is needed. Files stream straight to disk, never overwrite an existing file, and are removed if the download fails part-way. Links and Microsoft Forms aren't files and can't be downloaded.
Assignments (education tenants only)
Tool | Description |
| List your assignments across classes ( |
| Get one assignment's full detail, including instructions, attachments and your submission (with your own copies of files) |
| Turn in, undo turn-in, or mark viewed on your own submission |
Assignments is optional. It only works on education tenants that use Teams Assignments, and its token is requested separately, on demand, so other accounts pay no extra cost. If Assignments isn't available, or its authorisation fails, only these tools return an error: the rest of Teams keeps working, and no browser or re-login is triggered.
Download attachments (Word, PowerPoint and other files) with teams_download_file. Microsoft Forms quizzes and links are returned as URLs instead.
Session
Tool | Description |
| Trigger manual login (opens browser) |
| Check authentication and session state |
Search Operators
Both teams_search (Teams messages) and teams_search_email (emails) support native operators:
from:sarah@company.com # Messages/emails from person
sent:2026-01-20 # From specific date
sent:>=2026-01-15 # Since date
in:project-alpha # Messages in channel (Teams only)
subject:"budget" # By subject (email)
"Rob Smith" # Find @mentions (name in quotes)
hasattachment:true # With files
is:unread # Unread emails (email only)
NOT from:email@co.com # Exclude resultsCombine operators: from:sarah@co.com sent:>=2026-01-18 hasattachment:true
Note: @me, from:me, to:me do NOT work. Use teams_get_me first to get your email/displayName. sent:today works, but sent:lastweek and sent:thisweek do NOT - use explicit dates or omit (results are sorted by recency).
MCP Resources
The server also exposes passive resources for context discovery:
Resource URI | Description |
| Current user's profile |
| Pinned conversations |
| Authentication status |
CLI Usage
msteams exposes every tool the MCP server does - full parity, same authentication, same session files. Commands, flags and help are generated from the tool definitions, so the CLI never lags behind the server.
If you installed globally (npm install -g msteams-mcp), invoke it directly:
# The command list, one line each
msteams
msteams --version
# What one command does, and all of its flags
msteams help send_message
msteams search --help
# Check authentication status
msteams status
# Log in (opens a browser; tries silent SSO first)
msteams login
msteams login --force # clear session and re-login
# Search messages
msteams search "meeting notes"
msteams search "project" --from 0 --size 50
# Search emails
msteams email "from:sarah@company.com"
# Send a message (default: your own self-chat, 48:notes)
msteams send "Hello from Teams MCP!"
msteams send "Message" --to "conversation-id"
# People, contacts, favourites, activity, unread
msteams people "john smith"
msteams favorites
msteams activity
msteams unread
# Machine-readable output, on stdout, for scripts
msteams search "query" --json | jq '.results[0].conversationId'Command form: msteams <command> [value] [--flag value].
Commands are the tool names without the
teams_/get_prefix (search,send_message,thread,meetings). Any unambiguous abbreviation works, sosendreachessend_message; the full tool name always works too.Flags are the tool's own parameters, in camelCase (
--conversationId,--threadRootId,--fromUrl). A few short aliases exist where they read better:--to,--msg,--reply,--user,--force. Booleans work bare (--markRead) or with a value (--markRead false). Unknown flags are rejected with the list of valid ones.The first bare value goes to the command's main parameter:
msteams search "query"is--query "query".Output goes to stdout, diagnostics to stderr, so pipes and redirects behave. Colour and emoji appear only on a terminal, and
NO_COLORturns them off.Exit codes:
0success,1the tool failed,2the command was malformed.--jsonprints the tool's JSON payload, ready forjq.
From a repo clone
If you're working from source, the same CLI is wired to npm run cli (runs via tsx, no build needed):
npm run cli # command list
npm run cli -- search "your query"
npm run cli -- status
npm run cli -- send "Hi" --to "conversation-id"Limitations
Login required - Run
teams_loginto authenticate (opens browser)Token expiry - Tokens expire after ~1 hour; headless refresh is attempted or run
teams_loginagain when neededUndocumented APIs - Uses Microsoft's internal APIs which may change without notice
Search limitations - Full-text search only; thread replies not matching search terms won't appear (but LLM will likely use
teams_get_threadfor full context)Assignments - Education tenants only. Turn-in and undo turn-in act on your real account; handing in again records a new hand-in date that your teacher sees
Session Files
Session files are stored in a user config directory (encrypted):
macOS/Linux:
~/.teams-mcp-server/Windows:
%APPDATA%\teams-mcp-server\
Contents: session-state.json, token-cache.json, browser-profile/
If your session expires, call teams_login or delete the config directory.
Development
For local development:
git clone https://github.com/m0nkmaster/msteams-mcp.git
cd msteams-mcp
npm install
npm run buildDevelopment commands:
npm run dev # Run MCP server in dev mode
npm run build # Compile TypeScript
npm run lint # Run ESLint
npm test # Run unit tests
npm run typecheck # TypeScript type checkingFor development with hot reload, configure your MCP client:
{
"mcpServers": {
"teams": {
"command": "npx",
"args": ["tsx", "/path/to/msteams-mcp/src/index.ts"]
}
}
}See AGENTS.md for detailed architecture and contribution guidelines.
This server cannot be deployed
Maintenance
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Find and call verified APIs from any AI assistant, with free trial calls and previewed writes.
- WorkwaeOAuthcom.workwae
Email, calendar and contacts for AI agents: Gmail, Microsoft 365 and IMAP accounts behind one API.
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
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 gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph for messaging, chat and channel operations, user and team discovery, file uploads/downloads, and advanced message search.11 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph data, including messaging, chat and channel operations, user search, file uploads, and message discovery via search.11 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph APIs for messaging, search, user and team management, and file handling.11 npmMIT