Назад к каталогу
mcsmcp

mcsmcp

Сообщество

от microsoft

0.0
0 отзывов

Lab for creating an MCP Server and using it in Microsoft Copilot Studio.

Установка

npm install

Описание

# Microsoft Copilot Studio ❤️ MCP Welcome to the **Microsoft Copilot Studio ❤️ MCP** lab. In this lab, you will learn how to deploy an MCP Server, and how to add it to Microsoft Copilot Studio. ## ❓ What is MCP? [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that standardizes how applications provide context to LLMs, defined by [Anthropic](https://www.anthropic.com/). MCP provides a standardized way to connect AI models to different data sources and tools. MCP allows makers to seamlessly integrate existing knowledge servers and APIs directly into Copilot Studio. Currently, Copilot Studio only supports Tools. To learn more about current capabilities, see [aka.ms/mcsmcp](https://aka.ms/mcsmcp). There are some known issues & planned improvements. These are listed [here](#known-issues-and-planned-improvements). ## 🆚 MCP vs Connectors When do you use MCP? And when do you use connectors? Will MCP replace connectors? MCP servers are made available to Copilot Studio using connector infrastructure, so these questions are not really applicable. The fact that MCP servers use the connector infrastructure means they can employ enterprise security and governance controls such as [Virtual Network](https://learn.microsoft.com/power-platform/admin/vnet-support-overview) integration, [Data Loss Prevention](https://learn.microsoft.com/power-platform/admin/wp-data-loss-prevention) controls, [multiple authentication methods](https://learn.microsoft.com/connectors/custom-connectors/#2-secure-your-api)—all of which are available in this release—while supporting real-time data access for AI-powered agents. So, MCP and connectors are really **better together**. ## ⚙️ Prerequisites - Visual Studio Code installed ([link](https://code.visualstudio.com/download)) - Node v22 (ideally installed via [nvm for Windows](https://github.com/coreybutler/nvm-windows) or [nvm](https://github.com/nvm-sh/nvm)) - Git installed ([link](https://git-scm.com/downloads)) - Docker installed ([link](http://aka.ms/azure-dev/docker-install)) - Azure Developer CLI installed ([link](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd)) - Azure Subscription (with payment method added) - GitHub account - Copilot Studio trial or developer account ## ➕ Create a new GitHub repository based on the template 1. Select `Use this template` 1. Select `Create a new repository` ![](./assets/usetemplate.png) 1. Select the right `Owner` (it might already be selected when you have only one owner to choose from) 1. Give it a `Repository name` 1. Optionally you can give it a `Description` 1. Select `Private` 1. Select `Create repository` This will take a little while. After it's done, you will be directed to the newly created repository. ## ⚖️ Choice: Run the server locally or deploy to Azure Now you have a choice! You either run the server locally - or you can deploy it to Azure. There are a couple of steps that you need to do for both: 1. Clone this repository by running the following command (replace `{account}` by your own GitHub account name): `git clone https://github.com/{account}/mcsmcp.git` 1. Open Visual Studio Code and open the cloned folder 1. Open the terminal and navigate to the cloned folder ### 🏃‍♀️ Run the MCP Server Locally 1. Run `npm install` 1. Run `npm run build && npm run start` ![Terminal view after building and starting the server](./assets/vscode-terminal-run-start.png) 1. Select `PORTS` at the top of the Visual Studio Code Terminal ![Image of VS Code where the terminal is open and the PORTS tab is highlighted](./assets/vscode-terminal-ports.png) 1. Select the green `Forward a Port` button ![Image of VS Code where the PORTS tab is open and the green `Forward a Port` button is highlighted](./assets/vscode-terminal-ports-forward.png) 1. Enter `3000` as the port number (this should be the same as the port number you see when you ran the command in step 5). You might be prompted to sign in to GitHub, if so please do this, since this is required to use the port forwarding feature. 1. Right click on the row you just added and select `Port visibility` > `Public` to make the server publicly available 1. Ctrl + click on the `Forwarded address`, which should be something like: `https://something-3000.something.devtunnels.ms` 1. Select `Copy` on the following pop-up to copy the URL ![View of the PORTS setup with highlighted the port, the forwarded address and the visibility](./assets/vscode-terminal-ports-setup.png) 1. Open to the browser of your choice and paste the URL in the address bar, type `/mcp` behind it and hit enter If all went well, you will see the following error message: ```json {"jsonrpc":"2.0","error":{"code":-32000,"message":"Method not allowed."},"id":null} ``` Don't worry - this error message is nothing to be worried about! ### 🌎 Deploy to Azure > [!IMPORTANT] > As listed in the [prerequisites](#️-prereq

Отзывы (0)

Пока нет отзывов. Будьте первым!