HumorBot-MCP
A specialized utility providing immediate, amusing anecdotes on request, dynamically tailoring its delivery based on user-specified comedic preferences by sourcing content from premier joke repositories like Chuck Norris facts, 'Dad' jokes, and 'Yo Mama' jokes. Features native integration with Microsoft Copilot Studio for seamless, on-the-fly entertainment.
Author

kkarra111
Quick Info
Actions
Tags
Microsoft Copilot Studio Integration via Model Context Protocol (MCP)
Greetings from the Microsoft Copilot Studio ❤️ MCP experimentation lab. This guide outlines the procedure for deploying an MCP Server instance and subsequently incorporating it into your Microsoft Copilot Studio agent.
Understanding MCP
Model Context Protocol (MCP) establishes an open, standardized mechanism for applications to furnish contextual data to Large Language Models (LLMs), a specification championed by Anthropic. MCP standardizes the conduits linking AI models to disparate external data repositories and operational tools. This framework empowers solution architects to embed pre-existing knowledge bases and external APIs directly within Copilot Studio environments.
Currently, Copilot Studio's interaction model is focused exclusively on Tools. For details on current feature sets, consult aka.ms/mcsmcp. Note that certain limitations and future enhancements are documented in the section titled Known Constraints and Prospective Enhancements.
MCP Versus Standard Connectors
How do you decide between utilizing MCP and conventional connectors? Will MCP supersede connectors entirely?
MCP servers are surfaced to Copilot Studio via the established connector infrastructure; therefore, these questions present a false dichotomy. Because MCP servers leverage the existing connector framework, they inherently benefit from enterprise-grade security and administrative oversight, including Virtual Network connectivity, Data Loss Prevention mandates, and diverse authentication mechanisms—all available in this iteration—while simultaneously enabling real-time data retrieval for AI-driven agents.
Consequently, MCP and connectors are fundamentally designed to be mutually enhancing.
Prerequisites
- An active Azure Subscription (with billing information confirmed)
- A registered GitHub account with active login credentials
- Access to a Copilot Studio trial or developer license
- A provisioned Power Platform environment
Deployment Walkthrough
To successfully launch this MCP Server and integrate it into Microsoft Copilot Studio, execute the following sequence of operations:
- Establish a new GitHub Repository from the Template
- Provision the Azure Web Application
- Construct the requisite Power Platform Connector
- Register the MCP Server as an operational tool within Microsoft Copilot Studio
Create a new GitHub repository based on the template
- Navigate to and select
Use this template -
Follow by selecting
Create a new repository -
Specify the correct
Ownerdesignation - Assign a unique
Repository name - Optionally, input a brief
Description - Select the
Privaterepository visibility setting -
Finalize by selecting
Create repositoryThis process requires a brief duration. Upon completion, you will be redirected to your newly instantiated repository.
[!WARNING]
Completing the instructions in this tutorial results in a publicly accessible MCP Server hosted on Azure. This is generally undesirable for production environments. Ensure the Azure Web App resource is decommissioned immediately following the lab completion.
Deploy the Azure Web App
-
Access the Azure portal at
portal.azure.com -
Position your cursor over the
Resource groupstab and select theCreateoption -
Click the
Subscriptionselector and choose your active subscription from the displayed list -
Interact with the
Resource groupname input field and enter an identifier, e.g., "jokesgrp" -
Utilize the
Regiondropdown to select a geographical location proximate to you -
Proceed by clicking
Review + create -
Initiate the deployment via
Create -
Navigate to
Go to resource group -
Select
Createfrom the resource group context -
Engage the global
search box -
Input the service identifier:
web app -
Select the
Create buttonassociated with the Web App search result -
Confirm the selection of
Web Appas the resource type -
Input a unique identifier into the
Nametext field, for instance, "wegotjokes" -
Access the
Runtime stackselector and chooseNode 22 LTS -
From the
Regiondropdown, select your nearest operational region -
Initiate the final deployment review via
Review + create -
Start deployment by clicking
Create -
Click
Refreshto monitor the ongoing deployment status -
Once the deployment confirms success, select
Go to resource -
Expand the
Deploymentpanel -
Select
Deployment Center -
In the
Sourcedropdown, designateGitHub -
Click
Authorizeto grant necessary permissions -
Select
Continue -
Authorize the necessary service principal:
Authorize AzureAppService -
In the
Organizationdropdown, select your designated GitHub organization -
From the
Repositorydropdown, pick the repository established in the preceding step referenced above -
Set the
Branchdropdown to your active development branch -
Retain all other settings as default and click
Save -
Click
Refreshagain to track the continuous deployment pipeline status -
Ensure the deployment process has fully concluded
Create the Power Platform Connector
- Navigate to the Power Platform interface: https://make.powerapps.com/
- In the left navigation pane, select
More - Click the
Discover allbutton - Under the Data section, click the
pin iconadjacent toCustom connectorsto affix it to the primary menu - Select
Custom connectorsfrom the left navigation panel - Select the
New custom connectoroption -
Choose the
Create from blankinitiation path -
Name the connector (e.g.,
JokesMCP) - Click the affirmative
Continuebutton -
Activate the
Swagger editorinterface toggle -
Import the OpenAPI (Swagger) definition from the file provided in [./assets/connector.yml] and overwrite the existing content in the editor pane.
- Within the Swagger configuration, substitute the placeholder value
dummyurl.azurewebsites.netwith the actual hostname of the Azure Web App deployed previously detailed in the preceding section. Crucially, omit thehttps://prefix and truncate any characters following.azurewebsites.net. - Finalize the creation process by selecting
Create connector
Add the MCP Server as an action in Microsoft Copilot Studio
At this juncture, you possess a functioning MCP Server hosted in Azure and a corresponding connector registered in Power Platform. This phase involves configuring an agent within Microsoft Copilot Studio and linking it to the newly deployed MCP Server capability.
- Access the Copilot Studio portal: https://copilotstudio.microsoft.com
- Utilize the environment selector situated in the upper right corner
- Confirm the selection of the intended operational environment
- In the left-hand menu, select
Create -
Click the prominent blue
New agentbutton -
Opt to
Skip to configureusing the top-right control -
Modify the agent's designation to
Jokester -
Input the following detailed
Description:text 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.
-
Input the following comprehensive operational
Instructions:text 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.
-
Conclude agent instantiation by selecting
Createin the upper right corner -
Activate the Generative AI
Orchestrationfeature -
Deactivate generalized knowledge retrieval within the
Knowledgeconfiguration area -
Navigate to the
Actionssection in the top navigation bar -
Select
Add an action -
Search using the designated name (e.g.,
jokes) of the connector previously established referenced above (observe item 1 in the subsequent visualization) -
Select the specific server action:
Jokes MCP server(observe item 2 in the subsequent visualization) -
Await the successful instantiation of the connection object, then proceed by clicking
Next -
Revise the descriptive text utilized by the agent to invoke this tool:
text Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.
Maintain all subsequent settings, including user authentication parameters, which will be addressed shortly.
-
Finalize the tool integration by selecting
Add action -
Engage the
refresh iconwithin theTest your agentsidebar -
In the
Test your agentinput area, submit the following query:text Can I get a Chuck Norris joke?
This initial submission will prompt a notification regarding required supplementary permissions due to the action wizard's configuration of user authentication.
-
Select
Connectto manage authentication prerequisitesThis action opens a new browser tab dedicated to managing connections for this specific agent.
-
Locate the
JokesMCPentry and click the correspondingConnectbutton -
Pause until the connection status updates to 'Connected', then click
Submit -
Verify that the connection status is confirmed as
Connected -
Close the active connection management tab in your browser to return focus to the Jokester agent interface.
-
Re-engage the
refresh iconin theTest your agentsidebar -
In the
Test your agentinput area, resubmit the original request:text Can I get a Chuck Norris joke?
The agent should now display a Chuck Norris anecdote instead of the permission error message.
-
In the
Test your agentinput area, submit the following request:text Can I get a Dad joke?
The system should now return a Dad joke.
-
In the
Test your agentinput area, submit the following request:text Can I get a Yo Mama joke?
The system should now return a Yo Mama joke.
This confirms the successful operational deployment of the Jokes MCP Server within the Microsoft Copilot Studio environment. This concludes the instructional lab segment. We appreciate your participation. Kindly consider providing feedback via this dedicated form.
Jokes MCP Server Technical Specifications
This service functions as an MCP implementation built utilizing the official TypeScript SDK.
This specific MCP Server architecture facilitates the retrieval of humorous content from the following online sources: - chucknorris.io - icanhazdadjoke.com - yomama-jokes.com
To execute the server locally, ensure you execute npm install within the repository's primary directory.
Subsequently, utilize npm run build for compilation and npm start to initiate the server process.
Included Operational Tools
The following distinct functionalities are packaged within this server:
get-chuck-joke
This function queries chucknorris.io to fetch a randomly selected Chuck Norris Joke.
get-chuck-categories
This function retrieves the exhaustive list of categorized joke types available from chucknorris.io.
get-dad-joke
This function fetches a random selection from the repository hosted at icanhazdadjoke.com.
get-yo-mama-joke
This function retrieves an instance of a 'Yo Mama' joke sourced from yomama-jokes.com.
Known Constraints and Prospective Enhancements
Information regarding existing technical limitations and planned feature additions for MCP within Microsoft Copilot Studio is documented in this official Microsoft Learn article.
Collaboration Guidelines
This project actively encourages community involvement and feature suggestions. The majority of submissions necessitate agreement to a Contributor License Agreement (CLA), which formally confirms your authority to grant usage rights for your contribution. Further details are available at https://cla.opensource.microsoft.com.
Upon submission of a pull request, a CLA verification bot will automatically determine if a CLA signature is required and will tag the PR accordingly (e.g., status check, commentary). Please adhere to the instructions provided by the bot; this signature requirement is typically a one-time action across all repositories utilizing our CLA framework.
This repository adheres to the Microsoft Open Source Code of Conduct. Consult the Code of Conduct FAQ for supplementary details, or direct inquiries to opencode@microsoft.com.
Trademarks
This codebase may incorporate intellectual property associated with various projects or services. Authorized utilization of Microsoft trademarks or insignia must strictly comply with Microsoft's Trademark & Brand Guidelines. Reproduction of Microsoft marks in derivative works must not induce confusion or imply endorsement by Microsoft. Any usage of third-party trademarks or logos is governed solely by the policies of those respective third parties.
WIKIPEDIA CONTEXT: Tools categorized under business administration encompass all systems, software, regulatory frameworks, computational aids, and systematic approaches employed by entities to navigate evolving market conditions, sustain competitive relevance, and elevate operational effectiveness.
== High-Level Perspective == Specialized instruments exist for nearly every functional division within an enterprise, classifiable by management discipline: e.g., forecasting instruments, workflow management systems, record-keeping utilities, personnel management aids, analytical engines, governance mechanisms, etc. A functional taxonomy might include:
Utilities for data ingestion and integrity checks across all departments. Systems designed for oversight and optimization of operational sequences. Platforms dedicated to data aggregation and strategic insight generation. Contemporary enterprise apparatuses have undergone profound modernization over the preceding decade, driven by rapid technological advancement, often making the selection of optimal business instruments for any given context highly complex. This complexity stems from relentless pressure to reduce expenditure, maximize revenue, deeply comprehend client requirements, and deliver required products precisely in the manner demanded by the consumer. Within this dynamic environment, leadership must adopt a strategic posture toward selecting and deploying business management technologies rather than merely adopting the newest available solution. Managers frequently integrate tools without requisite modification, resulting in systemic instability. Consequently, business management instruments require meticulous selection followed by tailored customization to meet organizational imperatives, reversing the common tendency.
== Prevalent Instruments == In 2013, Bain & Company conducted a global assessment of business tool adoption. The findings reflect how tool outcomes address regional specificities, factoring in market downturns and corporate standing. The ten most frequently cited instruments included:
Strategic planning frameworks Customer relationship management (CRM) suites Employee sentiment assessment tools Competitive benchmarking procedures Balanced scorecard implementation Core competency identification Outsourcing strategies Organizational change management programs Supply chain optimization systems Formalized mission/vision documentation Market segmentation methodologies Total quality management (TQM) principles
== Enterprise Software Applications == A software program or collection of programs utilized by personnel to execute diverse organizational functions is termed business software or an enterprise application. These applications serve to enhance productivity metrics, quantify performance, and conduct various corporate tasks with precision. This software evolution commenced with management information systems (MIS), progressed through enterprise resource planning (ERP), incorporated customer relationship management (CRM), and has now predominantly transitioned into cloud-based organizational management platforms. While a definite correlation exists between IT investment and organizational success, two critical factors amplify realized value: the efficacy of the deployment process and the rigorous adherence to proper instrument selection and customization protocols.
== Resources for Small and Medium Enterprises (SMEs) == Tools specifically tailored for SMEs are vital as they offer mechanisms to streamline...
