joke-delivery-service-mcp
Provides on-demand, amusing anecdotes, intelligently tailored to user preference while maintaining high standards of comedic taste and appropriateness. Leverages Microsoft Copilot Studio integration to source humor from various external data feeds and enrich conversational flow with timely levity.
Author

ralba316
Quick Info
Actions
Tags
Integration Guide: Humor Engine with Microsoft Copilot Studio via MCP
This documentation details the procedure for deploying an MCP (Model Context Protocol) Server and subsequently integrating it within the Microsoft Copilot Studio environment.
Understanding MCP
The Model Context Protocol (MCP), established by Anthropic, is an open specification designed to unify how applications furnish contextual information to Large Language Models (LLMs). MCP formalizes the linkage between AI computation engines and diverse data repositories or operational utilities. For Copilot Studio creators, this means existing knowledge bases and external service endpoints can be woven directly into agent capabilities.
Presently, Copilot Studio primarily interfaces via its Tooling paradigm. For specifics on current integration methods, consult aka.ms/mcsmcp. Note that ongoing refinement addresses identified constraints and planned feature enhancements, cataloged here.
MCP Versus Standard Connectors
When is MCP the correct choice over conventional Connectors? Will one supersede the other?
MCP servers utilize the existing Connector infrastructure for deployment into Copilot Studio. Consequently, the dichotomy is less about replacement and more about synergy. Because MCP leverages the Connector framework, it inherits robust enterprise security and compliance mechanisms, including Virtual Network encapsulation, Data Loss Prevention mandates, and diverse authentication schemes—all available in this iteration—while simultaneously enabling dynamic data retrieval for AI-driven agents.
Thus, MCP and Connectors function optimally when used in conjunction.
Prerequisites Checklist
- An active Azure subscription (with a verified payment method).
- A registered GitHub account with active login credentials.
- Access to a Copilot Studio trial or developer license.
- A provisioned Power Platform environment.
Deployment Workflow
To activate this joke-fetching MCP Server and utilize it within Microsoft Copilot Studio, execute the subsequent steps:
- Establish a new GitHub repository from the provided template
- Provision the Azure Web Application
- Configure the Power Platform Connector
- Integrate the MCP Server as an operational action within Microsoft Copilot Studio
Repository Initialization from Template
- Click
Use this template. -
Initiate the creation of a new repository.
-
Designate the correct
Owner. - Assign a unique
Repository name. - Optionally, supply a brief
Description. - Set visibility to
Private. -
Select
Create repository.This initialization phase requires a brief duration. Upon completion, you will be redirected to your newly instantiated repository.
[!WARNING]
Following this lab's procedures results in a publicly exposed MCP Server hosted on Azure. For security, ensure the Azure Web App resource is decommissioned immediately after concluding practical exercises.
Azure Web App Provisioning
-
Navigate to
portal.azure.com. -
Locate the
Resource groupsinterface and choose theCreateoption. -
Open the
Subscriptionselector and choose your active subscription. -
Input a resource group identifier (e.g., "jokesgrp") into the
Resource groupfield. -
Utilize the
Regionselector to select the geographically nearest operational center. -
Proceed by selecting
Review + create. -
Confirm by clicking
Create. -
Select
Go to resource group. -
Initiate a new resource creation by selecting
Create. -
Interact with the central
search box. -
Input the term
web app. -
Select the
Create buttonassociated with the Web App search result. -
Confirm the resource type selection:
Web App. -
Populate the
Namefield with a unique identifier (e.g., "wegotjokes"). -
From the
Runtime stackselector, chooseNode 22 LTS. -
Re-select the geographically closest
Region. -
Select
Review + create. -
Execute the deployment via
Create. -
Click
Refreshto monitor the deployment status updates. -
Once deployment confirmation is received, select
Go to resource. -
Expand the
Deploymentblade. -
Access the
Deployment Center. -
In the
Sourcedropdown, selectGitHub. -
Authorize the connection by clicking
Authorize. -
Select
Continue. -
Authorize the Azure App Service linkage:
Authorize AzureAppService. -
Open the
Organizationselector and choose your corresponding organizational entity. -
From the
Repositoryselector, identify and select the GitHub repository established previously. -
Choose the correct
Branch. -
Maintain default settings for all other parameters and click
Save. -
Re-engage the
Refreshmechanism to track the continuous integration deployment progress. -
Validate that the deployment process has finalized successfully.
Power Platform Connector Construction
- Navigate to https://make.powerapps.com/.
- In the navigational panel on the left, select
More. - Click the comprehensive discovery control:
Discover allbutton. - Under the 'Data' grouping, activate the
pin iconadjacent toCustom connectorsto secure it within the main menu. - Select
Custom connectorsfrom the left-hand navigation. - Initiate a new connector instance:
New custom connector. -
Choose the manual setup option:
Create from blank. -
Assign a name to the connector (e.g.,
JokesMCP). - Select the affirmative
Continuebutton (colored blue). -
Toggle the
Swagger editorswitch to the 'on' position. -
Substitute the editor's contents with the YAML definition sourced from here.
- Within the Swagger configuration, replace the placeholder
dummyurl.azurewebsites.netwith the fully qualified domain name of the web application deployed above. Ensure that thehttps://prefix and any path segments following.azurewebsites.netare omitted. - Finalize the creation process by selecting
Create connector.
Incorporating the MCP Server into Microsoft Copilot Studio Actions
At this stage, the Azure-hosted MCP Server is operational, and its corresponding connector is registered in Power Platform. The next phase involves creating an agent within Microsoft Copilot Studio and linking it to the new MCP Server functionality.
- Access the platform at https://copilotstudio.microsoft.com.
- Utilize the environment selection tool located in the upper right quadrant.
- Designate the appropriate operational environment.
- Select
Createfrom the left-side navigation menu. -
Click the
New agentbutton (blue). -
Bypass initial configuration by selecting
Skip to configurein the upper right corner. -
Rename the agent to
Jokester. -
Populate the
Descriptionfield with the following text: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. -
Populate the
Instructionssection with the following directive set:```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. ```
-
Finalize agent creation by selecting
Create(top right). -
Activate the Generative AI
Orchestrationfeature. -
Deactivate default general knowledge retrieval within the
Knowledgesection. -
Navigate to the
Actionstab in the upper menu bar. -
Select
Add an action. -
Search using the name (e.g.,
jokes) of the connector defined previously. -
Select the operational component labeled
Jokes MCP server. -
Await the successful connection establishment, then proceed by selecting
Next. -
Modify the
Description for the agent to know when to use this actionto the subsequent text:text Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.
Maintain default settings for auxiliary parameters, specifically regarding end-user authorization, which will be addressed momentarily.
-
Confirm the integration by clicking
Add action. -
Engage the
refresh iconwithin theTest your agentside panel. -
Input the following query into the
Test your agentpanel:text Can I get a Chuck Norris joke?This initial attempt will likely prompt a message indicating the necessity of granting further authorization permissions, a consequence of the action wizard's default user authentication settings.
-
Initiate the connection process by selecting
Connect.
This action invokes a new browser tab dedicated to connection management for this agent.
-
Locate the
JokesMCPentry and selectConnectbeside it. -
Wait for the connection status to confirm as established, then click
Submit. -
The connection status indicator should now display
Connected. -
Terminate the connection management tab.
The interface should now revert to the Jokester agent configuration screen.
-
Re-activate the
refresh iconin theTest your agentpanel. -
Send the test query again:
text Can I get a Chuck Norris joke?The expected outcome is the display of a genuine Chuck Norris joke, not the previous permission prompt.
-
Submit a request for a different genre:
text Can I get a Dad joke?This should yield a Dad joke.
-
Submit the final test query:
text Can I get a Yo Mama joke?This should successfully retrieve a Yo Mama joke.
Congratulations! The Jokes MCP Server is now fully operational and integrated within Microsoft Copilot Studio, concluding this tutorial. We value your participation; kindly consider submitting feedback via feedback form.
Details of the Jokes MCP Server
This service instance is an implementation of the MCP specification, constructed using the TypeScript SDK.
This specific MCP Server grants the capability to retrieve humorous content from the following external joke providers: - chucknorris.io - icanhazdadjoke.com - yomama-jokes.com
For local execution of the server environment, execute npm install in the repository's root directory.
Subsequently, compile the server using npm run build and start the runtime with npm start.
Included Utilities (Tools)
The following discrete functions are bundled within this service:
get-chuck-joke
Retrieves a random jest concerning Chuck Norris sourced from chucknorris.io.
get-chuck-categories
Fetches the comprehensive list of available joke categories provided by chucknorris.io.
get-dad-joke
Obtains a random, typically groan-inducing, Dad joke from icanhazdadjoke.com.
get-yo-mama-joke
Retrieves a random "Yo Mama" joke hosted by yomama-jokes.com.
Current Limitations and Future Enhancements
Known deficiencies and planned upgrades for MCP integration within Microsoft Copilot Studio are documented in detail within this Microsoft Learn article.
Collaboration Guidelines
This project actively solicits external contributions and constructive suggestions. Most submissions necessitate agreement to a Contributor License Agreement (CLA), confirming your right to grant usage rights for your contribution. Review details at https://cla.opensource.microsoft.com.
A CLA bot will automatically check pull requests to determine if a CLA is required and will apply appropriate status indicators or commentary. Compliance with this process is typically required only once across all repositories utilizing our CLA.
This project adheres to the Microsoft Open Source Code of Conduct. Further specifics are available in the Code of Conduct FAQ, or contact opencode@microsoft.com for supplementary inquiries.
Trademarks Notice
This material may feature intellectual property associated with specific projects, products, or services. Authorized utilization of Microsoft's proprietary marks or emblems must strictly follow Microsoft's Trademark & Brand Guidelines. Any deployment of modified versions must avoid creating ambiguity or implying Microsoft endorsement. Usage of any third-party trademarks is governed by those respective third parties' policies.
WIKIPEDIA PERSPECTIVE: Business administration instruments encompass all frameworks, software, regulatory mechanisms, computational aids, and strategic methodologies employed by enterprises to navigate dynamic market conditions, secure competitive standing, and elevate operational efficiency. == Overview == Tools map to specific organizational departments and can be categorized by management function, such as forecasting, workflow control, documentation, personnel administration, arbitration, oversight, etc. A functional taxonomy includes:
Instrumentation for data input integrity checks across all units. Systems designed for process governance and refinement. Platforms for aggregating data and supporting executive determinations. Contemporary business toolsets have undergone radical advancement in the preceding decade, propelled by rapid technological shifts, often making optimal selection challenging. This complexity is fueled by persistent objectives: reducing operational expenditure, maximizing revenue generation, achieving deep customer insight, and precisely delivering required products in the preferred format. Given this environment, executive leadership should adopt a strategic viewpoint toward business instrumentation, rather than merely pursuing the newest available utility. Managers frequently implement tools without necessary contextual modification, resulting in systemic instability. Consequently, business systems must be chosen deliberately and subsequently tailored to organizational imperatives, reversing the common practice. == Most Used Metrics == A 2013 analysis by Bain & Company mapped the global deployment of business tools, reflecting how their outputs address regional specificities relative to market downturns and corporate performance. The top ten categories identified were:
Strategic roadmapping Client relationship management frameworks Personnel sentiment surveys Comparative performance analysis (Benchmarking) Integrated performance metrics (Balanced Scorecard) Core organizational capability identification External resource allocation (Outsourcing) Organizational evolution programs Logistics chain oversight Foundational mission and vision articulation Target audience delineation Total quality stewardship == Business Software Applications == Software, defined as a set of programs utilized by commercial users to execute diverse corporate functions, is termed business software (or enterprise application). These applications serve to augment productivity, quantify results, and execute myriad other corporate duties with precision. The evolution progressed from rudimentary Management Information Systems (MIS) to comprehensive Enterprise Resource Planning (ERP) suites. Subsequently, Customer Relationship Management (CRM) modules were incorporated, culminating in the current landscape dominated by cloud-based enterprise resource governance. While a clear relationship exists between IT investment magnitude and organizational achievement, two factors are paramount for value realization: the efficacy of the implementation process and the precision in selecting and customizing the appropriate tooling.
