logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

humor-service-connector

Provides instant access to a curated repository of clean, lighthearted comedic content, spanning genres like paternal wit, celebrity anecdotes, and light ribbing. This service integrates directly with AI orchestration platforms, such as Copilot Studio, allowing automated assistants to retrieve context-appropriate levity while strictly enforcing content safety filters.

Author

humor-service-connector logo

Anilinfo2015

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

ccpcopilotcodingcoding ccpcopilot studiojokes integrates

Deployment Guide: Integrating Comedic Content via Model Context Protocol (MCP)

This documentation outlines the process for provisioning an MCP Server capable of serving diverse joke formats and connecting it within the Microsoft Copilot Studio ecosystem.

What is MCP in this Context?

The Model Context Protocol (MCP), formalized by Anthropic, establishes a universal standard for applications to supply contextual information to Large Language Models. This protocol acts as a bridge, standardizing the method for linking external knowledge sources and specialized services—like this joke engine—directly into advanced AI frameworks such as Copilot Studio. For further technical details, consult modelcontextprotocol.io/introduction.

Copilot Studio currently leverages the Tool interface capability of MCP. Refer to [aka.ms/mcsmcp] for current implementation details and known service limitations.

Interoperability: MCP vs. Traditional Connectors

This integration leverages the existing connector infrastructure within Power Platform to expose MCP endpoints. This symbiotic relationship ensures that MCP services inherit enterprise-grade governance, including Virtual Network isolation, Data Loss Prevention policies, and robust authentication mechanisms, all while providing real-time access to specialized data (in this case, humor).

Therefore, MCP and connectors are designed to function synergistically.

Prerequisites for Deployment

Before proceeding, ensure you possess the following:

  • An active Azure subscription (with billing enabled).
  • A validated GitHub identity and appropriate login credentials.
  • Access to a Copilot Studio trial or development license.
  • A provisioned Power Platform environment.

Deployment Workflow

The successful implementation requires executing the following sequence of provisioning steps:

  1. Initialize a new Git repository from our provided template.
  2. Provision the Azure Web Application instance.
  3. Establish the requisite Power Platform Custom Connector.
  4. Incorporate the newly established MCP service as an available action within the target Copilot Studio agent.

Step 1: Repository Initialization

Follow the on-screen prompts to template a new repository:

  1. Activate the Use this template option.
  2. Initiate the creation of a new repository.
  3. Specify the correct repository Owner.
  4. Assign a unique Repository name.
  5. Optionally include a Description.
  6. Set visibility to Private.
  7. Finalize creation by selecting Create repository.

[!WARNING]
Be aware: Upon completion of this guide, the Azure Web App hosting the MCP server will be externally accessible. It is strongly recommended to decommission the Azure Web App immediately after validating the lab steps.

Step 2: Azure Web App Provisioning

Navigate through the Azure Portal to deploy the hosting service:

  1. Access [portal.azure.com].
  2. In the Resource groups section, initiate creation (Create).
  3. Select your active Azure Subscription.
  4. Define a unique Resource group identifier (e.g., "comedy-hosting").
  5. Select the geographically nearest Region.
  6. Proceed via Review + create, then Create.
  7. Navigate to the newly formed Resource Group.
  8. Initiate a new resource deployment (Create).
  9. Use the search bar to locate and select web app.
  10. Confirm the Web App resource type.
  11. Input a unique Name for the service (e.g., "joke-engine-service").
  12. Configure the Runtime stack to Node 22 LTS.
  13. Select the preferred Region.
  14. Complete basic setup with Review + create, then Create.
  15. Monitor deployment status using Refresh until successful.
  16. Access the deployed resource (Go to resource).
  17. Navigate to the Deployment configuration pane.
  18. Select Deployment Center.
  19. Set Source to GitHub.
  20. Authorize the connection (Authorize).
  21. Proceed (Continue).
  22. Authorize the App Service integration (Authorize AzureAppService).
  23. Specify your GitHub Organization.
  24. Select the repository created in Step 1 from the Repository dropdown.
  25. Confirm the appropriate deployment Branch.
  26. Save the configuration (Save).
  27. Verify continuous integration status via Refresh until the deployment signals completion.

Step 3: Power Platform Connector Definition

