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) is an open protocol that standardizes how applications provide context to LLMs, defined by Anthropic. 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. There are some known issues & planned improvements. These are listed here.
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 integration, Data Loss Prevention controls, multiple authentication methods—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
- Azure Subscription (with payment method added) 
- Have a GitHub account and be logged in 
- Copilot Studio trial or developer account 
- Power Platform environment provisioned 
Lab
To be able to deploy this MCP Server and use it in Microsoft Copilot Studio, you need to go through the following actions:
Create a new GitHub repository based on the template
- Select - Use this template
- Select `Create a new repository  
- Select the right - Owner
- Give it a - Repository name
- Optionally you can give it a - Description
- Select - Private
- Select - Create repository- This will take a little while. After it's done, you will be directed to the newly created repository. 
After completing the steps in this lab, you will have an MCP Server running on Azure that is publicly available. Ideally, you don't want that. Make sure to delete the Azure Web App after finishing the lab.
Deploy the Azure Web App
- Go to - portal.azure.com 
- Hover over the - Resource groupstab and select- Create 
- Click the - Subscriptiondropdown and select your subscription from the list 
- Click in the - Resource groupname text box and type a resource group name such as "jokesgrp" 
- Select the - Regiondropdown choose the region closest to you 
- Click - Review + create 
- Click - Create 
- Select - Go to resource group 
- Select - Create 
- Click into the - search box 
- Type - web app
- Select the - Create buttonin the Web App search result 
- Select - Web App 
- Select the - Nametext input and put in a name for the web app, such as "wegotjokes" 
- Select the - Runtime stackdropdown and choose- Node 22 LTS 
- Select the - Regiondropdown and choose the region closest to you 
- Click - Review + create 
- Click - Create 
- Click - Refreshto update your deployment progress 
- Once deployment is complete, select - Go to resource 
- Expand the - Deploymenttab 
- Click - Deployment Center 
- Click the - Sourcedropdown and select- GitHub 
- Select - Authorize 
- Select - Continue 
- Select - Authorize AzureAppService 
- Click the - Organizationdropdown and choose your organization 
- Click on the - Repositorydropdown and choose the GitHub repository you created earlier from the list 
- Click the - Branchdropdown and choose your branch 
- Keep everything else default and select - Save 
- Click - Refreshto update the deployment status 
- Verify that the deployment is complete  
Create the Power Platform Connector
- Select - Morein the left menu
- Select the - Discover allbutton
- Under Data, select the - pin iconnext to- Custom connectorsto pin it to the left menu
- Select - Custom connectorsin the left menu
- Select - New custom connector
- Select - Create from blank 
- Give the connector a name (for instance - JokesMCP)
- Select the blue - Continuebutton
- Select the - Swagger editortoggle 
- Copy the yaml code from here and replace the code in the Swagger editor 
- In the Swagger editor, replace - dummyurl.azurewebsites.netwith the URL of the web app you created earlier. Make sure to remove- https://and everything after- azurewebsites.net
- Select - Create connectorto create the connector
Add the MCP Server as an action in Microsoft Copilot Studio
Now you have an MCP Server running in Azure, and a connector available in the Power Platform. This step is about creating an agent in Microsoft Copilot Studio and adding the MCP Server to the agent.
- Select the environment picker at the top right corner 
- Select the right environment 
- Select - Createin the left navigation
- Select the blue - New agentbutton 
- Select - Skip to configureon the top right 
- Change the name to - Jokester
- Add the following - DescriptionA humor-focused agent that delivers concise, engaging jokes only upon user request, adapting its style to match the user's tone and preferences. It remains in character, avoids repetition, and filters out offensive content to ensure a consistently appropriate and witty experience.
- Add the following - InstructionsYou are a joke-telling assistant. Your sole purpose is to deliver appropriate, clever, and engaging jokes upon request. Follow these rules: * Respond only when the user asks for a joke or something related (e.g., "Tell me something funny"). * Match the tone and humor preference of the user based on their input—clean, dark, dry, pun-based, dad jokes, etc. * Never break character or provide information unrelated to humor. * Keep jokes concise and clearly formatted. * Avoid offensive, discriminatory, or NSFW content. * When unsure about humor preference, default to a clever and universally appropriate joke. * Do not repeat jokes within the same session. * Avoid explaining the joke unless explicitly asked. * Be responsive, witty, and quick.
- Select - Createon the top right 
- Enable Generative AI - Orchestration 
- Disable general knowledge in the - Knowledgesection 
- Select - Actionsin the top menu 
- Select - Add an action 
- Search for the name (in this case, - jokes) of the connector you created earlier (see number 1 in the screenshot below)
- Select the - Jokes MCP server(see number 2 in the screenshot below) 
- Wait for the connection to be created and select - Nextwhen it's done 
- Change the - Description for the agent to know when to use this actionto the following text:Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.- Leave the rest as default, like for instance end user authentication, where you will learn more about in a minute. 
- Select - Add actionto add the action to the agent 
- Select the - refresh iconin the- Test your agentpane 
- In the - Test your agentpane send the following message:Can I get a Chuck Norris joke?- This will show you message that additional permissions are required to run this action. This is because of the user authentication in the action wizard. 
- Select - Connect - This will open a new window where you can manage your connections for this agent. 
- Select - Connectnext to the- JokesMCP 
- Wait until the connection is created and select - Submit 
- The connection should now be connected, so the status should be set to - Connected 
- Close the manage your connections tab in your browser - Now you should be back in the Jokester agent screen. 
- Select the - refresh iconin the- Test your agentpane 
- In the - Test your agentpane send the following message:Can I get a Chuck Norris joke?- This will now show a Chuck Norris joke - instead of the additional permissions.  
- In the - Test your agentpane send the following message:Can I get a Dad joke?- This will now show a Dad joke.  
- In the - Test your agentpane send the following message:Can I get a Yo Mama joke?- This will now show a Yo Mama joke.  
And that was the Jokes MCP Server working in Microsoft Copilot Studio. This is also the end of the lab! Hopefully you liked the lab. Please take the time to fill in our feedback form.
Jokes MCP Server details
This is a MCP server built on the TypeScript SDK.
With this MCP Server, you will able to fetch jokes from the following websites:
If you want to run the server locally, make sure to run npm install in the root of the repository.
After that you can run npm run build to build the server and npm start to start the server.
Tools
The following tools are included:
get-chuck-joke
This tool retrieves a random Chuck Norris Joke from chucknorris.io.
get-chuck-categories
This tool retrieves the available categories from chucknorris.io.
get-dad-joke
This tool retrieves a random Dad Joke from icanhazdadjoke.com.
get-yo-mama-joke
This tool retrieves a random Yo Mama Joke from yomama-jokes.com.
Known issues and planned improvements
There are some known issues and planned improvements for MCP in Microsoft Copilot Studio. They are listed in this Microsoft Learn article.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables users to fetch jokes from multiple sources including Chuck Norris jokes, Dad jokes, and Yo Mama jokes through APIs. Integrates with Microsoft Copilot Studio to provide humor-focused AI agent capabilities.
Related MCP Servers
- -security-license-qualityAn MCP server that enables Microsoft Copilot Studio to fetch jokes from multiple sources including Chuck Norris jokes, Dad jokes, and Yo Mama jokes.
- -security-license-qualityAn MCP server for Microsoft Copilot Studio that delivers jokes from multiple sources including Chuck Norris jokes, Dad jokes, and Yo Mama jokes upon user request.Last updated -MIT License
- -security-license-qualityAn MCP server that fetches jokes from various APIs (Chuck Norris, Dad jokes, and Yo Mama jokes) for use in Microsoft Copilot Studio.Last updated -MIT License
- -security-license-qualityEnables users to fetch jokes from various categories including Chuck Norris and dad jokes through a standardized MCP interface. Demonstrates integration between Microsoft Copilot Studio and MCP servers for humor-based interactions.Last updated -MIT License