JokesMCP

aprildunnam/JokesMCP

3.2

If you are the rightful owner of JokesMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Model Context Protocol (MCP) server is a standardized interface that facilitates interaction between external systems and AI models by providing relevant context and receiving responses.

Tools
4
Resources
0
Prompts
0

Using an MCP Server with Microsoft Copilot Studio 🧠🤖

Welcome to the using an MCP Server with Microsoft Copilot Studio 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 a standardized interface developed by Anthropic that enables external systems to interact with AI models by providing relevant context and receiving responses. In Microsoft Copilot Studio, you can add an MCP Server as a action. MCP Servers can consist of resources, tools and/or prompts. The tools are currently supported in Microsoft Copilot Studio.

MCP vs Connectors

TODO: Why would you use MCP instead of connectors?

Prerequisites

  • Azure Subscription (with payment method added)
  • Node installed (preferably with NVM)
  • Have a GitHub account and be logged in

Minimal Path To Awesome

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
  • Set up the MCP Server as an Azure Web App
  • Create the Power Platform Connector
  • Add the MCP Server as an action in Microsoft Copilot Studio

Part 1: Create a new GitHub repository based on the template

  1. Select Use this template

  2. Select `Create a new repository

  3. Select the right Owner

  4. Give it a Repository name

  5. Optionally you can give it a Description

  6. Select Public (if you want to make the repository publicly available) or Private (if you want to keep it private - RECOMMENDED)

  7. Select Create repository

    This will take a little while. After it's done, you will be directed to the newly created repository.

[!WARNING]
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.

Part 2: Deploy the Azure Web App and configure it to grab the source from the GitHub repository

1. Go to portal.azure.com

Azure Portal

2. Hover over the Resource groups tab and select Create

Resource Group

3. Click the Subscription dropdown and select your subscription from the list

Select Subscription

4. Click in the Resource group name text box and type a resource group name such as "jokesgrp"

Resource Group Name

5. Select the Region dropdown choose the region closest to you

Resource Group Region

6. Click Review + create

Review and create

7. Click Create

Create

8. Select Go to resource group

Go to resource

9. Select Create

Create

10. Click into the search box

Search

11. Type web app

12. Select the Create button in the Web App search result

Search Results

13. Select Web App

Create Web App

14. Select the Name text input and put in a name for the web app, such as "wegotjokes"

Web App Name

15. Select the Runtime stack dropdown and choose Node 22 LTS

Web App Runtime

16. Select the Region dropdown and choose the region closest to you

Region

17. Click Review + create

Review

18. Click Create

Create

19. Click Refresh to update your deployment progress

Refresh

20. Once deployment is complete, select Go to resource

Go to resource

21. Expand the Deployment tab

Deployment tab

22. Click Deployment Center

Deployment center

23. Click the Source dropdown and select GitHub

Choose source

24. Go to the Jokes MCP Server Repo and select Use this template

Github Repo

25. Select Create a new repository

Create repo

26. Choose your repo as the owner

Repo Owner

27. Enter a repository name, such as "aprilgotjokes"

Repo Name

28. Click Create repository

Create

29. Go back to the Deployment Center in Azure

Deployment Center

30. Select Authorize

Authorize

31. Select Continue

Continue

32. Select Authorize AzureAppService

Authorize

33. Click the Organization dropdown and choose your organization

Org Selection

34. Click on the Repository dropdown and dhoose your GitHub repo from the list

Repo Selection

35. Click the Branch dropdown and choose your branch

Select Branch

36. Keep everything else default and select Save

Save

37. Click Refresh to update the deployment status

Refresh

38. Verify that the deployment is complete

Part 3: Create the Power Platform Connector

  1. Replace the host in the below OpenAPI v2 spec with the host of your web API

  2. Go to https://make.powerapps.com/

  3. Select More in the left menu

  4. Select the Discover all button

  5. Under Data, select the pin icon next to Custom connectors to pin it to the left menu

  6. Select Custom connectors in the left menu

  7. Select New custom connector

  8. Select Create from blank

  9. Give the connector a name (for instance JokesMCP)

  10. Select the blue Continue button

  11. Select the Swagger editor toggle

  12. Copy the yaml code from and replace the code in the Swagger editor

  13. Select Create connector to create the connector

Part 4: Add the MCP Server as an action in Microsoft Copilot Studio

TODO: write the instructions

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:

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.