Joke Button MCP Server
MCP Joke Button App
このプロジェクトは、1つのMCP App UI(単一のボタン)を公開する小さなMCPサーバーです。ボタンがクリックされると、アプリはホストにメッセージを送信し、アシスタントが短くて家族向けのジョークを1つ答えるよう要求します。
意図的にNode.jsの組み込みモジュールのみを使用しています。実行時のパッケージ依存関係はありません。
デモ内容
MCPコアプロトコルバージョン
2026-07-28単一エンドポイント
/mcpでのステートレスStreamable HTTPserver/discover、tools/list、tools/call、resources/list、resources/read_meta.ui.resourceUriを使用したMCP Apps UIリソースメタデータサンドボックス対応の
text/html;profile=mcp-appウィジェットpostMessageを介したui/initializeとui/message
Related MCP server: Jokes MCP Server
必要条件
nodejs.org からNode.js 20以降をインストールしてください。LTSダウンロードで問題ありません。
npm install を実行する必要はありません。このプロジェクトにはサードパーティのライブラリはありません。
サーバーの起動
このフォルダーでターミナルを開き、以下を実行します:
npm start次のように表示されるはずです:
MCP Joke Button server listening on http://127.0.0.1:8787/mcp
Preview the widget shell at http://127.0.0.1:8787/previewテスト中はそのターミナルを開いたままにしてください。
サーバー実行中、MCPリクエストはメソッドごとにログに記録されます。インタラクティブなアプリのレンダリングでは、ログに次のようなUIリソースの読み取り成功が含まれるはずです:
[mcp] request method=resources/read name=ui://joke-button/app.html
[mcp] response method=resources/read status=200これらの開発ログを無効にするには、MCP_LOG_REQUESTS=false を設定してください。
Herokuへのデプロイ
joke-button Herokuアプリは次の場所にデプロイされています:
https://joke-button-31cddc4bc964.herokuapp.comそのMCPエンドポイントは次のとおりです:
https://joke-button-31cddc4bc964.herokuapp.com/mcp現在のブランチをデプロイするには:
git push heroku HEAD:mainクイックローカルチェック
ブラウザで次のアドレスを開いてください:
http://127.0.0.1:8787/previewこれはボタンの外観をプレビューするだけです。ボタンがChatGPTなどのMCP Apps互換ホスト内でレンダリングされた場合にのみ、AIにジョークを要求できます。
ChatGPT DesktopまたはChatGPT Webでの使用
開発中、ChatGPTはリモートMCPサーバー用のHTTPS URLを必要とします。npm start を実行したまま、ngrokやCloudflare Tunnelなどのトンネルツールでポート 8787 を公開してください。
ngrokの例:
ngrok http 8787HTTPS転送URLをコピーし、末尾に /mcp を追加します。例:
https://example.ngrok.app/mcp次にChatGPTで接続します:
ChatGPTを開きます。
設定を開きます。
セキュリティとログインを開きます。
開発者モードがまだ有効でない場合は有効にします。
プラグインを開きます。デスクトップアプリを使用していてサイドバーに表示されない場合は、同じアカウントでサインインした状態でブラウザで
https://chatgpt.com/pluginsを開きます。プラスボタンを選択して、開発者MCPサーバー接続を追加します。
/mcpで終わるHTTPS URLを貼り付けます。名前を
Joke Buttonにします。新しいチャットを開始し、Moreメニューからプラグインを選択して、
Show the joke button.と尋ねます。Tell a jokeをクリックします。
このChatGPT UIテストでは、MCP servers という名前の設定は必要ありません。その設定はCodexのローカルMCPホスト構成用であり、ChatGPT開発者プラグイン接続を追加するためのものではありません。
開発者モードまたはプラスボタンがない場合は、デスクトップアプリが最新であることと、アカウントまたはワークスペースでプラグイン開発が許可されていることを確認してください。
アプリが機能している場合、ChatGPTはボタンのメッセージを受信し、短いジョークで応答するはずです。
ChatGPT DesktopアプリでのCodexとの使用
Codexは共有MCP設定からStreamable HTTP MCPサーバーに接続できます。
MCP servers 設定はCodex対応のローカルクライアントにのみ表示され、通常のChatGPTチャット設定ビューには表示されない場合があります。利用可能な場合:
npm startを実行したままにします。ChatGPTデスクトップアプリを開きます。
設定を開き、次にMCP serversを開きます。
Add serverを選択します。
Streamable HTTPを選択します。
サーバー名を
joke_buttonにします。次のURLを使用します:
http://127.0.0.1:8787/mcp保存し、プロンプトが表示されたら再起動します。
Codexタスクで
/mcpと入力して、サーバーが接続されていることを確認します。Codexに
Use the Joke Button MCP server.と依頼します。
Codex MCPツールサポートは、サーフェスによってはiframe UIをレンダリングせず、テキストのフォールバックを表示する場合があります。実際のワンボタンUIを使用するには、MCP Apps UIサポートのあるChatGPTを使用してください。
設定が表示されない場合は、codex-config.example.toml からサンプル構成を信頼できるプロジェクトの .codex/config.toml またはユーザーの ~/.codex/config.toml にコピーし、ChatGPTデスクトップアプリまたはCodexクライアントを再起動してください。
便利なURL
ヘルスチェック:
http://127.0.0.1:8787/healthMCPエンドポイント:
http://127.0.0.1:8787/mcpウィジェットプレビュー:
http://127.0.0.1:8787/preview
セキュリティに関する注意事項
サーバーは、2026-07-28 Streamable HTTPトランスポートで必要なMCPプロトコルバージョンとミラーリングされたMCPヘッダーを検証します。
ローカル開発では、Origin ヘッダーのないリクエスト、ループバックブラウザオリジン、一般的なOpenAIホストオリジンが受け入れられます。別のホストオリジンの場合は、次のコマンドでサーバーを起動します:
$env:MCP_ALLOWED_ORIGINS="https://your-host.example"
npm startプライベートデータにアクセスしたりアクションを実行したりできる実際のMCPサーバーを公開する前に、認証を使用してください。このサンプルはどちらも行いません。
プロジェクトファイル
server.js: 依存関係のないMCPサーバーpublic/joke-button.html: MCP App UIウィジェットcodex-config.example.toml: Codex MCP構成のサンプル
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 fetches jokes from multiple sources (Chuck Norris, Dad jokes, and Yo Mama jokes) and integrates with Microsoft Copilot Studio to create a humor-focused conversational experience.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server implementation that delivers various joke types (Chuck Norris, Dad jokes, etc.) to Microsoft Copilot Studio and GitHub Copilot through the Model Context Protocol.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 gradedqualityDmaintenanceAn MCP server that provides jokes on demand, allowing users to request different types of jokes (Chuck Norris, Dad jokes, etc.) through natural language in both GitHub Copilot and Microsoft Copilot Studio.MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
A very simple remote MCP server that greets you, with a custom icon.
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
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/mwilber/mcpapptest'
If you have feedback or need assistance with the MCP directory API, please join our Discord server