JokesMCPTool
Microsoft Copilot Studio ❤️ MCP
欢迎参加 Microsoft Copilot Studio ❤️ MCP 实验室。在本实验室中,你将学习如何部署 MCP Server,以及如何将其添加到 Microsoft Copilot Studio。
什么是 MCP?
Model Context Protocol (MCP) 是一种开放协议,由 Anthropic 定义,用于标准化应用程序向 LLM 提供上下文的方式。MCP 提供了一种标准化方式,将 AI 模型连接到不同的数据源和工具。MCP 允许制作者将现有的知识服务器和 API 直接无缝集成到 Copilot Studio 中。
目前,Copilot Studio 仅支持工具。要了解有关当前功能的更多信息,请参阅 aka.ms/mcsmcp。存在一些已知问题和计划中的改进,这些已列在此处。
Related MCP server: Microsoft Copilot Studio ❤️ MCP
MCP 与连接器
什么时候使用 MCP?什么时候使用连接器?MCP 会取代连接器吗?
MCP 服务器通过连接器基础架构提供给 Copilot Studio,因此这些问题实际上并不适用。MCP 服务器使用连接器基础架构这一事实意味着它们可以采用企业安全与治理控制,例如虚拟网络集成、数据丢失防护控制、多种身份验证方法——所有这些在此版本中均可用——同时支持 AI 驱动的代理实时访问数据。
因此,MCP 和连接器实际上是强强联合。
先决条件
Azure 订阅(已添加付款方式)
拥有 GitHub 帐户并已登录
Copilot Studio 试用版或开发人员帐户
已预配 Power Platform 环境
实验室
要部署此 MCP Server 并在 Microsoft Copilot Studio 中使用它,你需要完成以下操作:
基于模板创建新的 GitHub 存储库
选择
Use this template选择 `Create a new repository

选择正确的
Owner为其指定
Repository name可选地,你可以为其添加
Description选择
Private选择
Create repository这需要一点时间。完成后,你将被引导到新创建的存储库。
[!WARNING]
完成本实验室中的步骤后,你将拥有一个在 Azure 上运行且可公开访问的 MCP Server。理想情况下,你不希望这样。请务必在完成实验室后删除 Azure Web App。
部署 Azure Web App
转到
portal.azure.com
将鼠标悬停在
Resource groups选项卡上,然后选择Create
单击
Subscription下拉列表,然后从列表中选择你的订阅
单击
Resource group名称文本框,然后输入资源组名称,例如“jokesgrp”
选择
Region下拉列表,选取离你最近的区域
单击
Review + create
单击
Create
选择
Go to resource group
选择
Create
单击
search box
输入
web app在 Web App 搜索结果中选择
Create button
选择
Web App
选择
Name文本输入框,为 Web App 输入一个名称,例如“wegotjokes”
选择
Runtime stack下拉列表,然后选取Node 22 LTS
选择
Region下拉列表,然后选取离你最近的区域
单击
Review + create
单击
Create
单击
Refresh以更新部署进度
部署完成后,选择
Go to resource
展开
Deployment选项卡
单击
Deployment Center
单击
Source下拉列表,然后选择GitHub
选择
Authorize
选择
Continue
选择
Authorize AzureAppService
单击
Organization下拉列表,然后选择你的组织
单击
Repository下拉列表,然后从列表中选择你之前创建的 GitHub 存储库
单击
Branch下拉列表,然后选择你的分支
其他选项保持默认,然后选择
Save
单击
Refresh以更新部署状态
确认部署已完成

创建 Power Platform 连接器
在左侧菜单中选择
More选择
Discover all按钮在“数据”下,选择
Custom connectors旁边的pin icon,将其固定到左侧菜单在左侧菜单中选择
Custom connectors选择
New custom connector选择
Create from blank
为连接器命名(例如
JokesMCP)选择蓝色的
Continue按钮选择
Swagger editor切换开关
从此处复制 yaml 代码,并替换 Swagger 编辑器中的代码
在 Swagger 编辑器中,将
dummyurl.azurewebsites.net替换为你之前创建的 Web App 的 URL。确保删除https://以及azurewebsites.net之后的所有内容选择
Create connector以创建连接器
在 Microsoft Copilot Studio 中将 MCP Server 添加为操作
现在,你已在 Azure 中运行 MCP Server,并在 Power Platform 中拥有可用的连接器。此步骤涉及在 Microsoft Copilot Studio 中创建代理,并将 MCP Server 添加到该代理。
选择右上角的环境选择器
选择正确的环境
在左侧导航中选择
Create选择蓝色的
New agent按钮
选择右上角的
Skip to configure
将名称更改为
Jokester添加以下
DescriptionA 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.添加以下
InstructionsYou 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.选择右上角的
Create
启用生成式 AI
Orchestration
在
Knowledge部分禁用通用知识
在顶部菜单中选择
Actions
选择
Add an action
搜索你之前创建的连接器的名称(本例中为
jokes)(请参见下方截图中的数字 1)选择
Jokes MCP server(请参见下方截图中的数字 2)
等待连接创建完成,然后选择
Next
将
Description for the agent to know when to use this action更改为以下文本:Trigger this action when a user asks for a joke. It can provide Chuck Norris jokes, Dad jokes and Yo Mama jokes.其余选项保留默认设置,例如最终用户身份验证,稍后你将对此有更多了解。
选择
Add action将操作添加到代理
在
Test your agent窗格中选择refresh icon
在
Test your agent窗格中发送以下消息:Can I get a Chuck Norris joke?这将向你显示一条消息,指出运行此操作需要其他权限。这是因为操作向导中的用户身份验证。
选择
Connect
这将打开一个新窗口,你可以在其中管理此代理的连接。
选择
JokesMCP旁边的Connect
等待连接创建完成,然后选择
Submit
连接现在应该已连接,因此状态应设置为
Connected
关闭浏览器中的“管理你的连接”选项卡
现在,你应该回到 Jokester 代理屏幕。
在
Test your agent窗格中选择refresh icon
在
Test your agent窗格中发送以下消息:Can I get a Chuck Norris joke?现在,这将显示一条 Chuck Norris 笑话,而不是其他权限。

在
Test your agent窗格中发送以下消息:Can I get a Dad joke?现在,这将显示一条爸爸笑话。

在
Test your agent窗格中发送以下消息:Can I get a Yo Mama joke?现在,这将显示一条 Yo Mama 笑话。

以上就是 Jokes MCP Server 在 Microsoft Copilot Studio 中的运行效果。这也是本次实验室的全部内容!希望你喜欢这个实验室。请花点时间填写我们的反馈表单。
Jokes MCP Server 详细信息
这是一个基于 TypeScript SDK 构建的 MCP 服务器。
使用此 MCP Server,你将能够从以下网站获取笑话:
如果你想在本地运行服务器,请确保在存储库的根目录中运行 npm install。
之后,你可以运行 npm run build 来构建服务器,运行 npm start 来启动服务器。
工具
包含以下工具:
get-chuck-joke
此工具从 chucknorris.io 获取一条随机的 Chuck Norris 笑话。
get-chuck-categories
此工具从 chucknorris.io 获取可用的类别。
get-dad-joke
此工具从 icanhazdadjoke.com 获取一个随机的老爸笑话。
get-yo-mama-joke
此工具从 yomama-jokes.com 获取一个随机的老妈笑话。
已知问题和计划改进
Microsoft Copilot Studio 中的 MCP 存在一些已知问题和计划改进。这些内容列在这篇 Microsoft Learn 文章中。
贡献
本项目欢迎贡献和建议。大多数贡献需要您同意一份贡献者许可协议(CLA),声明您有权且确实授予我们使用您的贡献的权利。详情请访问 https://cla.opensource.microsoft.com。
当您提交拉取请求时,CLA 机器人会自动判断您是否需要提供 CLA,并适当地为 PR 添加标注(例如状态检查、评论)。只需按照机器人提供的说明操作即可。您只需在使用我们 CLA 的所有仓库中执行一次此操作。
本项目已采用 Microsoft 开源行为准则。更多信息请参阅行为准则常见问题,或如有任何其他问题或评论,请联系 opencode@microsoft.com。
商标
本项目可能包含项目、产品或服务的商标或徽标。Microsoft 商标或徽标的授权使用须遵守并遵循 Microsoft 商标和品牌指南。在本项目的修改版本中使用 Microsoft 商标或徽标不得造成混淆或暗示 Microsoft 赞助。任何对第三方商标或徽标的使用均须遵守该第三方的政策。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables Microsoft Copilot Studio to fetch and deliver various types of jokes (Chuck Norris, Dad jokes, and Yo Mama jokes) from multiple online joke APIs.MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides joke-fetching capabilities, demonstrating how to deploy an MCP Server and integrate it with Microsoft Copilot Studio.MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to fetch various types of jokes including Chuck Norris and Dad jokes through an MCP server that integrates with Microsoft Copilot Studio and GitHub Copilot.MIT
- AlicenseNot gradedqualityDmaintenanceDelivers Chuck Norris jokes and Dad jokes on demand through Microsoft Copilot Studio and GitHub Copilot. Demonstrates how to deploy and integrate MCP servers with Microsoft's AI platforms.MIT
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tifanygracini/JokesMCPTool'
If you have feedback or need assistance with the MCP directory API, please join our Discord server