Skip to main content
Prerequisites Before you begin, create an account and get your API Key.

Getting started

Connect to Microsoft Teams to manage teams, channels, messages, and automate collaboration workflows through AI agents.
1

Install the SDKs (optional)

pip install klavis
npm install klavis
2

Create a server instance

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="YOUR_API_KEY")

# Create a Microsoft Teams MCP server instance
teams_server = klavis_client.mcp_server.create_server_instance(
    server_name=McpServerName.MICROSOFT_TEAMS,
    user_id="user123"
)
import { KlavisClient, Klavis } from 'klavis';

const klavis = new KlavisClient({ apiKey: process.env.KLAVIS_API_KEY! });

// Create a Microsoft Teams MCP server instance
const teamsServer = await klavis.mcpServer.createServerInstance({
    serverName: Klavis.McpServerName.MicrosoftTeams,
    userId: "user123"
});
curl -X POST "https://api.klavis.ai/mcp-server/instance/create" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serverName": "Microsoft Teams",
    "userId": "user123"
  }'
userId specifies whose connected accounts and data you are accessing in Klavis. It should be a unique id for yourself, your team, or your organization.
Response Information: The API returns:
  • serverUrl: The URL for connecting your MCP client to Microsoft Teams
  • instanceId: Unique identifier for your server instance
  • oauthUrl: OAuth authorization URL for Microsoft Teams authentication
3

Authenticate

import webbrowser

# Open OAuth authorization page
webbrowser.open(teams_server.oauth_url)
// Redirect user to OAuth authorization
window.location.href = teamsServer.oauthUrl;
# Copy and paste the OAuth URL into your browser
echo "Visit this URL to authorize: https://api.klavis.ai/oauth/microsoft_teams/authorize?instance_id=YOUR_INSTANCE_ID"
🎉 Your Microsoft Teams MCP Server is ready! Once authentication is complete, you can use your MCP server URL with any MCP-compatible client.

Available Tools

With our progressive discovery approach, Klavis System is capable of enabling all tools for Microsoft Teams. Please use the get_tools API for more details. If you find any tool that is missing, please reach out to contact@klavis.ai.

Next Steps

White-label Authentication

Customize OAuth flows with your own branding

AI Platform Integrations

Integrate Klavis MCP Servers with leading AI platforms

Integrations

Explore available MCP servers

API Reference

REST endpoints and schemas