- Home
- MCP servers
- MCP Teams Server
MCP Teams Server
- python
356
GitHub Stars
python
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": {
"inditextech-mcp-teams-server": {
"command": "uv",
"args": [
"run",
"mcp-teams-server"
],
"env": {
"TEAM_ID": "YOUR_TEAM_ID",
"TEAMS_APP_ID": "YOUR_APP_ID",
"TEAMS_APP_TYPE": "SingleTenant|MultiTenant",
"TEAMS_CHANNEL_ID": "YOUR_CHANNEL_ID",
"TEAMS_APP_PASSWORD": "YOUR_APP_PASSWORD",
"TEAMS_APP_TENANT_ID": "YOUR_TENANT_ID"
}
}
}
}You can run an MCP server that integrates with Microsoft Teams to read messages, post new messages, reply in threads, and mention members. This server acts as a bridge between your Teams channels and the MCP ecosystem, letting you automate conversations and manage channel activity from your MCP client.
How to use
Use an MCP client to connect to the Teams MCP server and perform actions like starting a thread in a channel, posting messages, replying to messages, and mentioning users. You can read thread replies, list channel members, and fetch channel messages to build workflows, bots, or automation that interacts with your Teams space.
How to install
Prerequisites: Python 3.10, uv package manager, and a Microsoft Teams account with the required setup.
Step by step install and run sequence:
uv venv
uv sync --frozen --all-extras --dev
Configure and run
Set up environment variables in your shell or in an .env file. The MCP server uses the following variables to connect to Teams and identify your application.
Required environment variables:
- TEAMS_APP_ID: UUID for your MS Entra ID application ID
- TEAMS_APP_PASSWORD: Client secret
- TEAMS_APP_TYPE: SingleTenant or MultiTenant
- TEAMS_APP_TENANT_ID: Tenant uuid in case of SingleTenant
- TEAM_ID: MS Teams Group Id or Team Id
- TEAMS_CHANNEL_ID: MS Teams Channel ID with url escaped chars
Start the server with the following command.
uv run mcp-teams-server
Development
If you want to run integration tests locally, set up the following test environment variables and run the test suite.
Environment variables for tests:
- TEST_THREAD_ID: timestamp of the thread id
- TEST_MESSAGE_ID: timestamp of the message id
- TEST_USER_NAME: test user name
uv run pytest -m integration
Docker usage
There are pre-built and buildable Docker images available for running the MCP Teams server. Use these commands to pull, build, and run the container.
Pull the pre-built image (if available):
docker pull ghcr.io/inditextech/mcp-teams-server:latest
Build your own image from the repository root:
docker build . -t inditextech/mcp-teams-server
Run the image with optional environment variables from a .env file:
docker run --env-file .env -it inditextech/mcp-teams-server
Configuration notes
The server expects Microsoft Teams related credentials and identifiers to connect and operate. Ensure your Teams app registration includes the correct permissions and that the encoded channel and team identifiers are provided as environment variables.
Available tools
readThread
Read replies in a thread in a channel to fetch context for automation.
createMessage
Create a new message in a channel thread, optionally mentioning members.
replyMessage
Post a reply to an existing message within a thread.
mentionMember
Mention a member in a channel message to draw attention to a participant.
listMembers
List members of the specified channel team.
readMessages
Read messages in a channel to surface recent activity.