Skip to main content
All connectors
qbash Connectors / Microsoft Teams

Microsoft Teams MCP serverand Python AI tasks

qbash hosts a Microsoft Teams MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.

Developers use qbash Tasks to write cloud-hosted Python functions that pair Microsoft Teams with models such as Claude and GPT.

MCP server

Build a Microsoft Teams MCP server

Give ChatGPT, Claude and your other AI tools access to Microsoft Teams through one server. You pick which Microsoft Teams tools it shares, and you can add other connectors, memory folders and Tasks to the same server.

How to set it up

  1. Connect Microsoft Teams on the qbash Connectors page.
  2. Create an MCP server and add the Microsoft Teams tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Python AI task

Write a Microsoft Teams task in Python

A qbash Task is a hosted Python function that calls Microsoft Teams and AI models.

Prepare a channel handoff

Read a page of channel messages and ask an inline prompt to extract decisions and requests needing a reply.

main.py
report = qbash.integrations.microsoft_teams.list_channel_messages(
team_name="YOUR_TEAM", channel_name="General", top=25,
)
messages = report.get("value") or []
if messages:
brief = qbash.ai.run_prompt(
slug="teams-channel-handoff",
variables={"messages": json.dumps(messages)},
)
qbash.output(brief)
else:
qbash.output("No channel messages on this page.")
Sample list_channel_messages response
{
"value": [
{
"id": "1790600000000",
"createdDateTime": "2026-09-28T12:00:00Z",
"body": {
"contentType": "html",
"content": "<p>Please confirm the export format before Friday.</p>"
},
"from": {
"user": {
"displayName": "Sam"
}
}
}
]
}

What the Microsoft Teams connector can do

  • List teams you have joined
  • List channels in a team
  • Send a message to a team channel
  • Send a message to a 1:1 or group chat
  • List the first page of your chats
  • Create a new channel in a team
  • List the first page of messages in a channel
  • Reply to a message in a channel
See every Microsoft Teams method in the SDK Reference

qbash Tasks: AI applications in Python

A Task is a Python function that calls Microsoft Teams, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.

AnthropicOpenAIGeminixAI

Run Tasks on a schedule or from your team's tools

OpenAIAnthropicGrokGmailSlackGitHub+ more
  • Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
  • Version controlled Every save is a revision you can compare and roll back.
  • Logged Each run records its inputs, output, errors and what started it.
  • Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.

Microsoft Teams MCP questions

Does Microsoft have an official Teams MCP server?

Yes. Microsoft offers the Work IQ Teams MCP server, which needs a Microsoft 365 Copilot license and blocks writes until a tenant admin enables them. The qbash server works with a standard Microsoft account sign-in and can sit on one URL with other connectors.

Can it read thread replies or older messages?

No. list_channel_messages returns the first page of 25 messages without thread replies, and list_chats returns the first page of chats.

Does my organization have to approve the connection?

Some Microsoft 365 tenants require administrator consent for the Microsoft Graph permissions Teams requests. If sign-in stops at a consent screen, an admin has to approve it.

Guides that use Microsoft Teams

Build a Microsoft Teams task

Write it in Python with AI steps, and qbash hosts it with versions and run logs.

Build a task

Build a Microsoft Teams MCP server

Pick the Microsoft Teams tools to share and connect ChatGPT, Claude or Grok Bot.

Build an MCP server