This step creates the necessary glue code within Power Platform:

  1. Access the Power Apps Maker Portal at [https://make.powerapps.com/].
  2. Expand the navigation pane and select Discover all.
  3. Pin Custom connectors to the main menu sidebar.
  4. Navigate to Custom connectors.
  5. Initiate a New custom connector.
  6. Choose the Create from blank option.
  7. Assign a descriptive identifier (e.g., ComedicToolkit).
  8. Continue to the next stage.
  9. Activate the Swagger editor toggle.
  10. Import the provided OpenAPI/YAML schema from the local assets and use it to overwrite the editor content.
  11. Crucially, update all instances of the placeholder URL (dummyurl.azurewebsites.net) within the schema to the actual hostname of the Azure Web App deployed in Step 2 (excluding https:// or any trailing path information).
  12. Finalize the definition by selecting Create connector.

Step 4: Agent Integration in Copilot Studio

This final stage connects the new capability to the AI conversational agent:

  1. Navigate to [https://copilotstudio.microsoft.com].
  2. Verify the correct Power Platform environment is selected via the top-right picker.
  3. Select Create from the left navigation panel.
  4. Initialize a New agent.
  5. Bypass initial setup by selecting Skip to configure.
  6. Rename the agent to WitMaster.
  7. Refine the agent's purpose using this Description: text An AI persona dedicated exclusively to dispensing clean, witty, and engaging humor on explicit user request. It dynamically adjusts its comedic delivery style based on inferred user preference while maintaining strict content moderation and character consistency.
  8. Set detailed operational Instructions: ```text You are the designated purveyor of curated amusement. Adhere strictly to these directives:

    • Activate response generation ONLY when prompted for levity or humor (e.g., "Entertain me," "Tell a joke").
    • Adapt response style (e.g., observational, wordplay, anecdotal) to the user's expressed or implied tone.
    • Maintain the persona; do not deviate into non-humorous topics.
    • Ensure all output is brief and clearly presented.
    • Zero tolerance for inappropriate, biased, or adult-themed material.
    • Default to universally safe, clever material if preference is ambiguous.
    • Avoid repeating jokes within the current interaction thread.
    • Omit meta-commentary on the joke unless directly solicited.
    • Be quick, sharp, and amusing. ```
    • Confirm agent creation (Create).
    • Activate the Orchestration feature under Generative AI settings.
    • Deactivate external knowledge retrieval in the Knowledge section.
    • Navigate to the Actions tab.
    • Add a new action (Add an action).
    • Locate and select the connector defined previously (e.g., ComedicToolkit).
    • Select the specific MCP operation (e.g., the primary joke retrieval function).
    • Proceed through the connection setup until the action is added.
    • Update the trigger condition text for the agent: text Invoke this function solely when the user explicitly requests a joke. The available types include biographical anecdotes, paternal humor, and lighthearted teasing material.
    • Finalize integration (Add action).
    • In the testing pane, initiate a refresh (refresh icon).
    • Input a test query (e.g., "Give me a piece of paternal humor."). You will encounter a prompt requiring connection authorization due to security settings.
    • Select Connect to manage credentials.
    • Locate your ComedicToolkit connection and select Connect.
    • Wait for the status indicator to switch to Connected.
    • Close the connection management window.
    • Refresh the testing pane again.
    • Re-send your test query (e.g., "Tell me something witty."). The agent should now successfully invoke the MCP service and return a joke.

This concludes the deployment and validation process for integrating external comedic tools via MCP into Microsoft Copilot Studio.

Jokes MCP Server Backend Details

This service is implemented utilizing the [TypeScript SDK] for the [MCP] framework. The server aggregates randomized humor from the following external endpoints:

  • [chucknorris.io] (For specialized attribute jokes)
  • [icanhazdadjoke.com] (For parent-centric humor)
  • [yomama-jokes.com] (For light insult comedy)

Local execution requires running npm install, followed by npm run build and subsequent execution via npm start.

Contained Capabilities

The following specialized functions are exposed by this MCP service:

RetrieveCelebrityAnecdote

Fetches a random anecdote sourced from chucknorris.io.

FetchAvailableAnecdoteCategories

Retrieves the classification list supported by chucknorris.io.

FetchPaternalWit

Retrieves a randomly selected joke from icanhazdadjoke.com.

RetrieveLightInsult

Fetches a random humorous entry from yomama-jokes.com.

Operational Notes and Future Development

Known compatibility constraints and planned enhancements for MCP within Copilot Studio are documented by Microsoft at [https://aka.ms/mcsmcpdocs#known-issues--planned-improvements].

Contribution Guidelines

We welcome constructive feedback and improvements. All significant submissions necessitate adherence to the Contributor License Agreement (CLA). A bot will verify CLA compliance upon Pull Request submission. This repository follows the [Microsoft Open Source Code of Conduct].

Intellectual Property Notices

Use of any associated Microsoft trademarks or logos must conform to established [Trademark & Brand Guidelines]. Unauthorized use that implies endorsement is prohibited. Third-party marks are subject to their respective ownership policies.

See Also

`