msteams-mcp

msteams-mcp

MCP server for Microsoft Teams that lets AI assistants search, message, and manage chats, meetings, files, and contacts using your existing Teams browser login—no app approval or Azure AD registration needed.

Category
访问服务器

README

Microsoft Teams MCP Server

MCP server for Microsoft Teams — search, message, and manage chats with browser-session auth; no Teams app approval or Azure AD registration.

Clone the repo, build it, point your AI tool at dist/index.js. Talks to the same Teams APIs the web app uses (Substrate, chatsvc, CSA). Auth is your normal Teams browser login; access matches what your account can already do.

Prerequisites

  • Node.js 18+
  • Microsoft account with Teams access
  • Chrome (macOS/Linux) or Edge (Windows)

Setup

git clone https://github.com/hickeroar/msteams-mcp.git
cd msteams-mcp
npm install
npm run build

Register it as a local stdio MCP server in whatever AI tool you use (Cursor, Claude Desktop, Claude Code, Augment, Windsurf, etc.). The shape is always the same: run node with the absolute path to dist/index.js.

{
  "mcpServers": {
    "MS Teams": {
      "command": "node",
      "args": ["/absolute/path/to/msteams-mcp/dist/index.js"]
    }
  }
}

Where that config lives depends on the client (examples):

Client Typical config location
Cursor ~/.cursor/mcp.json (or project .cursor/mcp.json)
Claude Desktop Claude → Settings → Developer → Edit Config (claude_desktop_config.json)
Claude Code MCP settings / .mcp.json as documented for your version
Augment Augment MCP / tools settings (add a local stdio server)

Exact UI labels vary; look for “MCP servers”, “Model Context Protocol”, or “custom tools”, then add a command + args (stdio) entry like above. Use an absolute path.

Restart or reload MCP/tools in that client after changing config or rebuilding.

First login

Ask the assistant (in Cursor, Claude, Augment, etc.) to call teams_login (soft {} first; use forceNew: true if the session is dead). A browser opens for Microsoft/SSO sign-in. Session files are saved under:

  • macOS/Linux: ~/.teams-mcp-server/
  • Windows: %APPDATA%\teams-mcp-server\

After that, tools use cached tokens. Tokens refresh automatically when possible; call teams_login again if auth fails.

After pulling code changes

npm install
npm run build

Then restart/reload the Teams MCP server in your AI client so it loads the new dist/.

Useful commands

npm run build        # compile to dist/
npm run typecheck    # tsc --noEmit
npm start            # run compiled MCP server (stdio)
npm run cli          # CLI with the same tools (no build required)
npm run cli -- status
npm run cli -- login
npm run cli -- find_channel --query "general"

The CLI shares the same session as the MCP server and is handy for debugging outside any AI client.

Available tools

Search & discovery

Tool Description
teams_search Search Teams messages with operators (from:, sent:, in:, etc.)
teams_search_email Search emails in your mailbox
teams_list_chats List recent conversations with last-message preview
teams_get_message Get a single message by ID (includes reactions)
teams_get_thread Get messages from a conversation/thread; since, threadRootId, fromUrl
teams_find_channel Find channels by name (membership list; works without Substrate)
teams_get_activity Activity feed (mentions, reactions, replies, notifications)

Messaging

Tool Description
teams_send_message Send a message (markdown); thread reply, subject, schedule, content type
teams_wait_for_reply Block until a new message arrives (capped ~110s)
teams_edit_message Edit one of your own messages
teams_delete_message Soft-delete one of your own messages

People & contacts

Tool Description
teams_get_me Current user profile
teams_search_people Search people by name or email
teams_get_frequent_contacts Frequently contacted people
teams_get_person Resolve MRI(s) to full profiles
teams_get_chat Conversation ID for a 1:1 chat
teams_create_group_chat Create a group chat (2+ others)

Organisation

Tool Description
teams_get_favorites Pinned/favourite conversations
teams_add_favorite Pin a conversation
teams_remove_favorite Unpin a conversation
teams_save_message Bookmark a message
teams_unsave_message Remove bookmark
teams_get_saved_messages List saved messages
teams_get_followed_threads List followed threads
teams_get_unread Unread counts (aggregate or per conversation)
teams_mark_read Mark a conversation read up to a message
teams_get_tags Channel tags for a team (teamId from teams_find_channel)

Reactions

Tool Description
teams_search_emoji Search standard + custom org emojis
teams_add_reaction Add a reaction to a message
teams_remove_reaction Remove a reaction

Quick reactions without search: like, heart, laugh, surprised, sad, angry.

Calendar & meetings

Tool Description
teams_get_meetings Calendar meetings (default: next 7 days)
teams_get_transcript Meeting transcript (threadId from teams_get_meetings)

Files

Tool Description
teams_get_shared_files Files and links shared in a conversation

Session

Tool Description
teams_login Manual login (opens browser)
teams_status Auth / session status

Channel reads usually work via teams_find_channelteams_get_thread even when Substrate search (teams_search) is unavailable. Architecture notes: AGENTS.md. API details: docs/API-REFERENCE.md.

Limitations

  • Browser login required once (and again if the session fully expires)
  • Undocumented Microsoft APIs; they can change
  • Search is full-text only; use teams_get_thread for full thread context
  • Edit/delete only your own messages

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选