Cover image
Try Now
2025-04-14

Implementación de TypeScript del servidor Jokes MCP

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

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.

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 with the following toggle on:

    Get new features early toggle

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

  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 Private

  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.

Deploy the Azure Web App

  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. Select Authorize

    Authorize

  25. Select Continue

    Continue

  26. Select Authorize AzureAppService

    Authorize

  27. Click the Organization dropdown and choose your organization

    Org Selection

  28. Click on the Repository dropdown and choose the GitHub repository you created earlier from the list

    Repo Selection

  29. Click the Branch dropdown and choose your branch

    Select Branch

  30. Keep everything else default and select Save

    Save

  31. Click Refresh to update the deployment status

    Refresh

  32. Verify that the deployment is complete

    Deploy done

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 here and replace the code in the Swagger editor

  13. In the Swagger editor, replace dummyurl.azurewebsites.net with the URL of the web app you created earlier. Make sure to remove https:// and everything after azurewebsites.net

  14. Select Create connector to 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.

  1. Go to https://copilotstudio.microsoft.com

  2. Select the environment picker at the top right corner

  3. Select the right environment (this environment needs to have the Get new features early toggle on)

    This will change the URL to https://copilotstudio.preview.microsoft.com/.... which indicates you're on the right environment

  4. Select Create in the left navigation

  5. Select the blue New agent button

    New agent

  6. Select Skip to configure on the top right

    Skip to configure

  7. Change the name to Jokester

  8. Add the following Description

    A 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.
    
  9. Add the following Instructions

    You 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.
    
  10. Select Create on the top right

    Create agent

  11. Enable Generative AI Orchestration

    Turn on orchestration

  12. Disable general knowledge in the Knowledge section

    Turn off general knowledge

  13. Select Actions in the top menu

    Actions

  14. Select Add an action

    Add an action

  15. Search for the name (in this case, jokes) of the connector you created earlier (see number 1 in the screenshot below)

  16. Select the Jokes MCP server (see number 2 in the screenshot below)

    Search for and select the action

  17. Wait for the connection to be created and select Next when it's done

    Action and connection

  18. Change the Description for the agent to know when to use this action to 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.

  19. Select Add action to add the action to the agent

    Add action

  20. Select the refresh icon in the Test your agent pane

    Refresh testing pane

  21. In the Test your agent pane 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.

  22. Select Connect

    Additional permissions

    This will open a new window where you can manage your connections for this agent.

  23. Select Connect next to the JokesMCP

    Connect to JokesMCP

  24. Wait until the connection is created and select Submit

    Pick a connection

  25. The connection should now be connected, so the status should be set to Connected

    Status connected

  26. Close the manage your connections tab in your browser

    Now you should be back in the Jokester agent screen.

  27. Select the refresh icon in the Test your agent pane

    Refresh testing pane

  28. In the Test your agent pane send the following message:

    Can I get a Chuck Norris joke?
    

    This will now show a Chuck Norris joke - instead of the additional permissions.

    Chuck Norris joke

  29. In the Test your agent pane send the following message:

    Can I get a Dad joke?
    

    This will now show a Dad joke.

    Dad joke

  30. In the Test your agent pane send the following message:

    Can I get a Yo Mama joke?
    

    This will now show a Yo Mama joke.

    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:

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.

