Teams: MCP Client

May 21, 2026 · View on GitHub

⚠️ DEPRECATED@microsoft/teams.mcpclient is no longer recommended. Use @modelcontextprotocol/sdk directly with a dedicated AI framework like the openai SDK. See examples/ai-mcp for the new pattern.

High level MCP Client Plugin which allows connecting to various sse servers and consume exposed tools.

Install

npm install @microsoft/teams.mcpclient

Overview

The MCP Client Plugin enables seamless integration with Model Context Protocol (MCP) servers through SSE (Server-Sent Events). It allows you to connect to various MCP servers and consume their exposed tools within your Teams.js applications.

Usage

import { ChatPrompt } from "@microsoft/teams.ai";
import { McpClientPlugin } from "@microsoft/teams.mcpclient";

const prompt = new ChatPrompt(
    {
        instructions: "You are a helpful assistant.",
        model: yourModel,
    },
    [new McpClientPlugin()],
).usePlugin("mcpClient", { url: "http://your-mcp-server/mcp" });

Features

  • 🔌 Automatic tool discovery from MCP servers
  • 💾 Optional caching of tool parameters (if you'd like to avoid the discovery call or only pass in a subset of tools)