MCP M365 Teams Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP M365 Teams Server
A Model Context Protocol (MCP) server that provides integration with Microsoft 365 Teams. This server enables AI assistants and other MCP clients to interact with Microsoft Teams through a standardized interface.
๐ Quick Start: New to this project? Check out the Quick Start Guide to get up and running in 5 minutes!
Features
List Teams: Get all teams the user is a member of
Channel Management: List, create, and manage team channels
Messaging: Send and retrieve messages from channels
Team Creation: Create new Microsoft Teams
Member Management: Add members to teams with specific roles
Presence Information: Get user availability and presence status
Message Search: Search for messages across all teams
Related MCP server: Teams MCP
Documentation
๐ Quick Start Guide - Get started in 5 minutes
๐ง Azure AD Setup Guide - Detailed Azure configuration
๐ก Usage Examples - Practical examples and workflows
๐ Security Policy - Security best practices
๐ค Contributing Guide - How to contribute
Installation
From PyPI (when published)
pip install mcp-m365-teamsFrom Source
git clone https://github.com/chad-atexpedient/mcp-m365-teams.git
cd mcp-m365-teams
pip install -e .Quick Setup
Register Azure AD App - Detailed guide
Set Environment Variables:
export M365_TENANT_ID="your-tenant-id" export M365_CLIENT_ID="your-client-id" export M365_CLIENT_SECRET="your-client-secret"Run the Server:
mcp-m365-teams
For detailed setup instructions, see the Quick Start Guide.
Configuration with MCP Clients
Claude Desktop
Add to your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"m365-teams": {
"command": "python",
"args": ["-m", "mcp_m365_teams.server"],
"env": {
"M365_TENANT_ID": "your-tenant-id",
"M365_CLIENT_ID": "your-client-id",
"M365_CLIENT_SECRET": "your-client-secret"
}
}
}
}Other MCP Clients
For other MCP clients, use:
Command:
python -m mcp_m365_teams.serverEnvironment: Set the three M365 variables
Available Tools
Tool | Description |
| List all teams the user is a member of |
| Get all channels in a specific team |
| Send a message to a Teams channel |
| Get recent messages from a channel |
| Create a new Microsoft Team |
| Add a member to a team |
| Create a new channel in a team |
| Get user presence/availability status |
| Search for messages across all teams |
For detailed tool documentation and examples, see Usage Examples.
Example Usage
With an AI Assistant (e.g., Claude)
User: "Can you send a message to the Engineering team's General channel saying 'Deployment complete'?"
Assistant: I'll send that message for you.
[Uses list_teams โ get_team_channels โ send_channel_message]
โ Message sent to Engineering > General: "Deployment complete"
Programmatic Usage
# See examples/usage_examples.md for detailed code examplesArchitecture
โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โ (Claude, etc.) โ
โโโโโโโโโโฌโโโโโโโโโ
โ MCP Protocol
โ
โโโโโโโโโโผโโโโโโโโโ
โ MCP M365 Teams โ
โ Server โ
โโโโโโโโโโฌโโโโโโโโโ
โ Microsoft Graph API
โ
โโโโโโโโโโผโโโโโโโโโ
โ Microsoft 365 โ
โ Teams โ
โโโโโโโโโโโโโโโโโโโPrerequisites
Python 3.10 or higher
Microsoft 365 account with Teams
Azure AD admin access (for app registration)
Required Azure AD Permissions
The following Microsoft Graph API permissions are required:
Permission | Type | Reason |
| Application | Read team information |
| Application | Read channel information |
| Application | Read channel messages |
| Application | Send messages to channels |
| Application | Manage team members |
| Application | Read user information |
| Application | Read user presence |
See the Azure Setup Guide for detailed configuration instructions.
Security
๐ Never commit credentials to version control
๐ Use environment variables or secret managers
๐ Rotate client secrets regularly (every 90 days)
๐ฎ Apply principle of least privilege
๐ Monitor API usage and set up alerts
For comprehensive security guidance, see SECURITY.md.
Development
Setup Development Environment
git clone https://github.com/chad-atexpedient/mcp-m365-teams.git
cd mcp-m365-teams
pip install -e ".[dev]"Run Tests
pytest # Run all tests
pytest --cov # Run with coverageCode Quality
black src/ tests/ # Format code
ruff check src/ tests/ # Lint code
mypy src/ # Type checkingTroubleshooting
Issue | Solution |
"Insufficient privileges" | Ensure admin consent is granted in Azure AD |
"Authentication failed" | Verify all three credentials are correct |
"Resource not found" | Check you have access to the teams/channels |
For more help, see Troubleshooting or open an issue.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Run tests and linting
Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Resources
Support
๐ซ Open an issue for bugs or feature requests
๐ฌ Check existing issues for solutions
๐ Read the documentation for detailed guides
Roadmap
Future enhancements planned:
Support for Teams meetings
File sharing capabilities
Tab management
Calendar integration
Webhooks support
Adaptive Cards support
Changelog
See CHANGELOG.md for version history and release notes.
Star History
If you find this project useful, please consider giving it a โญ!
Made with โค๏ธ for the MCP community
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Connect AI assistants to your Tedix organizationโs tasks, knowledge, apps, and results through MCP.
Agent communication platform for agent to agent messaging via MCP. Messages, channels, skills.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph APIs for user and team management, channel and chat messaging, message editing and deletion, file upload/download, and advanced message search.12 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph APIs for messaging, search, user and team management, and file handling.12 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph APIs for messaging, search, user management, file uploads, and chat/channel operations.12 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Microsoft Teams and Microsoft Graph for messaging, chats, channels, user search, file uploads and downloads, and advanced message search through MCP.12 npmMIT