相关推荐

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • rulego
  • ⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • Byaidu
  • Traducción de papel científico en PDF con formatos preservados - 基于 Ai 完整保留排版的 PDF 文档全文双语翻译 , 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 支持 等服务 等服务 等服务 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 提供 cli/mcp/docker/zotero

  • hkr04
  • SDK liviano C ++ MCP (Protocolo de contexto del modelo)

  • sigoden
  • Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 Qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 DiFy 、 Claude 、 Gemini 、 Xai 、 PPIO 、 Ollama 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 Chatglm 、 SillyTraven 、 MCP 等 LLM 的机器人 / Agente | Plataforma de bots de mensajería instantánea basada en LLM, admite Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • lasso-security
  • Una puerta de enlace basada en complementos que orquesta otros MCP y permite a los desarrolladores construir sobre agentes de grado empresarial de TI.

  • modelscope
  • Iniciar aplicaciones de múltiples agentes empoderadas con Building LLM de manera más fácil.

    Reviews

    3 (15)
    Avatar
    user_HgzTvjWb
    2025-04-26

    As a dedicated user of JokesMCP by Laskewitz, I must say this app is a one-of-a-kind gem! It offers a seamless, user-friendly interface and a daily dose of humor that never fails to brighten my day. The jokes are witty and well-curated, making it a delightful experience every time I open the app. Highly recommend it to anyone looking to add some laughter to their routine!

    Avatar
    user_thDRvNox
    2025-04-26

    As a dedicated user of JokesMCP by Laskewitz, I must say this product has been a fantastic addition to my daily routine. It's incredibly easy to access and navigate, making sure I start my day with a smile. If you're looking for a light-hearted way to lift your spirits, JokesMCP is definitely worth checking out!

    Avatar
    user_5awHzAx7
    2025-04-26

    As a loyal user of JokesMCP by Laskewitz, I must say this application never fails to make my day brighter. The humor is top-notch, and the delivery is impeccable. It's an absolute must-have for anyone who enjoys a good laugh and needs a quick mood booster. Highly recommended!

    Avatar
    user_vMoCrD0n
    2025-04-26

    As a loyal MCP application user, I must say JokesMCP by Laskewitz is a fantastic addition to my daily routine. The interface is simple and user-friendly while the jokes are genuinely hilarious and diverse. The ease of use and regular updates make it a must-have for anyone who loves a good laugh. Highly recommend!

    Avatar
    user_yD4Ytq6W
    2025-04-26

    As a longtime fan of MCP applications, I found JokesMCP by Laskewitz to be absolutely delightful! The humor embedded in this app is top-notch, offering a perfect blend of wit and cleverness that keeps me laughing throughout the day. It's a refreshing escape from the mundane, and I think anyone looking for a good laugh will find it truly enjoyable.

    Avatar
    user_9kSMj4T0
    2025-04-26

    As a loyal user of JokesMCP by Laskewitz, I can confidently say that it's one of the best joke applications I've ever used. The user interface is simple, and the jokes are consistently hilarious. It’s the perfect app to brighten up your day with a quick laugh. Highly recommended for anyone looking to add some humor to their daily routine!

    Avatar
    user_Ra4PQT8g
    2025-04-26

    As a dedicated user of JokesMCP, I must say that it has quickly become my go-to for a daily dose of humor. The jokes are consistently fresh and entertaining, making each visit to the app a delightful experience. Kudos to Laskewitz for creating such a fun and engaging platform!

    Avatar
    user_U1aNCpAu
    2025-04-26

    JokesMCP by Laskewitz is an absolute delight! This app offers a treasure trove of jokes that brighten up my day. The user interface is clean, and the jokes are categorized seamlessly, making it easy to find exactly what you need. Whether you’re in need of a quick laugh or a conversation starter, JokesMCP never disappoints. Highly recommend to anyone looking to add a bit of humor to their daily routine!

    Avatar
    user_wBYIGfOo
    2025-04-26

    As a loyal user of JokesMCP, I find it to be an incredibly entertaining and unique application. Created by Laskewitz, the app is a fantastic source of humor that never fails to make me laugh. The user interface is simple and intuitive, making it easy to navigate. Highly recommend trying it out if you're in need of a good laugh!

    Avatar
    user_GG7p4Wf5
    2025-04-26

    As a loyal user of JokesMCP by Laskewitz, I find it incredibly entertaining and user-friendly. The collection of jokes is diverse and always manages to bring a smile to my face. It's a great tool for anyone looking to add a bit of humor to their day. Highly recommended!

    Avatar
    user_Blr1vskb
    2025-04-26

    JokesMCP is an absolute gem for anyone looking to add a burst of humor to their daily routine. Created by the talented Laskewitz, this user-friendly app serves up jokes in a variety of languages, making it accessible and enjoyable for a global audience. The seamless interface and witty welcome message make it a delightful experience from start to finish. Highly recommend!

    Avatar
    user_XrYjBWBO
    2025-04-26

    JokesMCP by Laskewitz is a fantastic app for humor lovers! It’s a seamless experience from the start, with a welcoming interface that keeps you engaged. The jokes are updated regularly, ensuring fresh and hilarious content every time you use it. Highly recommended for anyone looking to inject some fun into their day!

    Avatar
    user_tHHcQbab
    2025-04-26

    As a dedicated MCP application user, I find JokesMCP by Laskewitz absolutely hilarious and engaging! It's the perfect tool to brighten up your day with a wide range of jokes tailored for any sense of humor. The user interface is seamless, making it easy to navigate through endless laughter. Highly recommend for anyone looking to add some humor to their daily routine!

    Avatar
    user_GW6ioNrA
    2025-04-26

    JokesMCP by Laskewitz is a hilarious and user-friendly application that never fails to brighten my day. The jokes are consistently funny and the seamless interface ensures a smooth experience. I appreciate the diverse range of humor that caters to all tastes. Highly recommend for anyone looking to add a bit of laughter to their daily routine!

    Avatar
    user_GZI5OqgF
    2025-04-26

    As a devoted user of JokesMCP by Laskewitz, I am thoroughly impressed! This application has consistently delivered high-quality, entertaining jokes, making every day more enjoyable. The clean interface and seamless user experience are commendable. Highly recommended for anyone in need of a good laugh!