HumorEngine-StudioBridge
Provides on-demand, clean, and genre-specific comedic content delivery (e.g., Chuck Norris, Paternal Wit, Insults targeting a generic 'Yo Mama' persona) by leveraging the Model Context Protocol (MCP). It integrates directly with Microsoft Copilot Studio workflows to inject tailored levity into user conversations.
Author

ollimenzel
Quick Info
Actions
Tags
Integrating Humor Delivery via MCP into Microsoft Copilot Studio
This documentation guides you through establishing and integrating an MCP Server dedicated to joke services with your Microsoft Copilot Studio agent.
Understanding MCP
The Model Context Protocol (MCP), formalized by Anthropic, establishes a universal standard for applications to furnish supplementary context data to Large Language Models (LLMs). This protocol standardizes the linkage between AI models and external knowledge repositories or operational APIs. For Copilot Studio creators, MCP facilitates the direct incorporation of existing data endpoints and service APIs.
Presently, Copilot Studio's native support is focused on 'Tools'. Refer to aka.ms/mcsmcp for the current scope of capabilities, which includes documented limitations and planned enhancements detailed here.
MCP Synergy with Connectors
Clarifying the relationship: Should one employ MCP directly or rely on standard Connectors? Will MCP supersede Connectors?
Since MCP servers utilize the existing Connector infrastructure for exposure to Copilot Studio, these distinctions become less about replacement and more about complementarity. The use of the Connector framework ensures MCP services inherit enterprise-grade security and governance features, such as Virtual Network integration, Data Loss Prevention policies, and diverse authentication mechanisms—all available in this deployment—while maintaining real-time data interaction for AI-driven agents.
Thus, MCP and Connectors are fundamentally mutually enhancing components.
Prerequisites Checklist
To proceed with this deployment lab, ensure you have:
- An active Azure Subscription (with billing enabled).
- A configured and logged-in GitHub account.
- Access to a Copilot Studio trial or developer instance.
- A provisioned Power Platform environment.
Deployment Workflow
Deployment of the joke-providing MCP service into Microsoft Copilot Studio involves the following sequential operations:
- Establish a new GitHub repository from the provided template resource.
- Provision the requisite Azure Web Application infrastructure.
- Configure and register the Power Platform Connector.
- Integrate the established MCP Endpoint as an actionable tool within the Microsoft Copilot Studio agent.
Stage 1: GitHub Repository Initialization
Follow these steps to instantiate your codebase repository:
- Select the option:
Use this template. - Initiate the creation of the new repository structure.
- Designate the appropriate
Ownerprofile. - Assign a unique
Repository name. - Optionally, supply a
Description. - Set visibility to
Private. - Finalize by selecting
Create repository.
- Designate the appropriate
This initialization process will require a brief duration. Upon completion, you will be redirected to the newly generated repository view.
[!WARNING]
Be advised: Upon successful conclusion of this guided exercise, an Azure-hosted MCP Server endpoint will be publicly accessible. For security considerations, it is strongly recommended to decommission (delete) the Azure Web App instance immediately after verification.
Stage 2: Azure Web App Provisioning
Execute the following sequence within the Azure portal to deploy the hosting environment:
- Navigate to
portal.azure.com. - Locate the
Resource groupsmanagement area and selectCreate. - From the
Subscriptionselector, choose your active subscription. - Input a logical name for the resource container (e.g., "jokesgrp") into the
Resource groupfield. - Select the geographically optimal
Regionfrom the dropdown menu. - Proceed via
Review + create. - Initiate creation with
Create. - Navigate to the newly formed resource group, selecting
Go to resource group. - Select
Createagain within the resource group context. - Utilize the central
search box. - Input the service identifier:
web app. - Select the
Create buttonassociated with the Web App search result. - Confirm the resource type is
Web App. - Populate the
Namefield with a distinct identifier (e.g., "wegotjokes"). - Configure the
Runtime stacktoNode 22 LTS. - Choose the nearest operational
Region. - Advance with
Review + create. - Finalize provisioning via
Create. - Click
Refreshto monitor deployment progress. - Upon successful rollout, select
Go to resource. - Expand the
Deploymentsection. - Access the
Deployment Center. - In the
Sourcedropdown, selectGitHub. - Authorize the connection via
Authorize. - Select
Continue. - Authorize the service principal:
Authorize AzureAppService. - From the
Organizationselector, choose your GitHub organization. - Select the repository instantiated in Stage 1 from the
Repositorydropdown. - Specify the appropriate source
Branch. - Maintain default settings for remaining parameters and click
Save. - Employ the
Refreshmechanism to check deployment status and confirm finalization.
Stage 3: Power Platform Connector Definition
Establish the gateway between Azure and Power Platform:
- Access the Power Platform maker portal: https://make.powerapps.com/.
- In the navigation sidebar, select
More. - Execute
Discover all. - Locate
Custom connectorsunder the Data grouping and 'pin' it for easy access. - Select the newly pinned
Custom connectorsoption. - Choose
New custom connector. - Select the baseline option:
Create from blank.- Assign a meaningful name to the connector (e.g.,
JokesMCP). - Proceed by selecting the blue
Continuebutton. - Activate the
Swagger editortoggle. - Substitute the editor's existing content with the YAML specification found in ./assets/connector.yml.
- Crucially, in the Swagger definition, replace the placeholder
dummyurl.azurewebsites.netwith the actual hostname of the Web App deployed in Stage 2 (omittinghttps://and any trailing path segments). - Finalize the definition by clicking
Create connector.
- Assign a meaningful name to the connector (e.g.,
Stage 4: Agent Integration within Copilot Studio
This final phase links the operational joke service to your conversational agent:
- Navigate to the Microsoft Copilot Studio environment: https://copilotstudio.microsoft.com.
- Use the environment selector in the upper right corner to select the target environment.
- In the left navigation pane, select
Create. - Initiate a
New agentusing the designated blue button. - Opt to
Skip to configurefrom the top right menu. - Set the Agent Name to
Jokester. -
Update the
Descriptionfield with: 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
Instructionswith the following operational mandates: 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 via
Create. - Enable the
Generative AI Orchestrationtoggle. - Deactivate general knowledge sourcing within the
Knowledgeconfiguration. - Navigate to the
Actionstab in the main menu. - Select
Add an action. - Search using the service name defined in Stage 3 (e.g.,
jokes). - Select the corresponding item, labeled something like
Jokes MCP server. - Permit the connection establishment process to complete, then select
Next. -
Refine the trigger description for the agent's decision-making engine: text Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.
-
Confirm the addition of the tool via
Add action. - In the agent testing pane, activate the connection flow by hitting the
refresh icon. - Input a test query:
Can I get a Chuck Norris joke?. This triggers the authentication requirement notification. - Initiate the connection setup process by selecting
Connect. - In the subsequent connection management window, select
Connectnext to theJokesMCPentry. - Await confirmation that the status shows
Connected, then selectSubmit. - Close the connection management tab.
- Return to the agent interface and
refresh iconthe test pane again. - Re-send the test query:
Can I get a Chuck Norris joke?. The system should now return a joke directly, bypassing the permission prompt. - Verify other categories:
- Test with:
Can I get a Dad joke?(Expect a Dad joke). - Test with:
Can I get a Yo Mama joke?(Expect a Yo Mama joke).
- Test with:
This concludes the successful deployment of the Joke MCP Server integration within Microsoft Copilot Studio. We appreciate your participation; kindly consider providing feedback via https://aka.ms/mcsmcp/lab/feedback.
Jokes MCP Server Technical Details
This service implements the MCP specification utilizing the TypeScript SDK.
Joke retrieval sources integrated into this server include: - chucknorris.io - icanhazdadjoke.com - yomama-jokes.com
For local execution, run npm install in the root directory, followed by npm run build, and finally npm start to launch the server.
Included Capabilities (Tools)
get-chuck-joke: Fetches a non-repeated Chuck Norris joke from chucknorris.io.
get-chuck-categories: Queries chucknorris.io for currently supported joke categories.
get-dad-joke: Pulls a random Paternal Wit submission from icanhazdadjoke.com.
get-yo-mama-joke: Retrieves a generic 'Yo Mama' style joke from yomama-jokes.com.
Operational Notes and Future Development
Known limitations and planned enhancements for MCP within Microsoft Copilot Studio are documented comprehensively in the official Microsoft Learn resource: https://aka.ms/mcsmcpdocs#known-issues--planned-improvements.
Community Engagement
We welcome external contributions and suggestions. Participation generally requires assent to a Contributor License Agreement (CLA) affirming the right to grant usage rights for submitted material. Details are available at https://cla.opensource.microsoft.com. A CLA bot will manage PR decoration automatically.
This repository adheres to the Microsoft Open Source Code of Conduct. Inquiries can be directed to opencode@microsoft.com.
Intellectual Property Notices
Authorization for the usage of Microsoft trademarks or logos is subject to adherence to Microsoft's Trademark & Brand Guidelines. Modifications must not cause user confusion regarding Microsoft endorsement. Third-party marks are governed by their respective policies.
WIKIPEDIA NOTE: Enterprise governance solutions encompass the complete spectrum of applications, control mechanisms, analytical frameworks, and operational philosophies utilized by entities to navigate shifting market conditions, sustain competitive viability, and elevate organizational effectiveness. These systems span specialized functions like resource allocation, workflow optimization, record maintenance, human capital administration, and strategic oversight.
== High-Level Categorization == Management technologies can be segmented based on core operational areas: mechanisms for initial data capture and validation, tools for continuous process refinement and oversight, and platforms for aggregated data analysis supporting executive decision-making. The rapid technological evolution over the past decade has created a vast landscape of potential solutions, complicating optimal selection. The relentless pursuit of cost reduction, revenue augmentation, customer understanding, and precise product fulfillment necessitates a strategic, rather than reactive, approach to technology adoption. Tools must be meticulously selected and then tailored to fit the specific requirements of the enterprise, rather than forcing organizational processes to conform to off-the-shelf software defaults.
== Predominant Technologies (2013 Survey Context) == Analysis from Bain & Company in 2013 indicated global usage patterns reflecting regional strategic priorities:
- Strategic Planning Frameworks
- Client Relationship Management (CRM)
- Personnel Feedback Systems
- Competitive Analysis (Benchmarking)
- Performance Measurement Dashboards (Balanced Scorecard)
- Core Competency Identification
- Service/Asset Offloading (Outsourcing)
- Organizational Transition Programs
- Logistics Network Oversight (SCM)
- Foundational Corporate Mandates (Mission/Vision)
- Customer Base Segmentation
- Comprehensive Quality Assurance Programs (TQM)
== Business Software Definition == Business software refers to computational applications designed to execute specific enterprise functions, enhancing productivity and ensuring accuracy across operations. This evolution progressed from rudimentary Management Information Systems (MIS) to comprehensive Enterprise Resource Planning (ERP) suites, later incorporating CRM capabilities, and culminating in today's dominant cloud-based management platforms. Value creation from IT investment is dependent not just on the technology itself, but crucially on the efficacy of its deployment and the judiciousness of its initial selection and subsequent customization.
