oshaani MCP Marketplace
Sign in

← Documentation

Teams Chat MCP Collaboration

Read and send Microsoft Teams messages: chats, team channels and threads, as a Microsoft 365 account you sign in with. Sending is off until you allow it.

1 credits / tool call

Quick start

  1. Add a Teams Chat connection with the settings below, then click Test configuration.
  2. Create an API key for your agent.
  3. Paste the key below, click Test endpoint, and copy the configuration for your platform.
Endpointhttps://market.oshaani.com/teams-chat (your default connection) or https://market.oshaani.com/teams-chat/<connection-id>
TransportStreamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28.
AuthenticationAuthorization: Bearer <API key>, using a key from the API keys page.

Agent configuration

The default URL uses your organisation's default Teams Chat connection; a URL with an ID pins one connection.
Get a key
The key is filled into the snippets below. It stays in this page and is only sent with the test request.
Runs initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.

Any MCP client that supports remote (Streamable HTTP) servers with custom headers.

{
  "name": "teams-chat",
  "transport": "streamable-http",
  "url": "https://market.oshaani.com/teams-chat",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Connection settings

Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.

SettingTypeDescription
Directory (tenant) ID
tenant_id required
string
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Application (client) ID
client_id required
string An Entra ID app registration with the delegated Microsoft Graph permissions listed in the docs
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
Client secret
client_secret required secret
string App registration > Certificates & secrets
Allow sending messages
allow_sending
boolean
default false
Lets agents post in chats and channels and start new chats. Off by default: agents can only read.
Allowed domains for new chats
allowed_recipient_domains
string Comma-separated, e.g. contoso.com. start_chat refuses people outside these domains. Leave empty to allow any.

Tools (11)

list_chats read-only

List the signed-in account's chats, most recent activity first, with members and the last message

ArgumentTypeDescription
chat_type "oneOnOne" | "group" | "meeting" Only chats of this type
top integer
default 20

min 1, max 50

get_chat_messages read-only

Read the latest messages in a chat, oldest first

ArgumentTypeDescription
chat_id required string Chat ID from list_chats, e.g. 19:abc...@thread.v2
pattern ^19:[\w.@-]{1,200}$
top integer
default 20
Number of messages (max 50)
min 1, max 50

send_chat_message

Send a message in an existing chat

ArgumentTypeDescription
chat_id required string Chat ID from list_chats, e.g. 19:abc...@thread.v2
pattern ^19:[\w.@-]{1,200}$
text required string Message text
min length 1, max length 28000
content_type "text" | "html"
default "text"
'html' allows basic formatting such as <b>, <i>, <a>, <ul>

search_users read-only

Find people in the organisation by name or email, to start a chat with them

ArgumentTypeDescription
query required string
min length 2, max length 100
top integer
default 10

min 1, max 25

start_chat

Start a one-on-one or group chat with people by email and send the first message. Reuses an existing one-on-one chat.

ArgumentTypeDescription
emails required array of string Work email or UPN of each person
text required string Message text
min length 1, max length 28000
topic string Group chat name; ignored for one-on-one chats
max length 250
content_type "text" | "html"
default "text"
'html' allows basic formatting such as <b>, <i>, <a>, <ul>

list_teams read-only

List the teams the signed-in account is a member of

No arguments.

list_channels read-only

List the channels in a team

ArgumentTypeDescription
team_id required string Team ID from list_teams
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

get_channel_messages read-only

Read the latest posts in a channel, oldest first, optionally with their replies

ArgumentTypeDescription
team_id required string Team ID from list_teams
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
channel_id required string Channel ID from list_channels, e.g. 19:abc...@thread.tacv2
pattern ^19:[\w.@-]{1,200}$
top integer
default 20
Number of messages (max 50)
min 1, max 50
include_replies boolean
default false
Include each post's replies

get_message_replies read-only

Read the replies in a channel thread, oldest first

ArgumentTypeDescription
team_id required string Team ID from list_teams
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
channel_id required string Channel ID from list_channels, e.g. 19:abc...@thread.tacv2
pattern ^19:[\w.@-]{1,200}$
message_id required string Message ID from a message listing
pattern ^\d{10,20}$
top integer
default 50
Number of messages (max 50)
min 1, max 50

send_channel_message

Post a new message in a channel

ArgumentTypeDescription
team_id required string Team ID from list_teams
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
channel_id required string Channel ID from list_channels, e.g. 19:abc...@thread.tacv2
pattern ^19:[\w.@-]{1,200}$
text required string Message text
min length 1, max length 28000
subject string Optional post title
max length 250
content_type "text" | "html"
default "text"
'html' allows basic formatting such as <b>, <i>, <a>, <ul>

reply_to_channel_message

Reply in a channel thread

ArgumentTypeDescription
team_id required string Team ID from list_teams
pattern ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
channel_id required string Channel ID from list_channels, e.g. 19:abc...@thread.tacv2
pattern ^19:[\w.@-]{1,200}$
message_id required string Message ID from a message listing
pattern ^\d{10,20}$
text required string Message text
min length 1, max length 28000
content_type "text" | "html"
default "text"
'html' allows basic formatting such as <b>, <i>, <a>, <ul>

Billing & errors

Each successful tool call costs 1 oshaani.com credit. initialize, tools/list, failed calls and timeouts are free.

JSON-RPC codeMeaning
-32054 (HTTP 401)Missing, unknown or revoked API key
-32053 (HTTP 404)No Teams Chat connection configured for your organisation, or the connection ID is wrong
-32055 (HTTP 403)Connection disabled or origin not allowed
-32052 (HTTP 429)Rate limit reached; retry after a minute
-32050Not enough oshaani.com credits for the call
-32051Billing temporarily unavailable; the call was not run

Errors from Teams Chat itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them. See the Teams Chat API documentation.