High level MCP Client Plugin which allows connecting to various sse servers and consume exposed tools.
npm install @microsoft/teams.mcpclientThe 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.
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" });- 🔌 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)