HumorEngine-Dispatch
A specialized utility designed to furnish jocular content via external joke repositories, intelligently tailoring responses to user-specified contextual parameters for highly personalized amusement. It guarantees terse, amusing outputs characterized by a sharp, droll sensibility applicable across diverse interactive scenarios.
Author

VoltScp
Quick Info
Actions
Tags
Integrated Copilot Studio Enhancement via Model Context Protocol (MCP)
This documentation guides you through the deployment sequence for an MCP Server instance and its subsequent integration within the Microsoft Copilot Studio environment.
Understanding the MCP Framework
Model Context Protocol (MCP), established and standardized by Anthropic, defines the official methodology for applications to impart situational awareness to Large Language Models (LLMs). MCP facilitates standardized connectivity between AI inference engines and disparate external data repositories or application programming interfaces (APIs). Consequently, developers can fluidly embed pre-existing knowledge bases and utility endpoints directly into Copilot Studio agents.
Presently, Copilot Studio's native integration primarily focuses on 'Tools.' For a detailed overview of current feature parity, consult aka.ms/mcsmcp. Information concerning existing limitations and forthcoming enhancements is documented here.
Juxtaposing MCP Against Connectors
When should one elect for MCP implementation over standard connectors, and will MCP supersede them entirely?
Since MCP servers are surfaced to Copilot Studio through the existing connector architecture, the premise of replacement is moot. The reliance on the connector infrastructure grants MCP deployments immediate access to established enterprise-grade security and administrative governance frameworks. This includes, but is not limited to, Virtual Network encapsulation, Data Loss Prevention mandates, and multiple authentication pathways—all functional in this iteration—while simultaneously supporting low-latency data retrieval for generative AI entities.
Thus, MCP and connectors are functionally synergistic components.
Initial Requirements
- An active Azure Subscription (with validated payment particulars).
- A registered and authenticated GitHub account.
- Access to a Copilot Studio trial or developer licensing.
- A fully provisioned Power Platform operational environment.
Deployment Procedure
The successful activation of this MCP Server and its utility within Microsoft Copilot Studio necessitates adherence to the subsequent stages:
- Establish a new GitHub repository derived from the template
- Provision the Azure Web Application endpoint
- Fabricate the requisite Power Platform Connector definition
- Incorporate the MCP Server endpoint as an executable capability within Microsoft Copilot Studio
Generating a New GitHub Repository from the Blueprint
- Select the
Use this templatedirective. -
Initiate the creation of a
Create a new repository. -
Designate the appropriate repository
Owner. - Assign a unique
Repository name. - Optionally furnish a descriptive
Description. - Select the
Privatevisibility setting. -
Finalize by selecting
Create repository.This operation requires a brief duration. Upon completion, you will be redirected to the newly instantiated repository.
[!WARNING]
Executing the steps outlined in this guide results in a publicly accessible MCP Server hosted on Azure. This is generally undesirable. Ensure the Azure Web App is decommissioned immediately following the completion of this instructional exercise.
Provisioning the Azure Web Application
-
Navigate to
portal.azure.com. -
Hover over the
Resource groupscontrol and selectCreate. -
Utilize the
Subscriptiondropdown to select your designated subscription from the enumeration. -
Click within the
Resource groupdesignation field and input a name for the resource group, such as "jokesgrp". -
From the
Regiondropdown, select the geographical zone nearest your location. -
Execute the
Review + createstep. -
Confirm by clicking
Create. -
Select the navigational option
Go to resource group. -
Choose the
Createaction. -
Interact with the ubiquitous
search box. -
Input the term
web app. -
In the search results for Web App, click the
Create button. -
Specify
Web Appas the resource type. -
Engage the
Nametext input field and furnish an identifier for the web application, e.g., "wegotjokes". -
Select the
Runtime stackdropdown and specifyNode 22 LTS. -
Again, select the
Regiondropdown and choose your geographically proximate data center. -
Click
Review + create. -
Execute the
Createcommand. -
Press
Refreshto monitor the deployment progress. -
Once provisioning is finalized, select
Go to resource. -
Expand the section labeled
Deployment. -
Click on
Deployment Center. -
In the
Sourcedropdown, mandate the selection ofGitHub. -
Select the
Authorizeprompt. -
Choose
Continue. -
Select
Authorize AzureAppService. -
Click the
Organizationdropdown and select your designated organization. -
Click the
Repositorydropdown and select the repository previously established here from the presented list. -
Utilize the
Branchdropdown to select your desired branch. -
Maintain all remaining configurations at their default settings and finalize with
Save. -
Click
Refreshagain to ascertain the deployment outcome. -
Confirm the successful conclusion of the deployment process.
Constructing the Power Platform Gateway
- Navigate to https://make.powerapps.com/.
- In the left-hand navigation panel, select
More. - Choose the comprehensive
Discover allbutton. - Under the Data grouping, select the
pin iconadjacent toCustom connectorsto affix it permanently to the navigation menu. - Select
Custom connectorsfrom the persistently visible left menu. - Click
New custom connector. -
Opt for
Create from blank. -
Assign a suitable designation to the connector (e.g.,
JokesMCP). - Select the illuminated blue
Continuebutton. -
Activate the
Swagger editortoggle switch. -
Obtain the OpenAPI (YAML) definition from here and substitute its contents entirely within the Swagger editor pane.
- Within the Swagger editor, substitute the placeholder
dummyurl.azurewebsites.netwith the precise hostname URL of the Azure Web App provisioned previously. Critically, omit thehttps://prefix and any trailing path segments beyond.azurewebsites.net. - Finalize the definition by selecting
Create connector.
Integrating the MCP Endpoint as an Agent Capability in Copilot Studio
At this juncture, an operational MCP Server resides in Azure, and a functional connector is available within the Power Platform. This phase centers on agent creation in Microsoft Copilot Studio and the attachment of the MCP server's capabilities.
- Access the environment at https://copilotstudio.microsoft.com.
- Use the environment selector located in the upper-right quadrant.
- Select the correct operational environment.
- In the left-side navigation structure, select
Create. -
Click the prominent blue button labeled
New agent. -
Bypass the initial setup by clicking
Skip to configurein the upper right margin. -
Modify the display name 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 these directives: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.
-
Confirm creation by clicking
Createin the upper right corner. -
Activate the Generative AI
Orchestrationfeatures. -
Deactivate the broad informational query capability within the
Knowledgesubsection. -
Navigate to the upper menu bar and select
Actions. -
Click
Add an action. -
Search using the connector's designated identifier (e.g.,
jokes) created previously (refer to marker 1 in the subsequent visual aid). -
Select the specific artifact named
Jokes MCP server(refer to marker 2 in the visual aid). -
Await the successful handshake for the connection establishment and then click
Nextonce available. -
Modify the
Description for the agent to know when to use this actionto read as follows:text Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.
Retain all other settings, such as end-user authentication parameters, in their default state (more on authentication shortly).
-
Click
Add actionto bind the utility to the agent profile. -
Activate the
refresh iconwithin theTest your agentsidebar. -
In the
Test your agentinput area, submit the query:text Can I get a Chuck Norris joke?
This initial invocation will prompt a notification indicating the necessity for supplementary permissions due to the action wizard's authentication configuration.
-
Select the
Connectbutton.
A new browser tab will launch, facilitating the management of connection parameters for this agent.
-
Locate the
JokesMCPentry and clickConnectadjacent to it. -
Allow time for the connection object to finalize provisioning, then click
Submit. -
The connection status should now definitively display as
Connected. -
Close the connection management interface tab.
You are now returned to the main Jokester agent configuration screen.
-
Re-engage the
refresh iconin theTest your agentpanel. -
In the
Test your agentinput area, resubmit the request:text Can I get a Chuck Norris joke?
This time, a Chuck Norris joke should be displayed, bypassing the permission dialogue.
-
In the
Test your agentinput area, submit a request for a different category:text Can I get a Dad joke?
This should yield a Dad joke result.
-
In the
Test your agentinput area, submit the final test query:text Can I get a Yo Mama joke?
This will retrieve a Yo Mama joke.
Congratulations! The Jokes MCP Server is now fully operational within Microsoft Copilot Studio. This concludes the deployment tutorial. We trust this exercise proved valuable. We encourage you to dedicate a moment to complete our feedback mechanism.
Jokes MCP Server Technical Specifications
This server adheres to the MCP standard and was engineered utilizing the TypeScript SDK.
This specific MCP implementation grants the capability to retrieve humorous content from the following external endpoints: - chucknorris.io - icanhazdadjoke.com - yomama-jokes.com
For local execution of the server environment, ensure you execute npm install within the repository's root directory.
Subsequently, the sequence for building and launching the server is: npm run build followed by npm start.
Embedded Utilities
The following modular functions are bundled within this solution:
get-chuck-joke
This utility fetches a single, arbitrary Chuck Norris anecdote sourced exclusively from chucknorris.io.
get-chuck-categories
This function retrieves the comprehensive list of topical categories available from chucknorris.io.
get-dad-joke
This utility retrieves a single, random paternal-themed jest sourced from icanhazdadjoke.com.
get-yo-mama-joke
This utility retrieves a single, random 'Yo Mama' jest sourced from yomama-jokes.com.
Recognized Deficiencies and Future Iterations
Existing limitations and proposed augmentations for MCP integration within Microsoft Copilot Studio are cataloged in the official documentation located at this Microsoft Learn article.
Collaborative Engagement
This repository enthusiastically accepts external contributions and suggested enhancements. Most submissions necessitate acceptance of a Contributor License Agreement (CLA) affirming your authority to grant usage rights for your contribution. Detailed prerequisites are available at https://cla.opensource.microsoft.com.
Upon submission of a pull request, a CLA status bot will automatically ascertain if a CLA signature is required and appropriately annotate the request (e.g., status checks, commentary). Kindly adhere to the instructions provided by the bot. This declaration is a one-time requirement across all repositories utilizing our CLA system.
This project has formally adopted the Microsoft Open Source Code of Conduct. Further context can be found in the Code of Conduct FAQ or by contacting opencode@microsoft.com with any supplemental inquiries.
Trademarks Stipulations
This software artifact may incorporate branding or proprietary identifiers associated with various products or initiatives. Authorized utilization of Microsoft proprietary marks or emblems must strictly conform to Microsoft's Trademark & Brand Guidelines. Integration of Microsoft trademarks into modified project versions must not engender user confusion or imply official endorsement. Any incorporation of third-party trademarks is subject to those respective third parties' established policies.
WIKIPEDIA: As per ISO definitions, distributed computing infrastructure, or "cloud computing," is characterized as "a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction."
== Defining Attributes == In 2011, the U.S. National Institute of Standards and Technology (NIST) delineated five fundamental "essential characteristics" defining cloud environments. The precise NIST definitions are enumerated below:
On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service." By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.
== Chronology ==
The genesis of distributed computing concepts traces back to the 1960s, when the principle of time-sharing gained traction through remote job entry (RJE). The centralized "data center" paradigm, where users submitted computational tasks to dedicated operators for execution on large mainframe systems, dominated this epoch. This period represented an active phase of investigation into methodologies for broadening access to substantial computational capacity via time-slicing techniques, thereby maximizing infrastructure, platform, and application utility for the end-user base. The figurative representation of virtualized services as a "cloud" originated in 1994, employed by General Magic to describe the collective domain accessible by mobile software agents within its Telescript framework. This metaphor is widely attributed to David Hoffman, an employee of General Magic specializing in communications, drawing inspiration from its established usage within telecommunications networks. The term 'cloud computing' achieved wider recognition in 1996 when Compaq Computer Corporation drafted a strategic blueprint for forthcoming computational models and Internet services. The organization's aspiration was to supplant the reliance on local hardware...
